API reference / People reads
Search leads (live)
Written and maintained by The ProspectAPIs team
POST/v1/leads/search
POST /v1/leads/search is the ProspectAPIs operation searchLeads, in the People reads group of the REST API. Search people as sales leads by keywords and lead filters, read fresh. Each lead carries name, location, summary, person_ref, network_distance, open_profile, premium, current_role (title, company, company_id, started, months_in_role, months_at_company) and signals (changed_jobs_recently, posted_recently; null when unknown). Returns the first 2,500 results per query; page with start; a start at or past 2,500 is 400 result_window_exceeded. $0.0035 per result returned; an empty search is free. Not available yet: the call answers 503 temporarily_unavailable and nothing is charged until GET /pricing reports lead_search.available. Cost: Not available yet. Send your API key as a Bearer token in the Authorization header.
The quickstart shows this call in context, next to the first requests most integrations make.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
| Idempotency-Key | header | string | Optional, 1 to 255 printable ASCII characters. A retry with the same key and body within 24 hours gets the first answer back with Idempotent-Replayed: true and is never charged again. The same key with a different body is 422; a retry while the first call is still running is 409. |
Request body
JSON. Give keywords or at least one filter.
| Field | Type | Description |
|---|---|---|
| keywords | string | Free-text keywords. At most 500 characters. |
| filters | object | Named filters: titles as text; companies, places, industries, functions and schools as numeric ids; seniority, company_headcount, the years filters and network as listed bands; changed_jobs_recently and posted_recently take true. |
| filters.current_title | array of string | |
| filters.past_title | array of string | |
| filters.current_company | array of string | |
| filters.past_company | array of string | |
| filters.location | array of string | |
| filters.industry | array of string | |
| filters.function | array of string | |
| filters.school | array of string | |
| filters.seniority | array of string: training, entry, senior, strategic, entry_manager, manager, director, vp, cxo, owner_partner | |
| filters.company_headcount | array of string: 1, 2-10, 11-50, 51-200, 201-500, 501-1000, 1001-5000, 5001-10000, 10001+ | |
| filters.years_in_role | array of string: <1, 1-2, 3-5, 6-10, 10+ | |
| filters.years_at_company | array of string: <1, 1-2, 3-5, 6-10, 10+ | |
| filters.years_experience | array of string: <1, 1-2, 3-5, 6-10, 10+ | |
| filters.network | array of string: 1st, 2nd, 3rd | |
| filters.profile_language | array of string | |
| filters.changed_jobs_recently | boolean: true | true to include only these; omit otherwise. |
| filters.posted_recently | boolean: true | true to include only these; omit otherwise. |
| start | integer | Zero-based offset into the first 2,500 results. 0 to 2499. |
| count | integer | Results per page. 1 to 25. |
{}Responses
| Status | Meaning |
|---|---|
| 200 | The matching leads and the page envelope, read fresh. |
| 400 | The request was invalid (e.g. a bad filter or input); nothing was charged. |
| 401 | The API key is missing or invalid. |
| 402 | Out of credits. The body carries top_up_url; nothing was charged. |
| 429 | Too many requests; retry after the window. |
| 503 | This read is temporarily unavailable. Nothing was charged. |
Every error answers with the same JSON body, an error string and sometimes a code; the errors page lists each status and when it happens. A per-key 429 carries Retry-After; see rate limits.
200 response fields
The matching leads and the page envelope, read fresh. The body is a PeopleReadResult.
| Field | Type | Description |
|---|---|---|
| data required | object | The read result. For search, posts, engagers and followers this is { items, page }; for a profile it is the profile object. |
| coverage required | object | How complete the source was. |
| coverage.filled | integer | |
| coverage.of | integer |
| Header | Meaning |
|---|---|
| RateLimit-Limit | Requests this API key may make per minute. |
| RateLimit-Remaining | Requests left in the current one-minute window. |
| RateLimit-Reset | Seconds until the current window resets. |
Code samples
Each sample sends the same request. Set PROSPECTAPIS_KEY in your environment first. Values come from the spec's examples; replace them with your own.
curl -X POST https://api.prospectapis.com/v1/leads/search \
-H "Authorization: Bearer $PROSPECTAPIS_KEY" \
-H "Content-Type: application/json" \
-d '{}'const res = await fetch("https://api.prospectapis.com/v1/leads/search", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.PROSPECTAPIS_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({}),
});
if (!res.ok) throw new Error(`${res.status}: ${(await res.json().catch(() => ({}))).error ?? res.statusText}`);
const data = await res.json();
console.log(data);import os, requests
res = requests.post(
"https://api.prospectapis.com/v1/leads/search",
headers={"Authorization": f"Bearer {os.environ['PROSPECTAPIS_KEY']}"},
json={},
timeout=30,
)
res.raise_for_status()
data = res.json()
print(data)Billing
Billing reserves before it serves: the call holds what it may cost, serves at most what that hold covers, and refunds the rest when the response closes. Any non-2xx answer refunds the whole hold, so a failed call costs nothing. The response reports your balance in X-Credits-Remaining.
Related
Previous operation: List a page's employees (live). Next operation: Search lead companies (live). Every operation, grouped by area, is on the API reference index.
Create a free account to get a key, then run the samples above with your own values (this call acts for real, so use real inputs).
Was this page helpful?