JavaScript SDK: swarmhit.database.companies.search(params)
Search the company database by named filters. At least one filter with a value is required; unknown filter keys are rejected. sort.dir defaults to desc, and an unknown sort.key is ignored. Every result returned consumes workspace AI credits, at the Database search price (Settings → Credits usage, for owners and admins). Paginate by passing the returned nextCursor back as cursor. Out of credits is a 400 with code: warning-no-credits.
Authorization
bearerAuth An API key created on the Access tokens page.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/database/companies/search" \ -H "Content-Type: application/json" \ -d '{ "filters": { "industries": [ "Software Development" ], "countries": [ "USA" ], "minHeadcount": 50 }, "sort": { "key": "headcount", "dir": "desc" }, "limit": 25 }'{ "data": [ { "id": 0, "name": "string", "domain": "string", "website": "string", "linkedinUrl": "string", "description": "string", "companyType": "string", "yearFounded": 0, "industry": "string", "industries": [ "string" ], "headcount": 0, "headcountRange": "string", "headcountGrowth12m": 0, "country": "string", "headquarters": "string", "funding": { "totalUsd": 0, "lastRoundUsd": 0, "lastRoundType": "string", "lastRoundDate": "string", "investors": [ "string" ] }, "followers": 0, "openings": 0, "estimatedRevenue": { "minUsd": 0, "maxUsd": 0 } } ], "paging": { "nextCursor": "string", "totalCount": 0 }}