API referenceDatabase
POST
/database/companies/search

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
AuthorizationBearer <token>

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  }}

Find a person's phone POST

**JavaScript SDK:** [`swarmhit.database.people.findPhone(params)`](/smart-api/sdk/methods#database.people) A person's mobile phone numbers, primary first, from their LinkedIn URL. Nothing is saved, except on a workspace lead with that LinkedIn URL, whose phone is returned free when it has one and kept when one is found. Charged at the Phone finder price (Settings → Credits usage, for owners and admins) when a number is found; an empty `phones` array when none is, free. Out of credits is a 400 with `code: warning-no-credits`.

Search people in the database POST

**JavaScript SDK:** [`swarmhit.database.people.search(params)`](/smart-api/sdk/methods#database.people) Search the people database by named filters. At least one filter with a value is required (`excludeExisting` alone does not count); unknown filter keys are rejected. Array filters match any of their values (25 values at most each); text filters are fuzzy; numeric and boolean filters must be JSON numbers and booleans (a string is ignored). Every result returned consumes workspace AI credits, at the Database search price (Settings → Credits usage, for owners and admins); saved people hidden by `excludeExisting` are not charged. Paginate by passing the returned `nextCursor` back as `cursor` (filters must stay identical between pages); a cursor that can no longer be resumed is a 400. Out of credits is a 400 with `code: warning-no-credits`; a filter problem is a 400 with `code: warning-database-query`.