Call it
curl https://api.peume.com/v1/call/start-a-google-maps-lead-scrape-with-emails \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"query": "Plumber",
"country": "us",
"cities": [
{
"city": "Austin",
"state": "Texas"
}
],
"total_limit": 1,
"limit_basis": "emails",
"max_emails_per_company": 1
}
}'const res = await fetch("https://api.peume.com/v1/call/start-a-google-maps-lead-scrape-with-emails", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"query": "Plumber",
"country": "us",
"cities": [
{
"city": "Austin",
"state": "Texas"
}
],
"total_limit": 1,
"limit_basis": "emails",
"max_emails_per_company": 1
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/start-a-google-maps-lead-scrape-with-emails",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"query": "Plumber",
"country": "us",
"cities": [
{
"city": "Austin",
"state": "Texas"
}
],
"total_limit": 1,
"limit_basis": "emails",
"max_emails_per_company": 1
}
},
)
print(res.json()["output"])Answer: {"id": "run_…", "status": "completed", "cost_usd": …, "output": {…}}. Long jobs answer 202 with a run id to read later. From an AI agent, connect the MCP server and ask for this by name: start-a-google-maps-lead-scrape-with-emails.
Parameters
queryRequiredstringone to three comma-separated Google Maps categories, spelled as.places.categories.validate returns them
Example: Plumber
countrystringus · ca · uk · au
Example: us
statesarrayfull region names from.places.areas, e.g. Texas; leave out when passing cities. With neither, the whole country is scraped
citiesarrayobjects of {city, state}, the state spelled in full
Example: [{"city":"Austin","state":"Texas"}]
total_limitRequiredintegerleads to scrape, counted in the unit limit_basis sets; also capped by the account's max_leads_per_scrape (50,000 on Starter and Pro, 100,000 on Scale and Max)
Example: 1
limit_basisstringemails: stop once total_limit leads with an email are found. rows: stop at total_limit leads, with or without one. Defaults to the organization's setting, emails for new organizations
emails · rows
Example: emails
max_emails_per_companyintegeremails kept per business; each kept email is its own billed lead row
Example: 1
min_reviewsintegerExample: 0
max_reviewsintegerlist_namestringlabel for the list; defaults to the query
client_idstringworkspace to file the scrape under; needed only when the organization has several
include_variantsbooleanwith a single category, also search up to four closely related categories
Example: false
dry_runboolean.web.scrape.job.validate is the dry run
false
Example: false
Other ways to do it
Same job, other sources, cheapest first.
