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