LeadGen API
Find the people at a company, reveal their work email and mobile number, export the list, and run cold sequences — from your own code.
https://leadgencopilot.ai/api/v1Overview
Introduction
One REST API over the same data the LeadGen app runs on. There is no SDK to install and nothing to sign — every call is an HTTP request with your API key in the Authorization header. Search/count/preview use LeadGen's configured search system; read the capabilities response for current limits and cost. LeadGen credits are spent when you scrape profiles or reveal contact details.
Most integrations use three endpoints in a row: search a company, read the people back, then reveal the ones worth contacting. That flow is written out under Find people at a company.
Account access
Get an API key
Keys are created in the app at Settings → API keys → Create API key. A key starts with lgpat_, is shown exactly once, and is stored only as a hash — there is no way to display it again, so paste it into your secret store before you close the dialog. Lost one, revoke it and make another.
New keys carry Read, Search, Enrich and Export. Campaigns is off by default and has to be ticked deliberately.
Using the API
Scopes
A key carries only the permissions you gave it, and they are checked on every request. Pick the narrowest set that does the job — a key that only exports should not be able to spend credits.
| Scope | Grants | On by default |
|---|---|---|
leadgen:read | Read lists, contacts, companies, search results and credit activity | Yes |
leadgen:write:search | Run people and company searches; create and edit lists and folders | Yes |
leadgen:write:enrich | Reveal emails and phones, scrape profiles — the scope that spends credits | Yes |
leadgen:export | Download CSV and XLSX exports | Yes |
leadgen:write:campaigns | Send campaigns — anything that can put mail in front of a real person | No |
A call outside a key's scopes returns 403 naming the one it needed, so you never have to guess which permission to add.
What a key can never do
Account management is not scopable, and every key is refused with 403 session_required: issuing or revoking API keys, deleting the account, revoking sessions, adding or removing teammates, and starting a card payment. Those happen in the web app, signed in. A key cannot widen itself.
Using the API
Find people at a company
The flow most integrations start with. It is two calls, not one: the search runs the query and files the results, then you read the people back. The search response deliberately carries a count rather than the rows, so paging through a large company does not mean re-sending everything you already have.
Search
POST /api/search/people with a company_name. Free. Returns a job_id, a list_id and how many people that page added.
Read
GET /api/search/{job_id}/results. Free. Returns the contacts — names, titles, LinkedIn URLs, company domain.
Reveal
POST /api/contacts/{id}/reveal-email or /get-phone with an id from step 2. This is the step that costs credits.
# 1. Search — free, returns a job_id and how many people it found curl -X POST https://leadgencopilot.ai/api/v1/search/people \ -H "Authorization: Bearer lgpat_your_key" \ -H "Content-Type: application/json" \ -d '{"company_name": "Notion", "page": 1}' # -> { "job_id": "ec8254b7-...", "list_id": "988b71b2-...", "count": 25, "has_more": true } # 2. Read the people back — free curl https://leadgencopilot.ai/api/v1/search/ec8254b7-.../results \ -H "Authorization: Bearer lgpat_your_key" # -> { "count": 25, "contacts": [ { "id": "b2868147-...", "name": "Aditi Pareek", ... } ] } # 3. Reveal one of them — 2 credits for an email, 5 for a mobile curl -X POST https://leadgencopilot.ai/api/v1/contacts/b2868147-.../reveal-email \ -H "Authorization: Bearer lgpat_your_key" # -> { "email": "a.pareek@example.com", "email_status": "valid", "credits": 1852 }
Paging through a big company
One call fetches one provider page — 25 people. For page 2, send the same filters again plus the job_id and list_id you were given, and the new rows accumulate into the same search and the same list. Stop when has_more is false. Sending the filters without the ids starts a second, unrelated search.
Using the API
Credits
Searching is free. Contact details are not — and a lookup that finds nothing is not charged.
| Action | Cost | Charged when |
|---|---|---|
| People or company search | Free | Never |
| Reading results, lists, companies | Free | Never |
| LinkedIn count and capabilities | Free | Never |
| Full LinkedIn profile scrape | 0.2 profile | Reserved up front, refunded per profile that comes back empty |
| Email reveal | 2 email | Only when an address is found |
| Phone reveal | 5 phone | Only when a number is found |
Running short returns 402 naming the credit type. Every reveal response echoes the balance that remains, so a script can throttle itself without a second call, and GET /api/payment/credit-activity is the itemised ledger — which key spent what, on which contact. A contact you have already paid for is free forever after and comes back with cached: true.
Using the API
Errors
Every failure is JSON with an error field. The status tells you whether to fix the request, the key, the balance, or to retry.
| Status | Meaning | What to do |
|---|---|---|
| 400 | The body failed validation | error names the field |
| 400 | A search page asked for out of order | load page N+1 only after page N has answered |
| 401 | Key missing, malformed, revoked or expired | check the Authorization header, then the key in Settings |
| 402 | Not enough credits for that action | top up on the Credits page; the message says how many it needs |
| 403 | Key is missing a scope, or the route is session-only | add the scope in required_scope, or use the web app |
| 404 | No such record — or no such route | for an unknown route the body names the method and path you sent, and docs links the reference |
| 409 | strict_filters refused a degraded search | drop the filter named in unsupported_filters |
| 409 | That search page is already loading, or an Idempotency-Key was reused | wait for the first request; use a new key for a different body |
| 429 | Over an hourly limit | wait Retry-After seconds; X-RateLimit-Remaining shows what is left |
| 503 | Search is busy or briefly unavailable — nothing was charged | wait Retry-After seconds and send the same request again |
| 413 | The export is too large for XLSX | ask for format=csv instead |
| 500 | A bug on our side — nothing was charged | retry later; tell us if it repeats |
| 502 | An upstream service answered with an error — nothing was charged | retry with backoff |
| 504 | The provider did not answer in time — nothing was charged | retry the same request |
A 404 on a route you believe exists is usually the verb — the body names the method and path that did not match. A 401 means the credential, never the URL.
Using the API
Rate limits
10,000 requests per hour per key by default, settable per key when you create it. Each key is throttled on its own, so a runaway integration cannot starve the others.
{ "error": "This API key has exceeded its limit of 10000 requests per hour", "limit": 10000 }
A few endpoints carry a tighter limit on top: people search is 300 per hour per account, profile scrapes 5,000, single reveals 100, and the company pipeline 10 per hour per IP. The counters are hourly windows, so retry with exponential backoff rather than tight polling.
API reference
Every endpoint below was called against production while writing this page — the responses are real, with one person's email and phone number replaced. The complete machine-readable surface is at https://leadgencopilot.ai/api/v1/openapi, browsable at /docs. Both are public and need no key.
Account
Who am I
/api/v1/users/meno scopeConfirms a key is live and returns the account it belongs to, along with the one credit balance every search, lookup and reveal draws from. The one endpoint that needs no scope — a key narrowed to a single permission still has to be able to identify itself. Use it as your integration's health check.
curl https://leadgencopilot.ai/api/v1/users/me \ -H "Authorization: Bearer lgpat_your_key"
credits is the one balance everything draws from; credit_costs is the price of each kind of action. credits_email, credits_phone, credits_search and credits_profile are derived (credits divided by that cost, rounded down) and kept for older clients.
{ "user_id": "wc7R4W3HRaAFKbqgu5vm", "email": "you@example.com", "plan": "pro", "team_id": "ee138fa8-4232-4bea-b4f0-38522033142b", "credits": 1856, "credit_costs": { "search": 1, "profile": 1, "email": 2, "phone": 5, "company": 1, "signal": 1, "ai": 1 }, "credits_email": 928, "credits_phone": 371, "credits_search": 1856, "credits_profile": 1856 }
Search
Find people at a company
/api/v1/search/peopleleadgen:write:searchSend a company, get the people who work there. Costs 1 credit per page, refunded when the page is empty. Runs one provider page — 25 people — synchronously and files them into a new list. Without max_results the answer carries counts only, no people: read the rows back with the results endpoint below, or send max_results to get the page's first N inline as contacts.
Body
namestringcompany_namestringrolesstring[]locationstringindustriesstring[]company_hq_locationstring[]pagenumberjob_idstringlist_idstringreveal_emailsbooleanmax_resultsnumberexact_titlebooleanHeaders
Idempotency-KeystringTo go deeper, send the same filters again with page: 2 plus the job_id and list_id you got back — results accumulate into the same list instead of starting a new search. Stop when has_more is false.
curl -X POST https://leadgencopilot.ai/api/v1/search/people \ -H "Authorization: Bearer lgpat_your_key" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: 6f1c2a52-0b7e-4d0e-9a51-3f0f6a3c2d11" \ -d '{ "company_name": "Notion", "roles": ["Customer Success Manager"], "page": 1 }'
company_name is the search's label: the name you searched for, else the company, else “across all companies”. count is this page; total is every match across all pages. total is null when the provider doesn't report one — treat count plus has_more as a lower bound in that case. ignored_filters lists filters the active search system can't apply, so the results are broader than you asked; approximated_filters lists filters matched in its nearest terms. Check both before treating the results as exact.
{ "job_id": "ec8254b7-9ec7-4346-8b16-325401500a89", "list_id": "988b71b2-d627-4bb2-a358-ac24a78788c4", "company_name": "Notion", "page": 1, "has_more": true, "count": 25, "total": 1432, "ignored_filters": [], "approximated_filters": [] }
Search
Find companies
/api/v1/search/companiesleadgen:write:searchSearch the company directory rather than the people in it. Costs 1 credit per page of results, refunded when the page is empty, and writes nothing — no job and no list, so there is no id to read back. Take a domain from the results into the people search to get its contacts.
Body
company_namestringindustriesstring[]hq_locationstring[]pagenumberAny field can come back null — the provider's coverage varies by company, and size in particular is often missing for private companies.
curl -X POST https://leadgencopilot.ai/api/v1/search/companies \ -H "Authorization: Bearer lgpat_your_key" \ -H "Content-Type: application/json" \ -d '{ "company_name": "stripe.com", "page": 1 }'
{ "page": 1, "count": 1, "total": 1, "has_more": false, "companies": [ { "id": "1043takN2p", "name": "Stripe", "domain": "stripe.com", "industry": "Financial Services", "location": "South San Francisco, California", "size": 8000, "linkedin_url": "https://www.linkedin.com/company/stripe", "logo_url": null } ] }
Search
Read the people back
/api/v1/search/{id}/resultsleadgen:readThe rows the search collected. Free, and safe to call repeatedly — call it again after each page to see what that page added. Take each contact's id into the reveal endpoints.
null in email or phone_number means the value is not visible to you — not that LeadGen has none. A search pays for the page of people, not their contact details; reveal a contact to get its email or phone (a repeat reveal of one you already revealed is free). Fields the provider did not supply — linkedin_url, domain, location — also come back null rather than being omitted.
curl https://leadgencopilot.ai/api/v1/search/ec8254b7-9ec7-4346-8b16-325401500a89/results \ -H "Authorization: Bearer lgpat_your_key"
{ "job_id": "ec8254b7-9ec7-4346-8b16-325401500a89", "count": 25, "contacts": [ { "id": "b2868147-b702-4fb1-97d0-25cfa9d261a8", "name": "Aditi Pareek", "first_name": "Aditi", "last_name": "Pareek", "title": "Enterprise Customer Success Manager", "role_category": "Manager", "seniority": "Manager", "department": "Customer Service", "linkedin_url": null, "profile_image_url": "https://media.licdn.com/dms/image/...", "location": null, "company": "notion", "domain": null, "industry": null, "revenue": null, "email": null, "email_status": null, "confidence": null, "phone_number": null, "phone_status": null } ] }
Search
Company pipeline search
/api/v1/searchleadgen:write:searchThe deeper, asynchronous alternative to people search: takes a company name or its LinkedIn URL, works the company over in the background, and files results into the same shape. Costs 1 credit per 25 contacts: it holds 1 per 25 of max_contacts before it starts, keeps 1 per 25 it returned and refunds the rest. Returns 202 immediately; poll GET /api/search/{id} until status is completed, then read the results endpoint above.
Body
company_namestringlinkedin_company_urlstringrolesstring[]max_contactsnumberfiltersobjectforce_refreshbooleanreveal_emailsbooleanHeaders
Idempotency-Keystringcurl -X POST https://leadgencopilot.ai/api/v1/search \ -H "Authorization: Bearer lgpat_your_key" \ -H "Content-Type: application/json" \ -d '{ "company_name": "Stripe", "roles": ["VP Sales"], "max_contacts": 50 }'
{ "job_id": "355989f1-402f-4be1-bec8-d580b3f731b5", "status": "queued", "company_name": "Stripe" }
Search
Companies you already have
/api/v1/contacts/companiesleadgen:readEvery company with at least one contact in your account, deduped across every search you have run, with counts of how many of those contacts have an email you can see. Reads your own data — no provider call, no credits. Pair it with /api/contacts/companies/{companyId}/contacts to pull the people back out.
Query
qstringlimitnumbercurl "https://leadgencopilot.ai/api/v1/contacts/companies?q=stripe&limit=5" \ -H "Authorization: Bearer lgpat_your_key"
has_more is true when more companies match than limit returned — narrow with q or raise limit. contacts_with_email counts emails visible to you among a company's newest 1,000 emailed contacts; past that it is a floor and contacts_with_email_capped is true.
{ "count": 2, "companies": [ { "id": "32022c09-8d05-4190-962a-204b1a282070", "name": "stripe", "domain": "stripe.com", "logo_url": "https://leadgencopilot.ai/api/company-logo/stripe.com", "linkedin_url": "https://www.linkedin.com/company/stripe/", "total_contacts": 614, "contacts_with_email": 30, "contacts_with_email_capped": false, "latest_job_id": "29b2a1a1-85b9-4184-961e-f541d90f02bd", "latest_job_created_at": "2026-07-28 18:47:16.009283+00" } ], "has_more": false }
Reveal
Reveal an email
/api/v1/contacts/{id}/reveal-emailleadgen:write:enrichRuns a waterfall across providers until one returns a verified work address. Synchronous and typically takes five to fifteen seconds. Costs 2 credits, and only when a verified address comes back — a catch-all or unverified guess is refused and free.
Path
iduuidrequiredBody
force_refreshbooleanemail_status is "valid" when the address was verified deliverable, "unknown" when a provider returned it without verifying, "cached" when you already see it (free, no provider asked), "not_found" on a miss, and "provider_error" when our provider account is down (refunded and not remembered — retry later). A miss is remembered for 14 days: asking again inside that window answers not_found free, with cached: true and checked_at, until you send force_refresh: true. cached: true on a found address means you have already paid for this contact and it is free from now on. Only work addresses are returned — if no company address exists the waterfall stops rather than falling back to a personal mailbox.
curl -X POST \ https://leadgencopilot.ai/api/v1/contacts/b2868147-b702-4fb1-97d0-25cfa9d261a8/reveal-email \ -H "Authorization: Bearer lgpat_your_key"
{ "contact_id": "b2868147-b702-4fb1-97d0-25cfa9d261a8", "email": "a.pareek@example.com", "email_status": "valid", "email_source": "leadgen", "cached": false, "credits": 1852 }
Reveal
Reveal a personal email
/api/v1/contacts/{id}/reveal-personal-emailleadgen:write:enrichFinds the consumer mailbox — gmail, outlook, icloud — rather than the company address. A separate paid lookup from the work reveal, not a fallback for it. Costs 2 credits from the same balance, and only when an address comes back.
Path
iduuidrequiredBody
force_refreshbooleanThis and the work reveal are two different products, billed and cached separately: paying for one does not make the other free, and neither falls back to the other. Asking here will never hand back a company address, exactly as /reveal-email will never hand back a personal one. personal_email_status reads "valid" when the provider verified the mailbox and "unknown" when it returned the address without verifying. cached: true means you have already paid for this contact's personal address and it is free from now on. Only one provider answers this lookup, so it is usually faster than a work reveal — a few seconds rather than up to fifteen.
curl -X POST https://leadgencopilot.ai/api/v1/contacts/b2868147-b702-4fb1-97d0-25cfa9d261a8/reveal-personal-email -H "Authorization: Bearer lgpat_your_key"
{ "contact_id": "b2868147-b702-4fb1-97d0-25cfa9d261a8", "personal_email": "a.pareek@gmail.com", "personal_email_status": "valid", "cached": false, "credits": 1848 }
Reveal
Reveal a phone number
/api/v1/contacts/{id}/get-phoneleadgen:write:enrichThe same shape and the same rules as the email reveal, against the phone-number providers. Pick the product with phone_type — a direct mobile (the default) or a business line. Costs 5 credits, and only when a number comes back.
Path
iduuidrequiredBody
phone_type"mobile" | "business"force_refreshbooleanNumbers come back in E.164. phone_type in the response says which product the number is: a stored number of one type is never returned for a request for the other, and buying one product never shows you the other free — each is its own reveal. A miss costs nothing. Both reveal responses echo the balance that remains, so a script can throttle itself without a second call.
curl -X POST \ https://leadgencopilot.ai/api/v1/contacts/b2868147-b702-4fb1-97d0-25cfa9d261a8/get-phone \ -H "Authorization: Bearer lgpat_your_key" \ -H "Content-Type: application/json" \ -d '{ "phone_type": "mobile" }'
{ "contact_id": "b2868147-b702-4fb1-97d0-25cfa9d261a8", "phone_number": "+14155550142", "phone_status": "found", "phone_source": "leadgen", "phone_type": "mobile", "cached": false, "credits": 1843 }
Reveal
Reveal a batch
/api/v1/contacts/batch-reveal-emailsleadgen:write:enrichEmails for an explicit set of contacts in one response. /api/contacts/batch-get-phones is identical for numbers. Both are synchronous — for a whole list, use the asynchronous reveal job below instead, because a large batch will outlive the request timeout.
Body
contact_idsuuid[]requiredforce_refreshbooleancurl -X POST https://leadgencopilot.ai/api/v1/contacts/batch-reveal-emails \ -H "Authorization: Bearer lgpat_your_key" \ -H "Content-Type: application/json" \ -d '{"contact_ids": ["b2868147-...", "1fb5f36f-..."]}'
{ "revealed": 2, "not_found": 0, "credits": 1844, "results": [ { "contact_id": "b2868147-b702-4fb1-97d0-25cfa9d261a8", "email": "a.pareek@example.com", "email_status": "valid", "cached": false } ] }
Reveal
Reveal a whole list
/api/v1/reveal-jobsleadgen:write:enrichCreates a background job that works through a list, a search, a company or a set of contacts, so you are not holding a connection open. Contacts whose email is already known come back at once in cached; the rest become the job. Poll GET /api/reveal-jobs/{id} until it completes, read GET /api/reveal-jobs/{id}/items for the per-contact outcome, and stop it early with POST /api/reveal-jobs/{id}/cancel (the unused credits come back).
Body — exactly one scope
list_iduuidjob_iduuidcompany_iduuidcontact_idsuuid[]Body — options
max_creditsnumberforce_refreshbooleanHeaders
Idempotency-KeystringCredits are reserved up front (2 per contact the balance covers) and the unused part is refunded when the job ends. There is no GET /api/reveal-jobs collection endpoint, but GET /api/reveal-jobs/active?list_id={id} (or job_id, company_id) returns the job currently running for that scope (or one that finished in the last couple of minutes) as { "job": … }, or { "job": null }. Starting a second reveal for a list that already has one running does not create or charge a new job: the response carries "already_running": true and the existing reveal_job_id. Contacts whose address you already own come back free and are never re-charged.
curl -X POST https://leadgencopilot.ai/api/v1/reveal-jobs \ -H "Authorization: Bearer lgpat_your_key" \ -H "Content-Type: application/json" \ -d '{"list_id": "988b71b2-d627-4bb2-a358-ac24a78788c4"}'
total is what the job will work through; cached were answered in this response. reveal_job_id is null when nothing was left for a provider to do. skipped_unrevealable have no LinkedIn profile and no company domain to search with; skipped_recent_miss missed in the last 14 days; skipped_no_credits did not fit the balance.
{ "reveal_job_id": "7c1e0b44-2f9d-4a6e-9f3b-8d2a1c5e4f70", "already_running": false, "total": 22, "cached": [ { "contact_id": "b2868147-b702-4fb1-97d0-25cfa9d261a8", "email": "a.pareek@example.com", "email_status": "valid", "email_source": "leadgen", "cached": true } ], "skipped_unrevealable": 1, "skipped_in_flight": 0, "skipped_recent_miss": 1, "skipped_no_credits": 0 }
Lists
List your lists
/api/v1/listsleadgen:readYour lead lists, the most recently changed first, one page at a time. Follow next_cursor until it comes back null.
Query
limitnumbercursorstringqstringcurl "https://leadgencopilot.ai/api/v1/lists?limit=100" -H "Authorization: Bearer lgpat_your_key"
next_cursor is null on the last page. contacts_with_email and contacts_with_phone are null on a list someone shared with you: only the owner sees those counts.
{ "count": 100, "lists": [ { "id": "988b71b2-d627-4bb2-a358-ac24a78788c4", "name": "Notion", "total_contacts": 25, "contacts_with_email": 3, "contacts_with_phone": 0 } ], "next_cursor": "eyJhdCI6IjIwMjYtMTEtMDJUMTA6MDA6MDBaIiwiaWQiOiI5ODhiNzFiMiJ9" }
Lists
Read a list
/api/v1/lists/{listId}leadgen:readThe list and one page of its contacts. Note there is no GET /api/lists/{listId}/contacts — that path exists only for POST and DELETE, and a GET against it returns 404.
Query
limitnumbercursorstringpagenumberoffsetnumbersort"added_at" | "name" | "company" | "title" | "score"direction"asc" | "desc"qstringemail / phone"all" | "present" | "missing"company / title / locationstringmin_scorenumberfiltersJSON stringcurl https://leadgencopilot.ai/api/v1/lists/988b71b2-d627-4bb2-a358-ac24a78788c4 \ -H "Authorization: Bearer lgpat_your_key"
email or phone_number null means it is not visible to you, not that none exists — reveal the contact to get it. cells holds the list's custom column values by column id (GET /api/lists/{listId}/columns names them); personal_email appears when visible. With filters, total stops counting at 10,000 and total_capped is true. next_cursor is null on the last page. sort_window is set (10000) when a non-default sort ranked only the list's newest 10,000 contacts. The list's contacts_with_email / contacts_with_phone are null unless you own the list.
{ "list": { "id": "988b71b2-d627-4bb2-a358-ac24a78788c4", "name": "Notion", "description": null, "color": "#6366f1", "source_job_id": "ec8254b7-9ec7-4346-8b16-325401500a89", "created_at": "2026-08-07T18:03:13.655Z" }, "contacts": [ { "id": "b2868147-b702-4fb1-97d0-25cfa9d261a8", "name": "Aditi Pareek", "email": null, "email_status": null, "phone_number": null, "cells": { "4f0c2b8e-...": "Series B" } } ], "total": 25, "total_capped": false, "next_cursor": "eyJhdCI6IjIwMjYtMDgtMDdUMTg6MDM6MTNaIiwiaWQiOiJiMjg2In0", "sort_window": null, "page": 1, "pageSize": 20 }
Lists
Export a list
/api/v1/lists/{listId}/exportleadgen:exportDownloads the list as a file rather than JSON. Default columns: Name, First Name, Last Name, Company, Job Title, Department, Website, Industry, Revenue, Location, Email, Email Status, Personal Email, Phone, LinkedIn — then each custom column under its own name. Values you may not see export blank.
Query
format"csv" | "xlsx"columnsstringsort"added_at" | "name" | "company" | "title" | "score"direction"asc" | "desc"curl "https://leadgencopilot.ai/api/v1/lists/988b71b2-.../export?format=csv" \ -H "Authorization: Bearer lgpat_your_key" -o leads.csv
text/csv, as an attachment — not JSON.
Name,First Name,Last Name,Company,Job Title,Department,... "Andrew Lam","stripe","Engineer","Engineering and Technical",...
What the backend supports
/api/v1/linkedin/capabilitiesleadgen:readCall this first. It tells you which filters are applied at the source, which are approximated, and what each phase costs. LeadGen may update the active search system, so refresh this response before building a search request.
native means it is applied at the source, before a row is ever collected — those results already match. emulated means LeadGen makes it mean something with a bounded post-response step. unsupported means it will not narrow the search at all, and strict_filters:true will reject the request. The returned count.free and preview.free flags are authoritative. verified_after_scrape is the separate promise: those filters are re-checked against the full record once you scrape, with a pass/fail/not_evaluated reason per person.
curl https://leadgencopilot.ai/api/v1/linkedin/capabilities \ -H "Authorization: Bearer lgpat_your_key"
{ "provider": "leadgen", "profile_provider": "leadgen", "filters": { "native": ["locations", "company_name", "job_titles", "seniority_keywords", "industries", "company_hq_locations", "min_years_experience", "keywords"], "emulated": ["exclude_job_titles", "skills", "schools"], "unsupported": ["name", "max_years_experience", "company_sizes"], "verified_after_scrape": ["job_titles", "exclude_job_titles", "seniority_keywords", "min_years_experience", "max_years_experience", "skills", "schools", "keywords", "locations", "company_name", "industries", "name"] }, "count": { "supported": true, "exact": true, "free": true }, "preview": { "supported": true, "max": 50, "free": true, "typical_latency_ms": 1500 }, "limits": { "max_results_per_search": 1000, "max_scrape_per_job": 1000 }, "credits": { "profile": 1, "email": 2, "phone": 5 }, "requires_at_least_one_of": [] }
Search LinkedIn
/api/v1/linkedin/searchleadgen:write:searchStarts a filtered people search through LeadGen. Returns 202 with a job_id and a list_id; poll GET /api/linkedin/search/{jobId}. LeadGen pins the search system to the job. Costs 1 credit per 25 people found (rounded up); scraping full profiles is the separate call below, 1 credit per profile.
Body — filters applied at the source
job_titlesstring[]seniority_keywordsstring[]min_years_experiencenumberlocationsstring[]company_namestringindustriesstring[]company_hq_locationsstring[]keywordsstring[]Body — filters approximated or deferred
exclude_job_titlesstring[]skillsstring[]schoolsstring[]max_years_experiencenumbercompany_sizesstring[]Body — the run
max_resultsnumberlist_namestringlist_iduuidauto_scrapebooleanstrict_filtersbooleanAlways read unsupported_filters — anything listed there did not narrow the search, so the results are broader than the filters you sent. With strict_filters:true, unsupported filters return 409 instead. The same list comes back on the status endpoint. LeadGen may apply a result ceiling based on the active search configuration. The API path and request shape stay the same when the configuration changes.
curl -X POST https://leadgencopilot.ai/api/v1/linkedin/search \ -H "Authorization: Bearer lgpat_your_key" \ -H "Content-Type: application/json" \ -d '{ "job_titles": ["CEO"], "company_name": "stripe.com", "locations": ["United States"], "industries": ["SaaS"], "max_results": 25, "strict_filters": true }'
{ "job_id": "4b1a7c90-...", "list_id": "e91f2d33-...", "status": "queued", "provider": "leadgen", "applied_filters": ["locations", "company_name", "job_titles", "industries"], "unsupported_filters": [], "max_results": 200, "poll": "/api/linkedin/search/4b1a7c90-..." }
Scrape the full profiles
/api/v1/linkedin/scrapeleadgen:write:enrichFetches the complete LinkedIn record for the people a search found. 1 credit each, reserved before the job starts and refunded per profile that cannot be fetched. Contacts already scraped are skipped unless you pass force_refresh.
Body — pick exactly one selector
job_iduuidlist_iduuidcontact_idsuuid[]linkedin_urlsstring[]Body — options
max_itemsnumberforce_refreshbooleanlist_namestringExactly one of job_id, list_id, contact_ids or linkedin_urls — two selectors would make the credit estimate a guess, and the point of the 202 is that it states the cost up front. total is what will actually be fetched: people with no LinkedIn URL on file are reported as skipped_no_linkedin_url rather than silently dropped, so check that field if the count is lower than you expected. Poll GET /api/linkedin/scrape/{scrapeJobId} every few seconds and read the results back with GET /api/linkedin/search/{jobId}/results (50 per page by default, limit up to 200; with include=profile at most 25), and match=matches_filters for the people whose profile met the filters — any other match value is a 400. profile is the raw provider payload whose shape can change; normalized is the stable projection to build against.
curl -X POST https://leadgencopilot.ai/api/v1/linkedin/scrape \ -H "Authorization: Bearer lgpat_your_key" \ -H "Content-Type: application/json" \ -d '{"job_id": "4b1a7c90-...", "max_items": 200}'
{ "scrape_job_id": "aa20fd51-...", "status": "queued", "provider": "leadgen", "total": 187, "skipped_no_linkedin_url": 13, "skipped_already_scraped": 0, "truncated": false, "credits_reserved": 187, "credits_remaining": 1657, "poll": "/api/linkedin/scrape/aa20fd51-..." }
Read a scraped profile
/api/v1/linkedin/profiles/{contactId}leadgen:readReturns a profile you have already scraped. Reads from cache only and never spends a credit — if the contact has not been scraped it answers 409 rather than quietly fetching and billing you. Every response carries both shapes: profile is the provider's record verbatim, normalized is the projection this API keeps stable.
Read is_current, not end_date, to find someone's present role — the provider writes the literal string "Present" there, never null, so an `end_date === null` check never matches. Several roles at one employer arrive from the provider grouped under a single entry whose own dates are absent; positions[] flattens them into one row per role, so a 22-year tenure recorded as two promotions appears as two dated rows rather than one undated one. total_experience_months merges overlapping spans instead of summing them — concurrent roles, advisory seats and a promotion logged twice would otherwise inflate a 22-year career into 40. skills is currently always empty: the person dataset does not return a skills array, and it is left empty rather than guessed at from the About text. education, certifications, languages and positions are always arrays, never null — an empty one means the profile had none. The provider also returns honors_and_awards, volunteer_experience, projects, courses, publications, recommendations, posts and activity; those are not in normalized yet and are available on profile.
curl https://leadgencopilot.ai/api/v1/linkedin/profiles/b2868147-... \ -H "Authorization: Bearer lgpat_your_key"
{ "contact_id": "b2868147-...", "linkedin_url": "https://www.linkedin.com/in/sundarpichai", "scraped_at": "2026-08-14T09:12:04.552Z", "email": "s.pichai@example.com", "phone_number": null, "normalized": { "full_name": "Sundar Pichai", "headline": "CEO at Google", "about": "…", "location": "Mountain View", "city": "Mountain View, California, United States", "country_code": "US", "profile_image_url": "https://media.licdn.com/…", "linkedin_url": "https://www.linkedin.com/in/sundarpichai", "connections": 500, "followers": 1204533, "current_position": { "title": "CEO", "company_name": "Google", "company_linkedin_url": "https://www.linkedin.com/company/google", "location": "Mountain View", "start_date": "2015", "end_date": null, "is_current": true, "duration": null, "description": null }, "current_company_industry": "Software Development", "positions": [ { "title": "CEO", "company_name": "Google", "company_linkedin_url": "https://www.linkedin.com/company/google", "location": null, "start_date": "2015", "end_date": "Present", "is_current": true, "duration": null, "description": null }, { "title": "Product Management + Leadership", "company_name": "Google", "company_linkedin_url": "https://www.linkedin.com/company/google", "location": null, "start_date": "Apr 2004", "end_date": "2015", "is_current": false, "duration": null, "description": null } ], "education": [ { "school": "Stanford University", "degree": "MS, Material Sciences", "start_year": "1993", "end_year": "1995", "url": "https://…" } ], "certifications": [ { "title": "…", "issuer": "…", "issued": "…", "credential_url": null } ], "languages": [ { "name": "English", "proficiency": "Native" } ], "skills": [], "total_experience_months": 269, "estimated_years_experience": 22 }, "profile": { "…": "the provider's record, verbatim — shape may change" } }
Look up a profile by URL
/api/v1/contacts/profileleadgen:write:enrichResolves any LinkedIn profile URL to a full profile and a contact you can save. Costs 1 credit, once per person: a profile you (or a teammate sharing a list that holds the person) already bought is free. charged in the response says whether this call paid.
Body
linkedin_urlstringrequiredcache_onlybooleancheckbooleanreveal_emailbooleanreveal_phonebooleanphone_type"mobile" | "business"force_refreshbooleancurl -X POST https://leadgencopilot.ai/api/v1/contacts/profile \ -H "Authorization: Bearer lgpat_your_key" \ -H "Content-Type: application/json" \ -d '{ "linkedin_url": "https://www.linkedin.com/in/sundarpichai" }'
cached true with charged true: the profile was stored, but this was your first time opening it.
{ "contact_id": "b2868147-b702-4fb1-97d0-25cfa9d261a8", "linkedin_url": "https://www.linkedin.com/in/sundarpichai", "cached": true, "charged": true, "full_name": "Sundar Pichai", "email": null, "phone_number": null, "phone_type": null, "profile": { "…": "the provider's record" }, "credits": 1842 }
Credits
Credit ledger
/api/v1/payment/credit-activityleadgen:readOne entry per action, newest first: what it was, on which contact and list, and how much of it came back. The endpoint to reconcile against when a bill looks wrong. Page with next_cursor; filter with type, from, to and list_id.
Query
typestringfrom / toYYYY-MM-DDlist_iduuidlimitnumbercursorstringA key cannot buy credits — topping up is session-only, in the web app.
curl "https://leadgencopilot.ai/api/v1/payment/credit-activity?limit=50" \ -H "Authorization: Bearer lgpat_your_key"
amount is the net change to the balance — negative for a charge, 0 for one handed back in full, whose refunded_amount says how much came back. status is reserved, burned, refunded, granted, reset or adjusted. Descriptions never name the prospect; contact_name and list_name link the entry to your data. next_cursor is null on the last page.
{ "count": 2, "activity": [ { "id": "3d0f9a61-6c1e-4f43-9a0e-2b7f4c1d8e55", "created_at": "2026-08-07T18:31:44.201Z", "credit_type": "phone", "status": "burned", "amount": -5, "refunded_amount": 0, "description": "Phone reveal", "source": "api", "list_id": "988b71b2-d627-4bb2-a358-ac24a78788c4", "list_name": "Notion", "contact_name": "Aditi Pareek" }, { "id": "8a42c7d0-1b9e-4d6a-a3f5-6e0c9b2d4f17", "created_at": "2026-08-07T18:29:02.884Z", "credit_type": "email", "status": "refunded", "amount": 0, "refunded_amount": 2, "description": "Email lookup", "source": "api", "list_id": null, "list_name": null, "contact_name": "Aditi Pareek" } ], "next_cursor": "eyJhdCI6IjIwMjYtMDgtMDdUMTg6Mjk6MDJaIiwiaWQiOiI4YTQyIn0" }