Count matching leads (free)
count_leadsEstimate how many leads match your ideal customer profile and what pulling them would cost. Check audience size before running a paid lead search to avoid unexpected expenses.
Instructions
How many leads match an ICP, and what pulling them would cost. FREE — this call never spends credits. ALWAYS CALL THIS BEFORE search_leads: it is the only way to learn the size of an audience without paying per row, and it returns a cost estimate for the next step at this account's real rates. A realtime count is NOT free ($0.02 flat) — this tool refuses to run one unless you pass mode:"realtime" on purpose.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Data mode. "database" = cached, sub-second, cheaper, free counts, core filters only. "realtime" = live LinkedIn lookup, 5–60s, pricier, supports every filter. "auto" (default) tries database first and only escalates to realtime if a filter you passed is unsupported there — an escalation is reported in the response. Pick "database" explicitly when you only need a size estimate and cost matters more than freshness. | |
| strict | No | Fields to match strictly, e.g. ["company_locations"]. | |
| keywords | No | Free-text keywords across headline/summary/skills — realtime only: using it forces the pricier live mode. | |
| personas | No | Advanced raw persona tuples [name, functions, seniorities, prohibits, priority?] — realtime only: using it forces the pricier live mode. | |
| functions | No | Job functions, e.g. ["Sales","Marketing","Engineering"] — realtime only: using it forces the pricier live mode. | |
| job_title | No | DEPRECATED alias for job_titles. Still honoured: it is merged into job_titles. | |
| locations | No | Where the lead lives — matches cities, states and countries, e.g. ["United States","Berlin"]. | |
| company_id | No | Anchor to one company by LinkedIn numeric id. | |
| job_titles | No | Target job titles, OR-matched (e.g. ["CEO","Founder","Owner"]). A lead needs to match only one. | |
| timeout_ms | No | Request timeout in milliseconds. | |
| exclude_ids | No | Skip leads by Generect/Sales-Navigator id. Pass the ids you already received to paginate without duplicates — ordering is not stable, so this is more reliable than offset. | |
| seniorities | No | Seniority at the current employer, e.g. ["Owner","CXO","VP","Director","Manager"]. Current position only. | |
| changed_jobs | No | Only leads who recently changed jobs — realtime only: using it forces the pricier live mode. | |
| company_link | No | Anchor to one company by LinkedIn URL. | |
| company_name | No | Anchor to one company by name (exclusive with company_link/company_id). | |
| company_types | No | Employer types: "Public Company","Privately Held","Non Profit","Government Agency","Educational","Self Employed","Self Owned","Partnership". | |
| exclude_names | No | Skip leads by full name. KNOWN ISSUE: in database mode any non-empty value collapses the result set to 0 (verified 2026-08-09); it behaves correctly in realtime mode. Prefer exclude_ids, or filter names out yourself after the search. | |
| get_max_leads | No | DEPRECATED — accepted but ignored. Always on now: search responses include results_count without asking. | |
| company_filters | No | Optional: count leads only at companies matching these company filters (a two-level ICP). Still free in database mode. | |
| lead_industries | No | DEPRECATED — accepted but ignored. Removed: v1 filters on the employer's industry. Use company_industries. | |
| without_company | No | DEPRECATED — accepted but ignored. No longer needed — v1 filter-only search is the default when no company anchor is set. | |
| years_in_company | No | Time at current company, same buckets as years_in_position — realtime only: using it forces the pricier live mode. | |
| company_locations | No | HQ location of the lead's current employer. | |
| exclude_locations | No | Lead locations to exclude. | |
| filter_empty_vars | No | Drop leads where these fields are empty, e.g. ["profile_photo","job_started_on"]. Useful to raise data quality before paying. | |
| years_in_position | No | Time in current role: 1=<1y, 2=1-2y, 3=3-5y, 4=6-10y, 5=10y+ — realtime only: using it forces the pricier live mode. | |
| company_headcounts | No | Employer size buckets. Allowed ONLY: "1-10","11-50","51-200","201-500","501-1000","1001-5000","5001-10000","10 000+" (note the space in "10 000+"). | |
| company_industries | No | Industry of the current employer. Must match Generect industry names exactly (e.g. "Software Development", "Financial Services"); names are hierarchical and unknown names are rejected with HTTP 400 naming the field. | |
| past_company_names | No | Companies the lead previously worked at (alumni targeting) — realtime only: using it forces the pricier live mode. | |
| posted_on_linkedin | No | Only leads who recently posted on LinkedIn — realtime only: using it forces the pricier live mode. | |
| linkedin_filter_link | No | A LinkedIn / Sales Navigator search URL to lift filters from — realtime only: using it forces the pricier live mode. | |
| allow_unlisted_values | No | Escape hatch. This server checks industry / seniority / headcount / company-type values against the LinkedIn vocabularies before sending, because the API silently returns 0 results for an unknown industry or seniority instead of rejecting it. Set true only when you are sure a value is valid and this server is out of date. | |
| exclude_title_keywords | No | DEPRECATED — accepted but ignored. No v1 equivalent. Narrow job_titles instead, or filter the returned rows yourself. | |
| exclude_company_locations | No | Employer HQ locations to exclude. | |
| exclude_company_headcounts | No | Employer size buckets to exclude. | |
| exclude_company_industries | No | Employer industries to exclude. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fix | No | ||
| why | No | ||
| cost | No | ||
| mode | No | ||
| advice | No | ||
| status | No | ||
| options | No | ||
| test_mode | No | ||
| results_count | No | ||
| needs_realtime | No | ||
| test_mode_notice | No | ||
| next_step_estimate | No | ||
| vocabulary_warnings | No | ||
| blocked_by_vocabulary | No | ||
| deprecated_params_ignored | No |