JavaScript SDK: swarmhit.database.people.search(params)
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.
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/people/search" \ -H "Content-Type: application/json" \ -d '{ "filters": { "titles": [ "CTO", "VP Engineering" ], "countries": [ "United States" ], "headcountRanges": [ "51-200", "201-500" ] }, "limit": 25 }'{ "data": [ { "id": 0, "name": "string", "firstName": "string", "lastName": "string", "headline": "string", "title": "string", "location": "string", "country": "string", "picture": "string", "linkedinUrl": "string", "company": { "name": "string", "title": "string", "domain": "string", "linkedinUrl": "string", "companyId": 0, "headcount": 0, "headcountRange": "string", "industries": [ "string" ], "startDate": "string", "endDate": "string" }, "pastCompanies": [ "string" ], "education": [ { "school": "string", "degree": "string", "field": "string" } ], "contact": { "hasBusinessEmail": true, "hasPersonalEmail": true, "hasPhone": true }, "yearsOfExperience": 0, "saved": true, "businessEmails": [ "string" ], "phones": [ "string" ] } ], "paging": { "nextCursor": "string", "totalCount": 0 }}Search companies in the database POST
**JavaScript SDK:** [`swarmhit.database.companies.search(params)`](/smart-api/sdk/methods#database.companies) 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`.
Check connection status GET
**JavaScript SDK:** [`swarmhit.accounts.connections.get(accountId, identifier)`](/smart-api/sdk/methods#accounts.connections) This sender's connection with a profile: status (not_connected / pending / connected), connection degree, whether it is an open profile, and whether the sender can message or invite them. A read; no profile view is registered and no cap is used. `pending` only reflects invitations this sender sent through direct actions: one sent by a campaign or from LinkedIn itself reads `not_connected`. Use the username in lower case: an identifier with capital letters or underscores is treated as LinkedIn's internal member id and refused with 400.