Search for companies ids
curl --request POST \
--url https://bee.theswarm.com/v3/companies/search \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"query": {
"match": {
"company_info.industry": {
"query": "Financial Services"
}
}
},
"limit": 100,
"pagination_token": "<string>",
"stable_pagination": false
}
'{
"ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"total_count": 123,
"pagination_token": "<string>"
}Endpoints (v3)
Search Companies
Search the company database using OpenSearch DSL queries. Returns a list of company IDs that can be passed to the Fetch Company endpoint.
POST
/
v3
/
companies
/
search
Search for companies ids
curl --request POST \
--url https://bee.theswarm.com/v3/companies/search \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"query": {
"match": {
"company_info.industry": {
"query": "Financial Services"
}
}
},
"limit": 100,
"pagination_token": "<string>",
"stable_pagination": false
}
'{
"ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"total_count": 123,
"pagination_token": "<string>"
}The Search Companies endpoint searches the internal database of Companies using OpenSearch DSL.
See OpenSearch Mapping for available fields.
Replace
For query examples, see Search endpoint examples.
"query" with your OpenSearch DSL query and set the x-api-key header.
Search returns up to 1000 results per page. Pagination works the same as the Search Profiles endpoint.
Response example
{
"ids": [
"09d9c510-c9f6-4c6e-9e62-fe5fedbeda87"
],
"total_count": 1,
"pagination_token": "eyJzZWFyY2hfYWZ0ZXIiOlt7ImZpZWxkIjoiX3Njb3JlIiwidmFsdWUiOjF9LHsiZmllbGQiOiJwcm9maWxlX2luZm8uaWQiLCJ2YWx1ZSI6IjAwMDE2MTU4LWYyY2EtNDYzZC05YWEzLTIyOWZkMzk0ZWQ0MSJ9XX0="
}
Migrating from v2? v3 uses snake_case for all field names. The v2 equivalents were
paginationToken and totalCount. See the Migrating to v3 guide.Authorizations
Body
application/json
Search query in the ElasticSearch Query DSL format. Find mapping here
Example:
{
"match": {
"company_info.industry": { "query": "Financial Services" }
}
}Limit the number of results. If you want to use stable_pagination this parameter must be set to 1000
Required range:
0 <= x <= 1000Pagination token received in the previous response
When set to true, ensures that pagination results remain consistent, even if the underlying data changes during retrieval. This is useful for retrieving large result sets reliably across multiple requests
Was this page helpful?
⌘I

