POST
/
companies
/
search
    curl \
  --location 'https://bee.theswarm.com/companies/search' \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: $API_KEY' \
  --data \
  `{
    "query": {
      "match": {
        "company_info.website": {
          "query": "theswarm.com"
        }
      }
    }
  }`
    curl \
  --location 'https://bee.theswarm.com/companies/search' \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: $API_KEY' \
  --data \
  `{
    "query": {
      "match": {
        "company_info.website": {
          "query": "theswarm.com"
        }
      }
    }
  }`

Replace "query" with your OpenSearch DSL query defining the search criteria and set the proper x-api-key. The response will contain a list of company IDs matching the search criteria, that can be later used in the Company Fetch endpoint.

See OpenSearch mapping for Search Company endpoint: OpenSearch Mapping.

Search returns up to 1000 results per page. The pagination works exactly as in the Profile Search endpoint.

Response example:

    {
      "ids": [
        "09d9c510-c9f6-4c6e-9e62-fe5fedbeda87",
      ],
      "totalCount": 1,
    }