For developers
API and webhooks
The API lets your own tools read your workspace's prospects, lists and saved searches, and, with a token you allow to, start website research and make CSV exports. Webhooks tell your tools when a company has been researched, so they do not have to keep asking. Both are part of the Professional and Business plans. Everything here is company-level: no people, emails or phone numbers are returned or sent. Example values on this page are made up.
Authentication
An owner or admin makes a token in Settings > API. It is shown once, so copy it then; we keep only a fingerprint. A token reads everything in its workspace, so give each tool its own token and revoke any you no longer use. Send it on every request:
curl https://leadprospector.co.uk/api/v1/workspace \
-H "Authorization: Bearer YOUR_TOKEN"
The base address is https://leadprospector.co.uk/api/v1. The endpoints in the first table are GET and read-only; a token can use them as soon as it is made. Answers are JSON.
Endpoints
| Path | Returns |
|---|---|
/workspace | The workspace name and plan. |
/searches | Saved searches: id, name, status, company limit, criteria, whether it is watched, created time. |
/lists | Lists: id, name, description, how many prospects, created time. |
/lists/{id}/prospects | The prospects on one list. |
/prospects | All prospects. Filters: stage (new</code>, <code>qualified</code>, <code>contacted</code>, <code>interested</code>, <code>disqualified) status (new or excluded) and search (a search id: only prospects that search found). |
/prospects/{id} | One prospect. |
Paging
List endpoints are paged. Use page and per_page (default 25, at most 100). The answer has data and meta with page, per_page, total and last_page.
A prospect
{
"data": {
"id": 42,
"status": "new",
"stage": "qualified",
"tags": ["north"],
"scores": { "company_fit": 78, "evidence": 64 },
"found_by": [
{
"search_id": 7,
"first_found_by": true,
"verdict": "qualifies",
"reasons": [],
"scores": { "company_fit": 78, "contact_fit": 52 },
"up_to_date": true,
"last_found_at": "2026-10-18T14:02:11+00:00"
}
],
"researched_at": "2026-10-20T09:15:00+00:00",
"created_at": "2026-10-18T14:02:11+00:00",
"company": {
"companies_house_number": "00000000",
"name": "EXAMPLE TRADING LIMITED",
"trading_name": null,
"website_domain": "example.co.uk",
"status": "active",
"type": "ltd",
"sic_codes": ["62020"],
"incorporated_on": "2015-03-02",
"registered_office": {
"address_line_1": "1 High Street",
"address_line_2": null,
"locality": "Leeds",
"postcode": "LS1 1AA"
}
}
}
}
found_by has one entry for each search that found the company, oldest first: that search's own verdict (qualifies or excluded, with the reasons), its own scores, whether the verdict was made under the search's current criteria (up_to_date) and whether it was the search that first found the company (first_found_by). The top-level status and scores follow that first search. Your exclusion list applies on top of every search. A company no search row covers has an empty list.
Starting research and making exports
These two spend credits or make a file, so a token can use them only if the owner or admin ticked “Also let it start research and make exports” when making it. Any other token gets 403. They run as the person who made the token, who must still be in the workspace, and are limited to 10 a minute per token.
| Request | What it does |
|---|---|
POST /research | Starts website research for the prospects in prospect_ids (up to 25). Optional: use_search (look for the website with web search, which costs more) and force (research again even if done recently). Answers 202 with the run. Excluded and recently researched prospects are left out. If you cannot afford it, 402 and nothing is charged. |
GET /research/{id} | The run's status (queued, running, completed, partial, failed, cancelled or budget_exhausted), counts, and one result per prospect once done. Poll it, or use the prospect.researched webhook. |
POST /research/{id}/cancel | Stops a run at once if it has not started, otherwise before its next company. Credits not used are returned. Answers 202 with the run. |
POST /research/{id}/retry | Starts a new run for the prospects a finished run did not finish (website unreachable, not read, or never reached). Needs its own Idempotency-Key. 422 if the run is still going or everything finished. |
POST /lists/{id}/exports | Makes a CSV of one list. Send fields (a list of: company_name</code>, <code>company_number</code>, <code>trading_name</code>, <code>company_status</code>, <code>company_type</code>, <code>incorporated_on</code>, <code>sic_codes</code>, <code>website</code>, <code>address</code>, <code>postcode</code>, <code>stage</code>, <code>follow_up_on</code>, <code>company_fit_score</code>, <code>contact_fit_score</code>, <code>evidence_score</code>, <code>first_search</code>, <code>searches) and optionally format (standard</code>, <code>hubspot</code>, <code>pipedrive). Excluded prospects and companies on your do-not-contact lists are left out and counted in the answer. Answers 201 with a download_url. |
GET /exports/{id}/download | The CSV, with the same token. 410 once the export has expired (7 days). |
Research costs credits, so POST /research and POST /research/{id}/retry need an Idempotency-Key header: 8 to 64 letters, digits, dots, dashes or underscores. Use a new key for each new run. If a request times out, send it again with the same key and you get the same run back and are not charged twice.
curl -X POST https://leadprospector.co.uk/api/v1/research \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Idempotency-Key: nightly-2026-10-26-a" \
-H "Content-Type: application/json" \
-d '{"prospect_ids": [12, 13]}'
Scores are our own estimates and can be empty until a company has been researched. Company facts come from the public register and the company's own website; see the app for where each fact came from.
Errors and limits
| Status | Meaning |
|---|---|
401 | The token is missing, wrong, revoked or expired. The answer is the same for all four. |
403 | The workspace's plan does not include the API, or the token is read-only and the request needs research and exports ticked. |
402 | Not enough credits to start the research. Nothing is charged. |
404 | No such id in your workspace. |
422 | The request was not valid (the answer says why), or there was nothing to do. |
429 | Too many requests. Wait for the number of seconds in the Retry-After header. |
Each token may make 60 requests a minute. Requests from one network address are also limited to 120 a minute before the token is checked. A workspace can hold 10 active tokens. These numbers may change as we learn what customers need.
Webhooks
Add an address in Settings > API (up to 5 per workspace). We show its signing secret once; it starts with whsec_. We send a POST with a JSON body when an event happens.
Events
prospect.researched: a company's website was found and read.datahasprospect_id,research_job_id,company(name,companies_house_number,website_domain) andapi_url, the address to read the full prospect from.webhook.test: sent when you press Send test, even to an address that is switched off. It does not count towards switching an address off.
{
"id": "0b6f0d3e-6c1a-4f58-9f55-3a6f2c0d9a11",
"type": "prospect.researched",
"created_at": "2026-10-20T09:15:03+00:00",
"data": {
"prospect_id": 42,
"research_job_id": 7,
"company": {
"name": "EXAMPLE TRADING LIMITED",
"companies_house_number": "00000000",
"website_domain": "example.co.uk"
},
"api_url": "https://leadprospector.co.uk/api/v1/prospects/42"
}
}
Headers
Lead-Prospector-Signature:t=<unix time>,v1=<hex signature>Lead-Prospector-Event: the event type.Lead-Prospector-Delivery: the eventid. It stays the same on every retry, so use it to ignore a repeat.
Check the signature
Compute the hex HMAC-SHA256 of the time t, a full stop, then the raw request body exactly as received, using your signing secret. Compare it with v1 using a constant-time comparison, and reject the request if t is more than a few minutes old. We use a fresh t on every attempt.
$header = $_SERVER['HTTP_LEAD_PROSPECTOR_SIGNATURE'] ?? '';
parse_str(str_replace(',', '&', $header), $parts); // t=..., v1=...
$body = file_get_contents('php://input');
$expected = hash_hmac('sha256', $parts['t'].'.'.$body, $secret);
$fresh = abs(time() - (int) $parts['t']) <= 300;
if (! $fresh || ! hash_equals($expected, $parts['v1'] ?? '')) {
http_response_code(400);
exit;
}
import hmac, hashlib, time
t, v1 = (p.split('=', 1)[1] for p in header.split(','))
expected = hmac.new(secret.encode(), f'{t}.'.encode() + raw_body, hashlib.sha256).hexdigest()
ok = hmac.compare_digest(expected, v1) and abs(time.time() - int(t)) <= 300
What your address must do
- Be a public
httpsaddress on port 443, with no username or password in it. Addresses that point at private or internal networks are refused when you add them and again at every delivery. - Answer with a
2xxstatus within 15 seconds. We do not follow redirects and we never read your answer. - Expect repeats. Delivery is at least once: if you do not answer
2xxwe try again, up to 5 tries in all, with waits that grow from 1 minute to 2 hours. - An address whose events fail 10 times in a row is switched off. An owner or admin can switch it back on in Settings > API.
- We keep a record of each delivery for 14 days.
This reference describes version 1. We may add new fields and new events, so ignore anything you do not recognise.