Count leads
POST /api/v1/leads/search
Cost: Free
Returns counts only and charges nothing. Two totals are reported because they measure different things: structured filters are counted upstream, while titles/keywords/department are applied per row and can only be sampled. Plan exports around estimated_total.
Try it
curl https://app.leadsonar.io/api/v1/leads/search \
-H "X-API-Key: $LS_KEY" \
-H "Content-Type: application/json" \
-d '{
"jobTitles": ["Head of Sales"],
"exactMatch": true,
"industry": ["Software Development"],
"companySize": ["51-200"],
"country": ["US"]
}'Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ”Lead Finder filters. Field names ignore case, _ and -, so excludeTitles, exclude_titles and Exclude-Titles are the same field. Older names also work: industryNames, countryCodes / countryCode, seniorities, companySizes, departments, revenues, companyTypes. If two spellings of one field are sent, the one listed here wins. A key that is not a filter is ignored and named in warnings (UNKNOWN_FIELD_IGNORED, with a suggestion).
object
Country as an ISO code or a name (“US”, “United States”). The source is ~99.9% US.
Free text, whole-word matched against the job title.
Matched against the company description, not the title.
Cap contacts per company.
Company type, derived from each company’s industry (the source has no ownership field). Values OR together. Public (listed) company filtering is not available yet; sending “public” or any other value returns 400 with code COMPANY_TYPE_NOT_AVAILABLE or UNKNOWN_COMPANY_TYPE.
Match jobTitles (and keywords) as whole words. Without it titles match as substrings, so “CFO” can hit unrelated titles. The app always sends true; set it yourself.
Drop anyone whose job title contains any of these terms as a whole word, ignoring case, e.g. [“intern”, “assistant”]. “intern” drops “Sales Intern” but not “International Sales Manager”.
Example
{ "jobTitles": ["Head of Sales"], "exactMatch": true, "industry": ["Software Development"], "companySize": ["51-200"], "country": ["US"]}Responses
Section titled “ Responses ”Match counts
object
Structured filters only (industry, size, country, revenue), counted upstream.
After per-row matching (titles, keywords, department, seniority). PLAN EXPORTS AROUND THIS NUMBER.
Which filter collapsed the result, when one did.
What each include-keyword cost, per term.
object
The filters as the server understood them — check this when a count looks wrong.
object
Present when the request succeeded with adjustments. UNKNOWN_FILTER_VALUE_IGNORED: industry/seniority values that matched nothing were left out (ignored lists them with suggestions); the other values in that filter were applied. When EVERY value of a filter is unknown the request fails with 400 UNKNOWN_FILTER_VALUE instead. UNKNOWN_FIELD_IGNORED: body keys that are not filters (usually a misspelling) were ignored, so the search ran without them; fields lists each with the closest accepted name in suggestion.
object
object
object
UNKNOWN_FIELD_IGNORED only.
object
Example
{ "firmographic_total": 179984, "firmographic_is_exact": true, "estimated_total": 607, "basis": "sampled", "note": "estimated_total is sampled: keyword/role/department filters are applied per row and cannot be counted upstream. Plan exports around estimated_total.", "narrowed_by": null, "keywords": null, "filters": { "industryNames": ["Software Development"], "countryCodes": ["US"], "companySizes": ["51-200"], "jobTitles": ["Head of Sales"], "exactMatch": true, "matchAny": false }}Lead source unavailable (LEADS_SOURCE_DOWN)
object
Human-readable error message
Additional details