LeadMarina is an MCP server published by com.leadmarina, hosted at leadmarina.com. When last checked on 2026-11-23 it was working: it answers and lists its tools. It declares 19 tools, including search_leads, get_search_results, enrich_domains, query_leads, export_leads.
Verified local-business leads: search by niche and US city, export to Close, GoHighLevel or Sheets.
1,149 connections through 5 shared values. Tap any node.
Squares are this server's values; dots are other servers sharing them. A shared address or publisher is a lead, not proof of a common operator.
Inferred from the host name and headers: what a server runs on, not who runs it.
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.
| Parameter | Type | Description |
|---|---|---|
| query * | string | Business niche/category keyword, e.g. 'electrician'. |
| country | string | 'US' (the default), or a US territory's code ('PR', 'GU', 'VI', 'AS', 'MP') with a place from find_places. |
| location | string | City, e.g. 'Austin, TX'. Not needed with location_code, which is always what is searched. |
| max_leads | number | Stop after this many leads: a whole number from 100 to 1,000,000. |
| location_code | integer | Optional exact location code. When given, it is what is searched, whatever location says. Sent with location, the search is named after the code's own place (or after location when the code's own name cannot be looked up); sent alone, the search is unnamed and location comes back null. A code for a … |
| exact_category | ["boolean","string"] | Only businesses whose MAIN Google category is the query's: true (the query must be a Google category, e.g. 'Plumber'), or the category's id. Runs in the background — results arrive through get_search_results. |
{
"name": "search_leads",
"title": "Search local-business leads",
"description": "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.",
"inputSchema": {
"type": "object",
"required": [
"query"
],
"properties": {
"query": {
"type": "string",
"description": "Business niche/category keyword, e.g. 'electrician'."
},
"country": {
"type": "string",
"description": "'US' (the default), or a US territory's code ('PR', 'GU', 'VI', 'AS', 'MP') with a place from find_places."
},
"location": {
"type": "string",
"description": "City, e.g. 'Austin, TX'. Not needed with location_code, which is always what is searched."
},
"max_leads": {
"type": "number",
"description": "Stop after this many leads: a whole number from 100 to 1,000,000."
},
"location_code": {
"type": "integer",
"description": "Optional exact location code. When given, it is what is searched, whatever location says. Sent with location, the search is named after the code's own place (or after location when the code's own name cannot be looked up); sent alone, the search is unnamed and location comes back null. A code for a place outside the US is refused, as is a location ending in another country ('London, UK')."
},
"exact_category": {
"type": [
"boolean",
"string"
],
"description": "Only businesses whose MAIN Google category is the query's: true (the query must be a Google category, e.g. 'Plumber'), or the category's id. Runs in the background — results arrive through get_search_results."
}
}
},
"outputSchema": {
"type": "object",
"required": [
"search_id",
"query",
"delivered_so_far",
"enrichment"
],
"properties": {
"found": {
"type": "number",
"description": "Listings found in the first batch, before the balance capped delivery."
},
"query": {
"type": "string"
},
"capped": {
"type": "boolean",
"description": "True when the lead balance covered fewer leads than were found — relay this to the user."
},
"results": {
"type": "array",
"items": {
"type": "object",
"properties": {
"city": {
"type": [
"string",
"null"
]
},
"name": {
"type": [
"string",
"null"
]
},
"state": {
"type": [
"string",
"null"
]
},
"people": {
"type": [
"array",
"null"
],
"items": {
"type": "object"
},
"description": "Everyone the business's own website names as working there, each { name, title, kind } (kind: owner, manager, practitioner, staff)."
},
"rating": {
"type": [
"number",
"null"
]
},
"country": {
"type": [
"string",
"null"
],
"description": "ISO 3166 alpha-2 (\"US\", \"GB\")."
},
"reviews": {
"type": [
"number",
"null"
]
},
"socials": {
"description": "Social profile links keyed by platform."
},
"website": {
"type": [
"string",
"null"
]
},
"category": {
"type": [
"string",
"null"
]
},
"owner_name": {
"type": [
"string",
"null"
]
},
"emails_data": {
"description": "Verified emails with SMTP status."
},
"phones_data": {
"description": "Verified phones with line type + carrier."
},
"postal_code": {
"type": [
"string",
"null"
]
},
"contact_name": {
"type": [
"string",
"null"
],
"description": "The person the business's own website names as running part of it (a manager, a practice's doctor) when it names no owner."
},
"contact_title": {
"type": [
"string",
"null"
],
"description": "That person's role, as the website gives it."
},
"enrichment_status": {
"type": [
"string",
"null"
]
}
}
},
"description": "The first batch, as delivered — contacts are verified in the background (get_search_results)."
},
"location": {
"type": [
"string",
"null"
],
"description": "The place searched, as the location list names it (the location sent, when a code's own name could not be looked up); null for a location_code sent alone."
},
"discovery": {
"type": "string",
"description": "'complete', or 'in_progress' when the search was queued whole."
},
"next_step": {
"type": "string"
},
"search_id": {
"type": "string"
},
"enrichment": {
"type": "string",
"description": "'pending' until background verification finishes; 'complete' at once when nothing was found."
},
"data_sources": {
"type": "string",
"description": "Where the sources, licences and notices are for emails and owner names that may come from open datasets and public records. Pass it on with any of this data you share."
},
"leads_remaining": {
"type": [
"number",
"null"
],
"description": "Leads spendable now. On a plan with no monthly quota this is what is left in the current 7-day period. Null when that period's usage couldn't be read just then — ask again."
},
"delivered_so_far": {
"type": "number"
}
}
},
"annotations": {
"title": "Search local-business leads",
"readOnlyHint": false,
"openWorldHint": true,
"idempotentHint": false,
"destructiveHint": false
}
}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.
| Parameter | Type | Description |
|---|---|---|
| limit | number | Max leads to return (default 25, max 1000). |
| offset | number | Pagination offset (default 0). |
| search_id * | string | The search_id returned by search_leads or enrich_domains. |
{
"name": "get_search_results",
"title": "Get search results",
"description": "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.",
"inputSchema": {
"type": "object",
"required": [
"search_id"
],
"properties": {
"limit": {
"type": "number",
"description": "Max leads to return (default 25, max 1000)."
},
"offset": {
"type": "number",
"description": "Pagination offset (default 0)."
},
"search_id": {
"type": "string",
"description": "The search_id returned by search_leads or enrich_domains."
}
}
},
"outputSchema": {
"type": "object",
"required": [
"search_id",
"enrichment",
"total_leads",
"results"
],
"properties": {
"query": {
"type": [
"string",
"null"
]
},
"stage": {
"type": "string",
"description": "queued | discovering | enriching | verifying | complete | failed | cancelled. 'verifying' means every row is delivered and contacts are being verified — often the longest phase, not a stall."
},
"period": {
"type": [
"object",
"null"
],
"description": "On a rate-limited plan: { limit, used, resets_at }. Null on a metered plan — and when the period's usage couldn't be read (leads_remaining is null too)."
},
"results": {
"type": "array",
"items": {
"type": "object",
"properties": {
"city": {
"type": [
"string",
"null"
]
},
"name": {
"type": [
"string",
"null"
]
},
"phone": {
"type": [
"string",
"null"
],
"description": "The Google Maps number."
},
"state": {
"type": [
"string",
"null"
]
},
"people": {
"type": [
"array",
"null"
],
"items": {
"type": "object"
},
"description": "Everyone the business's own website names as working there, each { name, title, kind } (kind: owner, manager, practitioner, staff)."
},
"rating": {
"type": [
"number",
"null"
]
},
"address": {
"type": [
"string",
"null"
],
"description": "Street address from the Google listing."
},
"claimed": {
"type": [
"boolean",
"null"
],
"description": "Whether the owner has claimed the Google listing."
},
"country": {
"type": [
"string",
"null"
],
"description": "ISO 3166 alpha-2 (\"US\", \"GB\")."
},
"reviews": {
"type": [
"number",
"null"
]
},
"socials": {
"description": "Social profile links keyed by platform."
},
"website": {
"type": [
"string",
"null"
]
},
"category": {
"type": [
"string",
"null"
]
},
"maps_url": {
"type": [
"string",
"null"
],
"description": "The Google Maps link for the listing."
},
"google_cid": {
"type": [
"string",
"null"
],
"description": "Google listing id (the query_leads google_cid field)."
},
"owner_name": {
"type": [
"string",
"null"
]
},
"emails_data": {
"description": "Verified emails with SMTP status."
},
"phones_data": {
"description": "Verified phones with line type + carrier."
},
"postal_code": {
"type": [
"string",
"null"
]
},
"contact_name": {
"type": [
"string",
"null"
],
"description": "The person the business's own website names as running part of it (a manager, a practice's doctor) when it names no owner."
},
"email_status": {
"type": [
"string",
"null"
],
"description": "Email 1's SMTP verdict: safe | risky | invalid | unknown."
},
"contact_title": {
"type": [
"string",
"null"
],
"description": "That person's role, as the website gives it."
},
"primary_email": {
"type": [
"string",
"null"
],
"description": "Email 1: the first address in emails_data, the one email_status describes. Before emails are verified, the lead's primary address."
},
"primary_phone": {
"type": [
"string",
"null"
],
"description": "Phone 1: the first number in phones_data, the one phone_line_type describes. Before phones are verified, the lead's primary number, or its Google Maps number."
},
"phone_line_type": {
"type": [
"string",
"null"
],
"description": "Phone 1's line type: mobile, fixed_line, voip or toll_free usually; also unknown, fixed_line_or_mobile and the other values query_leads lists."
},
"enrichment_status": {
"type": [
"string",
"null"
]
}
}
}
},
"showing": {
"type": "string",
"description": "Range shown, e.g. '1–25'."
},
"location": {
"type": [
"string",
"null"
]
},
"progress": {
"type": [
"object",
"null"
],
"description": "{ done, total } rows enriched so far."
},
"search_id": {
"type": "string"
},
"enrichment": {
"type": "string",
"description": "'pending' or 'complete'."
},
"next_offset": {
"type": [
"number",
"null"
],
"description": "Pass as offset to fetch the next page; null on the last page."
},
"total_leads": {
"type": "number"
},
"data_sources": {
"type": "string",
"description": "Where the sources, licences and notices are for emails and owner names that may come from open datasets and public records. Pass it on with any of this data you share."
},
"queue_position": {
"type": [
"number",
"null"
],
"description": "For queued searches, the place in this account's own queue (1 = next)."
},
"leads_remaining": {
"type": [
"number",
"null"
],
"description": "Leads spendable now. On a plan with no monthly quota this is what is left in the current 7-day period, not a monthly balance. Null when that period's usage couldn't be read just then — ask again."
}
}
},
"annotations": {
"title": "Get search results",
"readOnlyHint": true,
"openWorldHint": false,
"destructiveHint": false
}
}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.
| Parameter | Type | Description |
|---|---|---|
| domains * | array | Business domains, e.g. ['acme.com'] (max 10). |
{
"name": "enrich_domains",
"title": "Enrich business domains",
"description": "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.",
"inputSchema": {
"type": "object",
"required": [
"domains"
],
"properties": {
"domains": {
"type": "array",
"items": {
"type": "string"
},
"description": "Business domains, e.g. ['acme.com'] (max 10)."
}
}
},
"outputSchema": {
"type": "object",
"required": [
"search_id",
"enriching",
"enrichment"
],
"properties": {
"note": {
"type": "string",
"description": "Present when a delivered domain was listed more than once, or when the balance left some domains out (named, not charged)."
},
"enriching": {
"type": "array",
"items": {
"type": "string"
},
"description": "Domains accepted (balance-capped)."
},
"next_step": {
"type": "string"
},
"search_id": {
"type": "string"
},
"enrichment": {
"type": "string"
}
}
},
"annotations": {
"title": "Enrich business domains",
"readOnlyHint": false,
"openWorldHint": true,
"idempotentHint": false,
"destructiveHint": false
}
}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.
| Parameter | Type | Description |
|---|---|---|
| sort | array | Sort keys in priority order, e.g. [{id:'reviews',dir:-1}] for most-reviewed first. id is any filter field id (the column ids email_1, email_1_status, phone_1, phone_1_type and phone_1_carrier work too); dir is 1 ascending (the default) or -1 descending. A lead with no value for a key (null) sorts af… |
| limit | number | Max leads to return (default 25, max 1,000). |
| cursor | string | next_cursor from the previous call, for the next page. It carries that call's filters and sort: send it alone, or with the same filters and sort — different ones are refused. Leave it out to start a new query. |
| filters | array | Conditions, each {field, operator, value, conj}; omit to match every lead. text fields [operators: contains, not_contains, is, is_not, is_empty, is_not_empty]: name, category, city, state, country, postal_code, address, website, primary_email (or email_1), email_2, email_3, primary_phone (or phone_1… |
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 in the answer; not emailed). 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 — for google_sheets also spreadsheet_id from this response, or the next batch goes into a new spreadsheet (up to 50,000 leads a spreadsheet; past that the response has no spreadsheet_id and the next batch starts a new one, or export csv). 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 to export one advanced search's leads.
| Parameter | Type | Description |
|---|---|---|
| all | boolean | Export the whole library instead of one search. |
The account's recent searches (id, niche, location, result count, when) — use a search_id with get_search_results or export_leads.
| Parameter | Type | Description |
|---|---|---|
| limit | number | Max searches (default 10, max 25). |
{
"name": "list_searches",
"title": "List recent searches",
"description": "The account's recent searches (id, niche, location, result count, when) — use a search_id with get_search_results or export_leads.",
"inputSchema": {
"type": "object",
"properties": {
"limit": {
"type": "number",
"description": "Max searches (default 10, max 25)."
}
}
},
"outputSchema": {
"type": "object",
"required": [
"searches"
],
"properties": {
"searches": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"keyword": {
"type": [
"string",
"null"
]
},
"created_at": {
"type": [
"string",
"null"
]
},
"result_count": {
"type": [
"number",
"null"
]
},
"location_name": {
"type": [
"string",
"null"
]
}
}
}
}
}
},
"annotations": {
"title": "List recent searches",
"readOnlyHint": true,
"openWorldHint": false,
"destructiveHint": false
}
}What the account has left. On a plan with a rate limit this is the smaller of what the account holds and what is left in the current 7-day period (period_* describe that week, and period_resets_at is when the week resets); on a metered plan it is the account's lead balance. On a rate-limited plan with a monthly allowance, the note names the allowance when it can be read.
No parameters.
{
"name": "get_balance",
"title": "Get lead balance",
"description": "What the account has left. On a plan with a rate limit this is the smaller of what the account holds and what is left in the current 7-day period (period_* describe that week, and period_resets_at is when the week resets); on a metered plan it is the account's lead balance. On a rate-limited plan with a monthly allowance, the note names the allowance when it can be read.",
"inputSchema": {
"type": "object",
"properties": {}
},
"outputSchema": {
"type": "object",
"required": [
"leads_remaining",
"plan"
],
"properties": {
"note": {
"type": "string"
},
"plan": {
"type": "string"
},
"period_used": {
"type": "number"
},
"period_limit": {
"type": "number"
},
"leads_remaining": {
"type": "number"
},
"period_resets_at": {
"type": [
"string",
"null"
]
}
}
},
"annotations": {
"title": "Get lead balance",
"readOnlyHint": true,
"openWorldHint": false,
"destructiveHint": false
}
}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.
No parameters.
{
"name": "list_views",
"title": "List saved views",
"description": "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.",
"inputSchema": {
"type": "object",
"properties": {}
},
"outputSchema": {
"type": "object",
"required": [
"count",
"views"
],
"properties": {
"count": {
"type": "number"
},
"views": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"filters": {
"type": "array",
"items": {
"type": "object"
},
"description": "Pass straight to query_leads or export_leads."
}
}
}
}
}
},
"annotations": {
"title": "List saved views",
"readOnlyHint": true,
"openWorldHint": false,
"destructiveHint": false
}
}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.
No parameters.
{
"name": "list_integrations",
"title": "List connected integrations",
"description": "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.",
"inputSchema": {
"type": "object",
"properties": {}
},
"outputSchema": {
"type": "object",
"required": [
"integrations"
],
"properties": {
"integrations": {
"type": "array",
"items": {
"type": "object",
"properties": {
"note": {
"type": "string"
},
"ready": {
"type": "boolean",
"description": "Connected AND usable as an export destination right now."
},
"provider": {
"type": "string"
},
"connected": {
"type": "boolean"
}
}
}
}
}
},
"annotations": {
"title": "List connected integrations",
"readOnlyHint": true,
"openWorldHint": false,
"destructiveHint": false
}
}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.
No parameters.
{
"name": "list_automations",
"title": "List scheduled searches",
"description": "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.",
"inputSchema": {
"type": "object",
"properties": {}
},
"outputSchema": {
"type": "object",
"required": [
"count",
"automations"
],
"properties": {
"count": {
"type": "number"
},
"automations": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"active": {
"type": "boolean"
},
"cities": {
"type": "array",
"items": {
"type": "string"
}
},
"cadence": {
"type": "string"
},
"keyword": {
"type": "string"
},
"destination": {
"type": "string"
},
"last_run_at": {
"type": [
"string",
"null"
]
},
"last_status": {
"type": [
"string",
"null"
]
},
"next_run_at": {
"type": [
"string",
"null"
]
}
}
}
},
"data_sources": {
"type": "string",
"description": "Where the sources, licences and notices are for emails and owner names that may come from open datasets and public records. Pass it on with any of this data you share."
}
}
},
"annotations": {
"title": "List scheduled searches",
"readOnlyHint": true,
"openWorldHint": false,
"destructiveHint": false
}
}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.
| Parameter | Type | Description |
|---|---|---|
| cities * | array | Cities to search, e.g. ['Austin, TX'] (max 25). |
| cadence * | string | How often it repeats. |
| keyword * | string | The niche to search, e.g. 'roofing contractor' — up to 100 characters. |
| start_at | string | ISO timestamp for the first run. Defaults to now (runs on the next tick, within 15 min). |
| destination | string | Where each run's leads go. 'none' just saves them to the library. |
| spreadsheet_id | string | google_sheets only: add each run to this existing LeadMarina-created sheet, updating rows already in it. |
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.
| Parameter | Type | Description |
|---|---|---|
| id * | string | The automation id from list_automations. |
| active * | boolean | false to pause, true to resume. |
{
"name": "update_automation",
"title": "Pause or resume an automation",
"description": "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.",
"inputSchema": {
"type": "object",
"required": [
"id",
"active"
],
"properties": {
"id": {
"type": "string",
"description": "The automation id from list_automations."
},
"active": {
"type": "boolean",
"description": "false to pause, true to resume."
}
}
},
"outputSchema": {
"type": "object",
"required": [
"id",
"active"
],
"properties": {
"id": {
"type": "string"
},
"note": {
"type": "string"
},
"active": {
"type": "boolean"
},
"data_sources": {
"type": "string",
"description": "Where the sources, licences and notices are for emails and owner names that may come from open datasets and public records. Pass it on with any of this data you share."
}
}
},
"annotations": {
"title": "Pause or resume an automation",
"readOnlyHint": false,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": false
}
}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.
| Parameter | Type | Description |
|---|---|---|
| id * | string | The automation id from list_automations. |
{
"name": "delete_automation",
"title": "Delete an automation",
"description": "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.",
"inputSchema": {
"type": "object",
"required": [
"id"
],
"properties": {
"id": {
"type": "string",
"description": "The automation id from list_automations."
}
}
},
"outputSchema": {
"type": "object",
"required": [
"id",
"deleted"
],
"properties": {
"id": {
"type": "string"
},
"note": {
"type": "string"
},
"deleted": {
"type": "boolean"
}
}
},
"annotations": {
"title": "Delete an automation",
"readOnlyHint": false,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": true
}
}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.
| Parameter | Type | Description |
|---|---|---|
| q | string | Part of a place's name, at least 2 characters. |
| country | string | 'US', or a US territory's code ('PR', 'GU', 'VI', 'AS', 'MP'). |
{
"name": "find_places",
"title": "Find US states and places",
"description": "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.",
"inputSchema": {
"type": "object",
"properties": {
"q": {
"type": "string",
"description": "Part of a place's name, at least 2 characters."
},
"country": {
"type": "string",
"description": "'US', or a US territory's code ('PR', 'GU', 'VI', 'AS', 'MP')."
}
}
},
"outputSchema": {
"type": "object",
"properties": {
"places": {
"type": [
"number",
"array"
],
"items": {
"type": "object"
},
"description": "With country 'US' alone: how many places it has. With q: the matches, each { code, name, region } (up to 50)."
},
"region": {
"type": "string",
"description": "With country 'US' alone: what its regions are called (state)."
},
"country": {
"type": "string"
},
"regions": {
"type": "array",
"items": {
"type": "object"
},
"description": "With country 'US' alone: each state, { code, name, places }."
},
"countries": {
"type": "array",
"items": {
"type": "object"
},
"description": "With no arguments: the US and its territories, each { code, name, region, places }."
},
"total_matching": {
"type": "number",
"description": "With q: every match, of which up to 50 are listed."
}
}
},
"annotations": {
"title": "Find places",
"readOnlyHint": true,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": false
}
}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.
| Parameter | Type | Description |
|---|---|---|
| name | string | Optional name, up to 80 characters. |
| places | array | Single places by name ('Austin'), 'name, region' when a name is in several ('Springfield, Illinois'), or code (find_places). Up to 25,000 regions and places together; keywords × places may come to at most 50,000 searches. |
| country | string | 'US' (the default), or a US territory's code ('PR', 'GU', 'VI', 'AS', 'MP') with a place from find_places. |
| regions | array | Whole US states, by name or code (find_places). |
| keywords * | array | What to search for: up to 20 keywords or Google categories, each up to 100 characters. Each a string, or { keyword, exact } where exact keeps only businesses whose main Google category is that one. |
| lead_cap | number | Stop after this many unique, charged leads: a whole number from 100 to 1,000,000. Omit to search every place. |
| everywhere | boolean | Every place in the US (or in the territory sent as country). |
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.
| Parameter | Type | Description |
|---|---|---|
| name | string | Optional name, up to 80 characters. |
| places | array | Single places by name ('Austin'), 'name, region' when a name is in several ('Springfield, Illinois'), or code (find_places). Up to 25,000 regions and places together; keywords × places may come to at most 50,000 searches. |
| country | string | 'US' (the default), or a US territory's code ('PR', 'GU', 'VI', 'AS', 'MP') with a place from find_places. |
| regions | array | Whole US states, by name or code (find_places). |
| keywords * | array | What to search for: up to 20 keywords or Google categories, each up to 100 characters. Each a string, or { keyword, exact } where exact keeps only businesses whose main Google category is that one. |
| lead_cap | number | Stop after this many unique, charged leads: a whole number from 100 to 1,000,000. Omit to search every place. |
| everywhere | boolean | Every place in the US (or in the territory sent as country). |
This account's advanced searches, newest first: status, leads so far, searches done of total. The newest `limit`, plus any still running or paused past them.
| Parameter | Type | Description |
|---|---|---|
| limit | number | Up to 100; 25 by default. |
{
"name": "list_advanced_searches",
"title": "List advanced searches",
"description": "This account's advanced searches, newest first: status, leads so far, searches done of total. The newest `limit`, plus any still running or paused past them.",
"inputSchema": {
"type": "object",
"properties": {
"limit": {
"type": "number",
"description": "Up to 100; 25 by default."
}
}
},
"outputSchema": {
"type": "object",
"required": [
"advanced_searches"
],
"properties": {
"advanced_searches": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": [
"string",
"null"
]
},
"leads": {
"type": "number",
"description": "Unique leads charged so far."
},
"places": {
"type": "number",
"description": "How many places it searches."
},
"status": {
"type": "string",
"description": "running | paused | completed | stopped. Paused by itself when a Free account runs out of leads (they don't renew: upgrade, then resume)."
},
"estimate": {
"type": [
"object",
"null"
],
"description": "{ expected_leads, low, high, minutes } as estimated when it started."
},
"keywords": {
"type": "array",
"items": {
"type": "object"
},
"description": "Each { keyword, exact }."
},
"lead_cap": {
"type": [
"number",
"null"
]
},
"resume_at": {
"type": [
"string",
"null"
],
"description": "When a waiting search carries on by itself."
},
"created_at": {
"type": "string"
},
"leads_with": {
"type": "string",
"description": "How to read its leads: query_leads or export_leads with campaign_id."
},
"finished_at": {
"type": [
"string",
"null"
]
},
"finish_reason": {
"type": [
"string",
"null"
],
"description": "all_searched | lead_limit | stopped once finished; null while it runs."
},
"searches_done": {
"type": "number"
},
"status_detail": {
"type": [
"string",
"null"
],
"description": "One sentence on where it is — e.g. waiting for the daily city budget, and until when, or why it was paused."
},
"searches_total": {
"type": "number",
"description": "Keywords × places."
}
}
}
}
}
},
"annotations": {
"title": "List advanced searches",
"readOnlyHint": true,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": false
}
}One advanced search: status, leads so far, progress by keyword, its top places and the newest batch running now.
| Parameter | Type | Description |
|---|---|---|
| campaign_id * | string | An id from run_advanced_search or list_advanced_searches. |
{
"name": "get_advanced_search",
"title": "Get an advanced search",
"description": "One advanced search: status, leads so far, progress by keyword, its top places and the newest batch running now.",
"inputSchema": {
"type": "object",
"required": [
"campaign_id"
],
"properties": {
"campaign_id": {
"type": "string",
"description": "An id from run_advanced_search or list_advanced_searches."
}
}
},
"outputSchema": {
"type": "object",
"required": [
"id",
"status"
],
"properties": {
"id": {
"type": "string"
},
"name": {
"type": [
"string",
"null"
]
},
"leads": {
"type": "number",
"description": "Unique leads charged so far."
},
"places": {
"type": "number",
"description": "How many places it searches."
},
"status": {
"type": "string",
"description": "running | paused | completed | stopped. Paused by itself when a Free account runs out of leads (they don't renew: upgrade, then resume)."
},
"estimate": {
"type": [
"object",
"null"
],
"description": "{ expected_leads, low, high, minutes } as estimated when it started."
},
"keywords": {
"type": "array",
"items": {
"type": "object"
},
"description": "Each { keyword, exact }."
},
"lead_cap": {
"type": [
"number",
"null"
]
},
"resume_at": {
"type": [
"string",
"null"
],
"description": "When a waiting search carries on by itself."
},
"by_keyword": {
"type": "array",
"items": {
"type": "object"
},
"description": "Each { keyword, exact, category, searches, searches_done, leads }."
},
"created_at": {
"type": "string"
},
"leads_with": {
"type": "string",
"description": "How to read its leads: query_leads or export_leads with campaign_id."
},
"top_places": {
"type": "array",
"items": {
"type": "object"
},
"description": "Each { place, leads, basis }: basis \"leads\" — leads delivered there; or basis \"businesses_checked\" — leads null and businesses_checked the businesses checked there, when leads per place are not known."
},
"finished_at": {
"type": [
"string",
"null"
]
},
"running_now": {
"type": [
"object",
"null"
],
"description": "The newest batch running now: { keyword, places, status, verified, of } — places is the batch's place names."
},
"finish_reason": {
"type": [
"string",
"null"
],
"description": "all_searched | lead_limit | stopped once finished; null while it runs."
},
"searches_done": {
"type": "number"
},
"status_detail": {
"type": [
"string",
"null"
],
"description": "One sentence on where it is — e.g. waiting for the daily city budget, and until when, or why it was paused."
},
"searches_total": {
"type": "number",
"description": "Keywords × places."
}
}
},
"annotations": {
"title": "Get an advanced search",
"readOnlyHint": true,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": false
}
}action pause or stop takes effect after the batches running now (a queued batch is cancelled and refunded); resume carries on.
| Parameter | Type | Description |
|---|---|---|
| action * | string | one of ["pause","resume","stop"] |
| campaign_id * | string | An id from run_advanced_search or list_advanced_searches. |
{
"name": "control_advanced_search",
"title": "Pause, resume or stop an advanced search",
"description": "action pause or stop takes effect after the batches running now (a queued batch is cancelled and refunded); resume carries on.",
"inputSchema": {
"type": "object",
"required": [
"campaign_id",
"action"
],
"properties": {
"action": {
"enum": [
"pause",
"resume",
"stop"
],
"type": "string"
},
"campaign_id": {
"type": "string",
"description": "An id from run_advanced_search or list_advanced_searches."
}
}
},
"outputSchema": {
"type": "object",
"required": [
"id",
"status"
],
"properties": {
"id": {
"type": "string"
},
"name": {
"type": [
"string",
"null"
]
},
"leads": {
"type": "number",
"description": "Unique leads charged so far."
},
"places": {
"type": "number",
"description": "How many places it searches."
},
"status": {
"type": "string",
"description": "running | paused | completed | stopped. Paused by itself when a Free account runs out of leads (they don't renew: upgrade, then resume)."
},
"estimate": {
"type": [
"object",
"null"
],
"description": "{ expected_leads, low, high, minutes } as estimated when it started."
},
"keywords": {
"type": "array",
"items": {
"type": "object"
},
"description": "Each { keyword, exact }."
},
"lead_cap": {
"type": [
"number",
"null"
]
},
"resume_at": {
"type": [
"string",
"null"
],
"description": "When a waiting search carries on by itself."
},
"created_at": {
"type": "string"
},
"leads_with": {
"type": "string",
"description": "How to read its leads: query_leads or export_leads with campaign_id."
},
"finished_at": {
"type": [
"string",
"null"
]
},
"finish_reason": {
"type": [
"string",
"null"
],
"description": "all_searched | lead_limit | stopped once finished; null while it runs."
},
"searches_done": {
"type": "number"
},
"status_detail": {
"type": [
"string",
"null"
],
"description": "One sentence on where it is — e.g. waiting for the daily city budget, and until when, or why it was paused."
},
"searches_total": {
"type": "number",
"description": "Keywords × places."
}
}
},
"annotations": {
"title": "Control an advanced search",
"readOnlyHint": false,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": true
}
}LeadMarina finds local-business leads and verifies their contacts (emails SMTP-checked; phones verified with line type + carrier). Typical flow: search_leads → poll get_search_results until enrichment is 'complete' → export_leads to the user's CRM (Close/GoHighLevel), Google Sheets, or a CSV/Excel/JSON file. query_leads searches everything already collected, or one search by search_id (free — no leads spent); export_leads takes the same search_id and filters, so only that shortlist goes out. list_searches finds past search_ids. Searching/enriching spends leads from the account's lead allowance — a monthly pool on metered plans, a 7-day period allowance on Unlimited (get_balance reports whichever applies). Close, GoHighLevel and a LeadMarina-created sheet passed as spreadsheet_id update previously exported leads in place (Google CID identity) — they never duplicate and never touch the user's own CRM notes/columns. A csv/xlsx/json file or a new sheet is a fresh copy every call. A result with data_sources may carry emails or owner names from open datasets and public records: that link (their sources, licences and notices) goes with any of the data you pass on. ADVANCED SEARCH: for many keywords across many places — the whole US, whole states or single US places (the US only for now) — call estimate_advanced_search, confirm the estimate with the user (it spends leads, each business once), then run_advanced_search. It runs in the background in batches: follow it with get_advanced_search or list_advanced_searches, pause, resume or stop it with control_advanced_search, and read or send its leads with query_leads / export_leads and campaign_id. search_leads also takes country (the US, or a US territory's code such as 'PR'), max_leads and exact_category. Automations search US places only.
Names, descriptions and schemas were written by the server and are shown as data.
Pattern matches on what the server declares. They show what it says it can do, not what it does.
None yet. Changes appear after a server's second daily check.
| search_id | string | Only this search's leads (a search_id from search_leads or list_searches) — e.g. to narrow one search before export_leads with the same search_id and filters. Omit to query the whole library. |
| campaign_id | string | Only this advanced search's leads (an id from run_advanced_search or list_advanced_searches). Not with search_id. |
{
"name": "query_leads",
"title": "Query the lead library",
"description": "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.",
"inputSchema": {
"type": "object",
"properties": {
"sort": {
"type": "array",
"items": {
"type": "object",
"required": [
"id"
],
"properties": {
"id": {
"type": "string"
},
"dir": {
"enum": [
1,
-1
],
"type": "number"
}
}
},
"description": "Sort keys in priority order, e.g. [{id:'reviews',dir:-1}] for most-reviewed first. id is any filter field id (the column ids email_1, email_1_status, phone_1, phone_1_type and phone_1_carrier work too); dir is 1 ascending (the default) or -1 descending. A lead with no value for a key (null) sorts after the leads that have one, in either direction — except social_facebook, social_instagram, social_linkedin, social_x, social_youtube, social_tiktok, social_yelp, gbp_url, logo_url, main_image_url, which sort by whether a lead has one, not by the link: ascending puts the leads WITHOUT one first, so use dir -1 to put the leads that have one first. Without a sort the order is arbitrary but stable."
},
"limit": {
"type": "number",
"description": "Max leads to return (default 25, max 1,000)."
},
"cursor": {
"type": "string",
"description": "next_cursor from the previous call, for the next page. It carries that call's filters and sort: send it alone, or with the same filters and sort — different ones are refused. Leave it out to start a new query."
},
"filters": {
"type": "array",
"items": {
"type": "object",
"required": [
"field",
"operator"
],
"properties": {
"conj": {
"enum": [
"and",
"or"
],
"type": "string"
},
"field": {
"type": "string"
},
"value": {
"type": "string"
},
"operator": {
"type": "string"
}
}
},
"description": "Conditions, each {field, operator, value, conj}; omit to match every lead. text fields [operators: contains, not_contains, is, is_not, is_empty, is_not_empty]: name, category, city, state, country, postal_code, address, website, primary_email (or email_1), email_2, email_3, primary_phone (or phone_1), phone_carrier (or phone_1_carrier), phone_2, phone_2_carrier, phone_3, phone_3_carrier, owner_name, contact_name, contact_title, social_facebook, social_instagram, social_linkedin, social_x, social_youtube, social_tiktok, social_yelp, gbp_url, google_cid, logo_url, main_image_url. number fields [operators: eq, neq, gt, gte, lt, lte, is_empty, is_not_empty]: rank, rating, reviews, people. yes/no fields [operators: is_true, is_false, is_empty, is_not_empty]: claimed. choice fields [operators: is, is_not, is_empty, is_not_empty]: website_status take none (No website), live, unreachable, blocked (Blocked our crawler), unknown, pending; email_status (or email_1_status), email_2_status, email_3_status take safe, risky, invalid, unknown; phone_line_type (or phone_1_type), phone_2_type, phone_3_type take mobile, fixed_line (Landline), fixed_line_or_mobile (Landline or mobile), voip, non_fixed_voip, toll_free (Toll-free), premium_rate, shared_cost, personal_number (Personal), pager, uan, voicemail, unknown. value is one string (a number as text, e.g. '4.5'); is_empty, is_not_empty, is_true and is_false take none. Text matching ignores case. Phone fields compare digits, so '(512) 555' finds +15125550100; website is / is_not compare domains when given a domain ('acme.com', or 'https://www.acme.com/'), and whole addresses when given a path, a query or a fragment ('acme.com/locations/austin'), either way ignoring http(s)://, www. and a closing slash. conj ('and' or 'or') joins a condition to the one before it, and 'and' binds tighter: A and B or C means (A and B) or C. To match any of several values, send one condition per value joined with conj 'or', repeating the other conditions in each group."
},
"search_id": {
"type": "string",
"description": "Only this search's leads (a search_id from search_leads or list_searches) — e.g. to narrow one search before export_leads with the same search_id and filters. Omit to query the whole library."
},
"campaign_id": {
"type": "string",
"description": "Only this advanced search's leads (an id from run_advanced_search or list_advanced_searches). Not with search_id."
}
}
},
"outputSchema": {
"type": "object",
"required": [
"returned",
"results"
],
"properties": {
"results": {
"type": "array",
"items": {
"type": "object",
"properties": {
"city": {
"type": [
"string",
"null"
]
},
"name": {
"type": [
"string",
"null"
]
},
"phone": {
"type": [
"string",
"null"
],
"description": "The Google Maps number."
},
"state": {
"type": [
"string",
"null"
]
},
"people": {
"type": [
"array",
"null"
],
"items": {
"type": "object"
},
"description": "Everyone the business's own website names as working there, each { name, title, kind } (kind: owner, manager, practitioner, staff)."
},
"rating": {
"type": [
"number",
"null"
]
},
"address": {
"type": [
"string",
"null"
],
"description": "Street address from the Google listing."
},
"claimed": {
"type": [
"boolean",
"null"
],
"description": "Whether the owner has claimed the Google listing."
},
"country": {
"type": [
"string",
"null"
],
"description": "ISO 3166 alpha-2 (\"US\", \"GB\")."
},
"reviews": {
"type": [
"number",
"null"
]
},
"socials": {
"description": "Social profile links keyed by platform."
},
"website": {
"type": [
"string",
"null"
]
},
"category": {
"type": [
"string",
"null"
]
},
"maps_url": {
"type": [
"string",
"null"
],
"description": "The Google Maps link for the listing."
},
"google_cid": {
"type": [
"string",
"null"
],
"description": "Google listing id (the query_leads google_cid field)."
},
"owner_name": {
"type": [
"string",
"null"
]
},
"emails_data": {
"description": "Verified emails with SMTP status."
},
"phones_data": {
"description": "Verified phones with line type + carrier."
},
"postal_code": {
"type": [
"string",
"null"
]
},
"contact_name": {
"type": [
"string",
"null"
],
"description": "The person the business's own website names as running part of it (a manager, a practice's doctor) when it names no owner."
},
"email_status": {
"type": [
"string",
"null"
],
"description": "Email 1's SMTP verdict: safe | risky | invalid | unknown."
},
"contact_title": {
"type": [
"string",
"null"
],
"description": "That person's role, as the website gives it."
},
"primary_email": {
"type": [
"string",
"null"
],
"description": "Email 1: the first address in emails_data, the one email_status describes. Before emails are verified, the lead's primary address."
},
"primary_phone": {
"type": [
"string",
"null"
],
"description": "Phone 1: the first number in phones_data, the one phone_line_type describes. Before phones are verified, the lead's primary number, or its Google Maps number."
},
"phone_line_type": {
"type": [
"string",
"null"
],
"description": "Phone 1's line type: mobile, fixed_line, voip or toll_free usually; also unknown, fixed_line_or_mobile and the other values query_leads lists."
},
"enrichment_status": {
"type": [
"string",
"null"
]
}
}
}
},
"returned": {
"type": "number"
},
"next_cursor": {
"type": [
"string",
"null"
],
"description": "Pass back as 'cursor' for the next page (it carries the filters and sort); null on the last page."
},
"data_sources": {
"type": "string",
"description": "Where the sources, licences and notices are for emails and owner names that may come from open datasets and public records. Pass it on with any of this data you share."
},
"total_matching": {
"type": [
"number",
"null"
],
"description": "Exact match count — on the first page only; null on later pages."
}
}
},
"annotations": {
"title": "Query the lead library",
"readOnlyHint": true,
"openWorldHint": false,
"destructiveHint": false
}
}| cursor |
| string |
| Continue an export: the next_cursor a previous export_leads call returned. Pass it with the same search_id/all and filters. |
| filters | array | Optional query_leads-style filter rows: within the search when search_id is given, across the library with all=true. |
| search_id | string | Export this search's leads. |
| batch_size | integer | Fewer leads per call than the destination allows (it only ever lowers the limit): for an export that ran out of time, as its error says. Continue with cursor as usual. |
| campaign_id | string | Only this advanced search's leads (an id from run_advanced_search or list_advanced_searches). Not with search_id. |
| destination * | string | Where the leads go. |
| sheet_title | string | google_sheets without spreadsheet_id: the new spreadsheet's title (up to 100 characters). |
| spreadsheet_id | string | google_sheets only: add to this existing LeadMarina-created sheet instead of a new one. |
| update_existing | boolean | close, and google_sheets with spreadsheet_id: true (default) refreshes leads already there. false: Close sends only leads it hasn't had yet (the rest are skipped, not duplicated); a sheet appends every lead as a new row. |
{
"name": "export_leads",
"title": "Export leads to a destination",
"description": "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 in the answer; not emailed). 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 — for google_sheets also spreadsheet_id from this response, or the next batch goes into a new spreadsheet (up to 50,000 leads a spreadsheet; past that the response has no spreadsheet_id and the next batch starts a new one, or export csv). 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 to export one advanced search's leads.",
"inputSchema": {
"type": "object",
"required": [
"destination"
],
"properties": {
"all": {
"type": "boolean",
"description": "Export the whole library instead of one search."
},
"cursor": {
"type": "string",
"description": "Continue an export: the next_cursor a previous export_leads call returned. Pass it with the same search_id/all and filters."
},
"filters": {
"type": "array",
"items": {
"type": "object"
},
"description": "Optional query_leads-style filter rows: within the search when search_id is given, across the library with all=true."
},
"search_id": {
"type": "string",
"description": "Export this search's leads."
},
"batch_size": {
"type": "integer",
"minimum": 1,
"description": "Fewer leads per call than the destination allows (it only ever lowers the limit): for an export that ran out of time, as its error says. Continue with cursor as usual."
},
"campaign_id": {
"type": "string",
"description": "Only this advanced search's leads (an id from run_advanced_search or list_advanced_searches). Not with search_id."
},
"destination": {
"enum": [
"close",
"ghl",
"google_sheets",
"csv",
"xlsx",
"json"
],
"type": "string",
"description": "Where the leads go."
},
"sheet_title": {
"type": "string",
"description": "google_sheets without spreadsheet_id: the new spreadsheet's title (up to 100 characters)."
},
"spreadsheet_id": {
"type": "string",
"description": "google_sheets only: add to this existing LeadMarina-created sheet instead of a new one."
},
"update_existing": {
"type": "boolean",
"description": "close, and google_sheets with spreadsheet_id: true (default) refreshes leads already there. false: Close sends only leads it hasn't had yet (the rest are skipped, not duplicated); a sheet appends every lead as a new row."
}
}
},
"outputSchema": {
"type": "object",
"required": [
"exported",
"outcome"
],
"properties": {
"file": {
"type": "string",
"description": "File exports only: the file name."
},
"note": {
"type": "string"
},
"limit": {
"type": "number",
"description": "The per-call limit that applied, when truncated."
},
"outcome": {
"type": "string",
"description": "Human-readable result, e.g. added/updated counts."
},
"warning": {
"type": "string",
"description": "Present when the per-call limit or this call's time limit left leads unsent: what happened and how to send them. Leads the destination refused are not covered here — outcome counts them as failed."
},
"exported": {
"type": "number",
"description": "Leads sent to the destination."
},
"not_sent": {
"type": "number",
"description": "Leads of this batch the destination's time limit did not reach."
},
"truncated": {
"type": "boolean",
"description": "True when more leads matched than this destination's limit — the export was PARTIAL."
},
"next_cursor": {
"type": "string",
"description": "Present when the per-call limit or this call's time limit left matching leads unsent: pass it as cursor, with the same destination (for google_sheets, plus the spreadsheet_id this response returned), search_id/all and filters, to send them. It does not offer again a lead the destination refused (counted as failed in outcome)."
},
"data_sources": {
"type": "string",
"description": "Where the sources, licences and notices are for emails and owner names that may come from open datasets and public records. Pass it on with any of this data you share."
},
"download_url": {
"type": "string",
"description": "File exports only: 7-day download link."
},
"spreadsheet_id": {
"type": "string",
"description": "Google Sheets only: pass it as spreadsheet_id to send the next batch into this same spreadsheet. Absent once the spreadsheet holds 50,000 leads."
},
"spreadsheet_url": {
"type": "string",
"description": "Google Sheets only: the spreadsheet the leads went to (it does not expire)."
}
}
},
"annotations": {
"title": "Export leads to a destination",
"readOnlyHint": false,
"openWorldHint": true,
"idempotentHint": false,
"destructiveHint": true
}
}{
"name": "create_automation",
"title": "Schedule a recurring search",
"description": "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.",
"inputSchema": {
"type": "object",
"required": [
"keyword",
"cities",
"cadence"
],
"properties": {
"cities": {
"type": "array",
"items": {
"type": "string"
},
"description": "Cities to search, e.g. ['Austin, TX'] (max 25)."
},
"cadence": {
"enum": [
"once",
"daily",
"weekly",
"monthly",
"yearly"
],
"type": "string",
"description": "How often it repeats."
},
"keyword": {
"type": "string",
"maxLength": 100,
"description": "The niche to search, e.g. 'roofing contractor' — up to 100 characters."
},
"start_at": {
"type": "string",
"description": "ISO timestamp for the first run. Defaults to now (runs on the next tick, within 15 min)."
},
"destination": {
"enum": [
"none",
"close",
"ghl",
"google_sheets",
"csv",
"xlsx",
"json"
],
"type": "string",
"description": "Where each run's leads go. 'none' just saves them to the library."
},
"spreadsheet_id": {
"type": "string",
"description": "google_sheets only: add each run to this existing LeadMarina-created sheet, updating rows already in it."
}
}
},
"outputSchema": {
"type": "object",
"required": [
"id"
],
"properties": {
"id": {
"type": "string"
},
"note": {
"type": "string"
},
"cities": {
"type": "array",
"items": {
"type": "string"
}
},
"cadence": {
"type": "string"
},
"keyword": {
"type": "string"
},
"destination": {
"type": "string",
"description": "The destination as saved — what each run will actually use."
},
"next_run_at": {
"type": [
"string",
"null"
]
},
"data_sources": {
"type": "string",
"description": "Where the sources, licences and notices are for emails and owner names that may come from open datasets and public records. Pass it on with any of this data you share."
}
}
},
"annotations": {
"title": "Schedule a recurring search",
"readOnlyHint": false,
"openWorldHint": true,
"idempotentHint": false,
"destructiveHint": false
}
}{
"name": "estimate_advanced_search",
"title": "Estimate an advanced search",
"description": "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.",
"inputSchema": {
"type": "object",
"required": [
"keywords"
],
"properties": {
"name": {
"type": "string",
"description": "Optional name, up to 80 characters."
},
"places": {
"type": "array",
"items": {
"type": [
"string",
"number"
]
},
"description": "Single places by name ('Austin'), 'name, region' when a name is in several ('Springfield, Illinois'), or code (find_places). Up to 25,000 regions and places together; keywords × places may come to at most 50,000 searches."
},
"country": {
"type": "string",
"description": "'US' (the default), or a US territory's code ('PR', 'GU', 'VI', 'AS', 'MP') with a place from find_places."
},
"regions": {
"type": "array",
"items": {
"type": [
"string",
"number"
]
},
"description": "Whole US states, by name or code (find_places)."
},
"keywords": {
"type": "array",
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "object",
"required": [
"keyword"
],
"properties": {
"exact": {
"type": "boolean"
},
"keyword": {
"type": "string"
}
}
}
]
},
"description": "What to search for: up to 20 keywords or Google categories, each up to 100 characters. Each a string, or { keyword, exact } where exact keeps only businesses whose main Google category is that one."
},
"lead_cap": {
"type": "number",
"description": "Stop after this many unique, charged leads: a whole number from 100 to 1,000,000. Omit to search every place."
},
"everywhere": {
"type": "boolean",
"description": "Every place in the US (or in the territory sent as country)."
}
}
},
"outputSchema": {
"type": "object",
"required": [
"expected_leads",
"searches"
],
"properties": {
"low": {
"type": "number"
},
"high": {
"type": "number"
},
"time": {
"type": "string",
"description": "How long it would take, waits for the daily city budget included."
},
"places": {
"type": "number"
},
"country": {
"type": "string"
},
"keywords": {
"type": "array",
"items": {
"type": "object"
},
"description": "Each { keyword, exact }, as they would run."
},
"searches": {
"type": "number",
"description": "Keywords × places."
},
"next_step": {
"type": "string"
},
"charged_leads": {
"type": "number",
"description": "Leads expected to be charged: expected_leads, capped by lead_cap."
},
"expected_leads": {
"type": "number"
},
"paced_by_daily_budget": {
"type": "boolean",
"description": "True when the account's daily city budget, not the searching, sets the time."
},
"campaign_searches_per_day": {
"type": "number",
"description": "Places a day advanced searches may use on this plan."
}
}
},
"annotations": {
"title": "Estimate an advanced search",
"readOnlyHint": true,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": false
}
}{
"name": "run_advanced_search",
"title": "Run an advanced search",
"description": "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.",
"inputSchema": {
"type": "object",
"required": [
"keywords"
],
"properties": {
"name": {
"type": "string",
"description": "Optional name, up to 80 characters."
},
"places": {
"type": "array",
"items": {
"type": [
"string",
"number"
]
},
"description": "Single places by name ('Austin'), 'name, region' when a name is in several ('Springfield, Illinois'), or code (find_places). Up to 25,000 regions and places together; keywords × places may come to at most 50,000 searches."
},
"country": {
"type": "string",
"description": "'US' (the default), or a US territory's code ('PR', 'GU', 'VI', 'AS', 'MP') with a place from find_places."
},
"regions": {
"type": "array",
"items": {
"type": [
"string",
"number"
]
},
"description": "Whole US states, by name or code (find_places)."
},
"keywords": {
"type": "array",
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "object",
"required": [
"keyword"
],
"properties": {
"exact": {
"type": "boolean"
},
"keyword": {
"type": "string"
}
}
}
]
},
"description": "What to search for: up to 20 keywords or Google categories, each up to 100 characters. Each a string, or { keyword, exact } where exact keeps only businesses whose main Google category is that one."
},
"lead_cap": {
"type": "number",
"description": "Stop after this many unique, charged leads: a whole number from 100 to 1,000,000. Omit to search every place."
},
"everywhere": {
"type": "boolean",
"description": "Every place in the US (or in the territory sent as country)."
}
}
},
"outputSchema": {
"type": "object",
"required": [
"campaign_id"
],
"properties": {
"id": {
"type": "string"
},
"name": {
"type": [
"string",
"null"
]
},
"leads": {
"type": "number",
"description": "Unique leads charged so far."
},
"places": {
"type": "number",
"description": "How many places it searches."
},
"status": {
"type": "string",
"description": "running | paused | completed | stopped. Paused by itself when a Free account runs out of leads (they don't renew: upgrade, then resume)."
},
"estimate": {
"type": [
"object",
"null"
],
"description": "{ expected_leads, low, high, minutes } as estimated when it started."
},
"keywords": {
"type": "array",
"items": {
"type": "object"
},
"description": "Each { keyword, exact }."
},
"lead_cap": {
"type": [
"number",
"null"
]
},
"next_step": {
"type": "string"
},
"resume_at": {
"type": [
"string",
"null"
],
"description": "When a waiting search carries on by itself."
},
"by_keyword": {
"type": "array",
"items": {
"type": "object"
},
"description": "Each { keyword, exact, category, searches, searches_done, leads }."
},
"created_at": {
"type": "string"
},
"leads_with": {
"type": "string",
"description": "How to read its leads: query_leads or export_leads with campaign_id."
},
"top_places": {
"type": "array",
"items": {
"type": "object"
},
"description": "Each { place, leads, basis }: basis \"leads\" — leads delivered there; or basis \"businesses_checked\" — leads null and businesses_checked the businesses checked there, when leads per place are not known."
},
"campaign_id": {
"type": "string"
},
"finished_at": {
"type": [
"string",
"null"
]
},
"running_now": {
"type": [
"object",
"null"
],
"description": "The newest batch running now: { keyword, places, status, verified, of } — places is the batch's place names."
},
"finish_reason": {
"type": [
"string",
"null"
],
"description": "all_searched | lead_limit | stopped once finished; null while it runs."
},
"searches_done": {
"type": "number"
},
"status_detail": {
"type": [
"string",
"null"
],
"description": "One sentence on where it is — e.g. waiting for the daily city budget, and until when, or why it was paused."
},
"searches_total": {
"type": "number",
"description": "Keywords × places."
}
}
},
"annotations": {
"title": "Run an advanced search",
"readOnlyHint": false,
"openWorldHint": true,
"idempotentHint": false,
"destructiveHint": false
}
}