search_leads
Search local-business leads
Run a live search for local businesses by niche + city (e.g. query 'electrician', location 'Austin, TX'). Returns a search_id and, usually, the first batch immediately (its listings are in `results`; their emails and phones are not verified yet — when discovery is 'in_progress' the provider was slow and the whole search was queued, so the leads arrive through get_search_results); more results are found and verified in the background — every email is SMTP-checked and phones are verified with line type + carrier. Spends 1 lead per result. Poll get_search_results until enrichment is 'complete'. If enrichment is already 'complete', nothing was found and nothing more is coming; if capped is true, the balance covered fewer leads than were found. With country, a US territory (PR, GU, VI, AS, MP) is searched; max_leads stops it early and exact_category keeps only that Google category. For many keywords or places at once, use run_advanced_search.
Parametersqueryrequiredcountrylocationmax_leadslocation_codeexact_category
get_search_results
Get search results
Fetch a search's leads with verification filled in as enrichment progresses. Poll until enrichment is 'complete'. Each lead includes verified emails (SMTP status), verified phones (line type + carrier), owner name where identified, socials, and the business profile.
Parameterslimitoffsetsearch_idrequired
enrich_domains
Enrich business domains
Already have businesses? Pass up to 10 website domains to run the full enrichment + verification pipeline on them (verified emails + phones, owner name, socials). Costs 1 lead per distinct domain — spellings of the same site (acme.com, www.acme.com, https://acme.com/contact) count once. Returns a search_id to poll with get_search_results. US businesses only for now: their phones are read as US numbers.
Parametersdomainsrequired
query_leads
Query the lead library
Search ALL leads the account has ever collected (across every search) with filters and sorting — no new search is run and no leads are spent. A Google listing found more than once appears once, with its most recent data. Up to 1,000 leads per call (default 25). When next_cursor is set, call again with cursor = next_cursor for the next page: the cursor carries its filters and sort, so it can be sent alone. Pass search_id to query one search's leads instead of the whole library. Example — plumbers in Austin rated 4.5 or higher with a safe email, most-reviewed first: filters=[{field:'category',operator:'contains',value:'plumb'},{field:'city',operator:'is',value:'Austin',conj:'and'},{field:'rating',operator:'gte',value:'4.5',conj:'and'},{field:'email_status',operator:'is',value:'safe',conj:'and'}], sort=[{id:'reviews',dir:-1}]. A field, operator or value the tool cannot use comes back as an error that names it and lists what works. Pass campaign_id instead of search_id to query one advanced search's leads.
Parameterssortlimitcursorfilterssearch_idcampaign_id
export_leads
Export leads to a destination
Push leads into a connected destination: 'close' (CRM — uses the account's saved field mapping), 'ghl' (GoHighLevel sub-account), 'google_sheets' (new spreadsheet, or pass spreadsheet_id for one LeadMarina created before), or a file — 'csv' | 'xlsx' | 'json' (a 7-day download link, also emailed to the account owner when the file is small enough to attach). Exports EITHER one search's leads (pass search_id) or the whole library (set all=true). Either can be narrowed with the same filter rows as query_leads — with search_id they apply within that search. Leads go out best-ranked first (rank, then id), the order of the leads table. LIMITS PER CALL, which differ by destination because CRMs take one API call per lead: csv/xlsx 50,000 · json 25,000 · google_sheets 5,000 · close/ghl 1,000. For a big library going to a CRM, export csv and import the file instead. If more leads match than the limit, the response sets truncated=true and returns next_cursor — relay that to the user, the export was partial; to send the next batch, call export_leads again with the SAME destination, search_id or all, and filters, plus cursor=next_cursor. A next_cursor with not_sent means the destination's time limit cut this batch short: the same call with that cursor sends the rest. An all=true export spread over several calls reads the library live, so a lead that a search running between calls finds again can be skipped or sent twice; for one consistent copy, export the library in a single csv/xlsx (up to 50,000 leads) or json (up to 25,000) call while no search is running. Close, GoHighLevel and a LeadMarina-created sheet passed as spreadsheet_id UPDATE previously exported leads in place (matched by Google CID), never touching the user's own CRM notes/columns — unless update_existing is false (then Close skips leads it already has, and a sheet appends every row); a file or a new sheet is a fresh copy every time — so do not repeat a call that succeeded. Or pass campaign_id instead of search_id
Parametersallcursorfilterssearch_idcampaign_iddestinationrequiredsheet_titlespreadsheet_idupdate_existing
list_searches
List recent searches
The account's recent searches (id, niche, location, result count, when) — use a search_id with get_search_results or export_leads.
Parameterslimit
get_balance
Get lead balance
What the account has left, and when it resets. On a plan with a rate limit (no monthly quota) this is the leads left in the current 7-day period; on a metered plan it is the monthly allotment remaining.
Takes no parameters.
list_views
List saved views
The account's saved views from the leads table — each a named set of filters the user already built (e.g. 'Roofers with a mobile number'). Returns each view's filter conditions in the exact shape query_leads and export_leads accept, so "export my Hot Leads view to Close" works without rebuilding the filters by hand.
Takes no parameters.
list_integrations
List connected integrations
Which export destinations this account has connected (Close, GoHighLevel, Google Sheets) and whether each is ready to receive leads. Check this BEFORE export_leads or create_automation with a CRM destination — those fail if the integration isn't connected. Close with no saved field mapping sends Close's own fields (name, website, address, contact, phone, email). File destinations (csv/xlsx/json) always work and need nothing connected.
Takes no parameters.
list_automations
List scheduled searches
The account's automations — saved searches that re-run on a schedule and export themselves. Shows each one's niche, cities, cadence, destination, whether it's active, when it next runs, and how the last run went.
Takes no parameters.
create_automation
Schedule a recurring search
Create an automation: re-run a search on a schedule and send the results somewhere automatically. Pass cities as plain strings (e.g. ['Austin, TX', 'Dallas, TX']) — they're resolved for you. IT SPENDS LEADS ON EVERY RUN, one per result, so confirm the niche, cities and cadence with the user before creating one. A destination of 'close', 'ghl' or 'google_sheets' requires that integration to be connected already (Close with no saved field mapping sends Close's own fields); 'csv' | 'xlsx' | 'json' emails a file and needs nothing set up. Every city must resolve and the destination must be one of the listed values, or nothing is created and the error says what to fix. Up to 20 automations, 25 cities each. Automations search US places only for now: a city outside the US is refused. Advanced search's options (a country other than the US — a territory included — max_leads, exact_category) are refused here too.
Parameterscitiesrequiredcadencerequiredkeywordrequiredstart_atdestinationspreadsheet_id
update_automation
Pause or resume an automation
Pause an automation (active=false) so it stops running and stops spending leads, or resume it (active=true). Pausing is the safe way to stop an automation you might want back — use delete_automation only when the user wants it gone for good.
Parametersidrequiredactiverequired
delete_automation
Delete an automation
Permanently delete an automation. This cannot be undone — confirm with the user first, and prefer update_automation with active=false if they only want it to stop for now. Leads already collected by past runs are kept; only the schedule is removed.
Parametersidrequired
find_places
Find US states and places
Where an advanced search can run — the US and its territories for now. With no arguments: the US and its territories (Puerto Rico, Guam …), with their codes. With country 'US': its states and their codes. With q: US places whose name contains q, with their codes and states — for run_advanced_search's places, or search_leads' location_code.
Parametersqcountry
estimate_advanced_search
Estimate an advanced search
What an advanced search (many keywords across many places) would find and how long it would take — without starting it or spending anything. expected_leads is the most likely number of unique leads (each business is charged once however many keywords or places find it); low–high is the range it lands in most of the time.
Parametersnameplacescountryregionskeywordsrequiredlead_capeverywhere
run_advanced_search
Run an advanced search
Start an advanced search: many keywords across many US places — the whole US, whole states or single places — run in the background in batches, each business charged once (1 lead), stopping at lead_cap if set. Estimate first with estimate_advanced_search and confirm with the user: it spends leads. Follow it with get_advanced_search; read its leads with query_leads or send them with export_leads (campaign_id). Up to 25 running or paused at once, and 40 new ones (or 250,000 searches) a day.
Parametersnameplacescountryregionskeywordsrequiredlead_capeverywhere
list_advanced_searches
List advanced searches
This account's advanced searches, newest first: status, leads so far, searches done of total.
Parameterslimit
get_advanced_search
Get an advanced search
One advanced search: status, leads so far, progress by keyword, its top places and the newest batch running now.
Parameterscampaign_idrequired
control_advanced_search
Pause, resume or stop an advanced search
action pause or stop takes effect after the batches running now (a queued batch is cancelled and refunded); resume carries on.
Parametersactionrequiredcampaign_idrequired