Skip to main content
POST
Run a people search

Authorizations

Authorization
string
header
required

Your API token (af_…) as the Basic-auth username, with an empty password.

Body

application/json

Exactly one filter source — filters, savedSearchId, savedSearchName or query — plus optional paging. With filters, at least one non-empty filter value, a linkedinUrl or a scrollToken is required, and enum-backed values must come from GET /prospects/filter-options (422 otherwise, before anything is billed; languages.name also takes the other language names filters lists).

filters
object

Literal filters, one of the four filter sources. People filters in the search vocabulary: include/exclude fields take [{ status, value }] entries, term fields a string or an array of strings, rangeInputs { min, max } ranges — every field and its accepted values are listed by GET /prospects/filter-options. On this endpoint a value outside a field's listed vocabulary is refused with 422 VALIDATION_FAILED, naming the field and the value, before anything is billed; so is a filter the search no longer serves (sex, github_url, github_username, facebook_url, job_title_sub_role, experience.title.sub_role, experience.company.industry, experience.company.location.country, experience.company.location.name, experience.company.location.continent, experience.company.type, location_continent, job_company_location_continent) and an exclude entry on education.degrees (the degree filter takes includes only; size and revenue excludes are searched). One exception: languages.name also accepts these other names of listed languages, searched as the listed one: bangla, farsi, panjabi, slovene, chinese, mandarin, putonghua, tagalog, filipino, sinhala, khmer, central khmer, hakka chinese, hokkien, taiwanese, newari, northern frisian, western frisian, ndebele, north ndebele, south ndebele, assyrian neo-aramaic.

savedSearchId
string

Id of one of your PEOPLE saved searches to take the filters from instead of filters (a company saved search answers 422 SAVED_SEARCH_TYPE_MISMATCH).

savedSearchName
string

Exact title of one of your people saved searches to take the filters from instead of filters; two searches sharing the title answer 409 SAVED_SEARCH_NAME_AMBIGUOUS.

Required string length: 1 - 255
query
string

Natural-language description of who to find (max 2000 chars), converted into filters server-side instead of filters; criteria that could not be mapped come back as unresolvedCriteria, and a query yielding no filter answers 422 QUERY_FILTERS_INVALID.

Required string length: 1 - 2000
size
integer
default:10

Profiles per page (1-100, default 10); the search pre-checks 1 credit per requested profile and debits 1 credit per profile returned.

Required range: 1 <= x <= 100
scrollToken
string

The scrollToken returned by the previous page, sent together with the same filter source, to fetch the next page. A token this API did not issue answers 422 SCROLL_TOKEN_INVALID: start again without it.

linkedinUrl
string

A LinkedIn profile URL (or in/<slug>, or the bare slug) to look up one person, normalised before matching; counts as search criteria on its own. A value that names no profile answers 422 FILTER_VALUE_UNRESOLVED with param linkedinUrl.

Response

Success

profiles
object[]
required
scrollToken
string | null
required

Opaque: send it back as scrollToken with the same filter source to fetch the next page; null when there are no more pages. A page can hold fewer rows than size, because a person the provider repeats is dropped, so only a null token marks the end.

total
integer | null
required

An estimate of the people matching the filters, not the page size, on the first page of a search on people filters only. Null on a search with employer filters (company size, revenue, industry, headquarters location or funding), which counts nothing with its rows, and on every page after the first: read it from the first page and carry it. A linkedinUrl lookup answers the rows found.

filters
object
required

The RESOLVED filters the search actually ran, in the POST /prospects/search vocabulary.

ignoredFilterKeys
string[]

Only when the source was a saved search: stored keys with no equivalent search field, which were dropped.

unresolvedCriteria
string[]

Only when the source was query: criteria in the prose that could not be turned into a filter.

closestCompanyMatches
object[]

Only when the source was query: each company the sentence named that Smart Search chose between same-named companies for, and the one it chose; empty when it guessed nothing.

unappliedCompanyNames
object[]

Present only when the search left included company names out. The rest of each list was searched.