Pull 500 Google Maps leads into a spreadsheet with one prompt
Use a Google Maps leads scraper tool inside an AI agent to pull 500 local businesses with emails into a CSV for `500 places × $0.00051 per place = $0.255` in data costs.
Nov 10, 2026 · 5 min read

You can pull 500 local businesses with emails from Google Maps into a CSV with one agent prompt. Data cost is 500 places × $0.00051 per place = $0.255.
A homegrown google maps leads scraper usually means a headless browser, residential proxies, a scroll loop for the map sidebar, and a second crawler that visits each site looking for mailto: links. With Lovely Router, the agent calls one structured tool, google-maps-leads, and gets JSON back: business name, category, address, phone, website, rating, review count, and any emails found. Web data tools, a browser agent, video models, and Claude, GPT, and Gemini sit on one prepaid API key, so the same key that runs the prompt also pays for the scrape.
Why local browser scrapers stall on 500 places#
Google Maps is a heavy JavaScript app. A plain HTTP request to google.com/maps returns an application shell, not the business list. Scraping it yourself means running headless browsers, rotating sessions, deduplicating results and crawling each website for emails, and keeping all of that working as the page changes.
A local run is fine for a quick test. It breaks inside an automated agent workflow for three reasons.
A single Maps search only scrolls through roughly 100 to 120 results before the list ends. To reach 500 leads in a metro area, the agent has to split the city into sub-regions, zip codes, or neighborhood queries and deduplicate by place_id.
Map cards show phone numbers and URLs, but almost never an email. Getting one means loading the business home page, contact page, or social links.
A headless browser inside a serverless function or hosted agent container adds hundreds of megabytes of dependencies, and stalls on CAPTCHAs when several users run at once.
A hosted google maps scraper for agents puts the browser automation, pagination, and contact extraction behind an HTTP endpoint. The agent sends a query and a limit, and gets clean JSON back.
Two ways to pull Google Maps data on Lovely Router#
Lovely Router exposes three Google Maps and contact tools in the data tools catalog. Pick based on whether you want every website crawled for emails, or only the sites that pass a filter.
Option 1: The all-in-one google-maps-leads tool#
The google-maps-leads tool ("Google Maps leads with emails") does the map search and the email discovery in one call. Tool ID is google-maps-leads. Price is $0.00051 per place ($0.51 per 1,000).
For 500 places: 500 places × $0.00051 per place = $0.255. You pay per place returned, with no per-run fee. That is the cheapest and fastest way to fill a spreadsheet when you want contact details for the whole list.
Option 2: Two-stage filtering with google-maps-places and website-contacts#
Sometimes you only want to pay for email extraction on businesses that meet a filter: dental clinics rated below 4.2, or HVAC contractors with fewer than 20 reviews. Split the job across two tools.
Search Google Maps places with google-maps-places at $0.00024 per place ($0.238 per 1,000) plus $0.00075 per run. Find emails and contacts on a website with website-contacts at $0.015 per website ($15.00 per 1,000) plus $0.0015 per run.
Pull 500 places across 5 neighborhood runs with google-maps-places and the map step costs (500 × $0.00024) + (5 × $0.00075) = $0.12 + $0.00375 = $0.12375. Filter those 500 down to 30 high-priority websites and run website-contacts once on those 30 URLs, and enrichment costs (30 × $0.015) + $0.0015 = $0.45 + $0.0015 = $0.4515.
When you want emails on as many rows as possible, google-maps-leads at $0.00051 per place is a fraction of that cost. For selective enrichment, or for URL lists you already have, website-contacts lets you choose which domains get crawled. You can also add email-verify ("Verify email addresses", tool ID email-verify) at $0.0015 per email ($1.50 per 1,000) before you load rows into an outreach sequencer.
Running the 500-lead job with an agent prompt#
To get 500 unique leads without hitting the per-search scroll ceiling, have the agent split the city into five geographic queries of 100 leads each, call google-maps-leads for each, deduplicate by place_id or website domain, and write a CSV.
This Python script asks an LLM on Lovely Router to plan the sub-queries, runs the google-maps-leads calls, and writes the deduplicated rows to leads.csv.
import csv
import json
import os
import requests
API_KEY = os.environ["LOVELY_ROUTER_API_KEY"]
BASE_URL = "https://api.lovelyrouter.com/v1"
HEADERS = {
"Authorization": f"Bearer {API_KEY}",
"Content-Type": "application/json",
}
def generate_subqueries(prompt: str) -> list[str]:
"""Use Claude Haiku 5.5 to split one prompt into 5 localized Google Maps queries."""
response = requests.post(
f"{BASE_URL}/chat/completions",
headers=HEADERS,
json={
"model": "claude-haiku-5.5",
"messages": [
{
"role": "system",
"content": (
"Return a JSON object with a single key 'queries' containing "
"exactly 5 distinct Google Maps search strings that divide the "
"user's target area into 5 non-overlapping neighborhoods or zip groups."
),
},
{"role": "user", "content": prompt},
],
"response_format": {"type": "json_object"},
},
timeout=30,
)
response.raise_for_status()
content = response.json()["choices"][0]["message"]["content"]
return json.loads(content)["queries"]
def fetch_maps_leads(query: str, limit: int = 100) -> list[dict]:
"""Call the google-maps-leads data tool on Lovely Router."""
response = requests.post(
f"{BASE_URL}/tools/google-maps-leads",
headers=HEADERS,
json={
"query": query,
"limit": limit,
},
timeout=180,
)
response.raise_for_status()
return response.json().get("data", [])
def main():
user_prompt = "Pull 500 roofing contractors in Dallas-Fort Worth, TX"
queries = generate_subqueries(user_prompt)
print(f"Generated queries: {queries}")
seen_ids = set()
rows = []
for q in queries:
places = fetch_maps_leads(q, limit=100)
for place in places:
uid = place.get("place_id") or place.get("website") or place.get("phone")
if not uid or uid in seen_ids:
continue
seen_ids.add(uid)
emails = place.get("emails") or []
rows.append({
"name": place.get("name", ""),
"category": place.get("category", ""),
"address": place.get("address", ""),
"phone": place.get("phone", ""),
"website": place.get("website", ""),
"email": emails[0] if emails else "",
"all_emails": "; ".join(emails),
"rating": place.get("rating", ""),
"reviews": place.get("reviews_count", ""),
"query_source": q,
})
with open("leads.csv", "w", newline="", encoding="utf-8") as f:
fieldnames = [
"name", "category", "address", "phone", "website",
"email", "all_emails", "rating", "reviews", "query_source"
]
writer = csv.DictWriter(f, fieldnames=fieldnames)
writer.writeheader()
writer.writerows(rows)
print(f"Saved {len(rows)} unique leads to leads.csv")
if __name__ == "__main__":
main()If you would rather not write the loop, connect the Lovely Router MCP server to Claude Code or Cursor and type the prompt in the editor. The guide on how to export Google Maps leads to CSV covers the schema fields and spreadsheet formatting.
Measuring email hit rate and cleaning your sheet#
Not every Maps listing has an email. Before a 10,000-row scrape, run a 500-place batch on your category and measure three ratios in the CSV.
Website coverage is rows with website / total rows. B2B agencies, dental clinics, and law firms almost always list a domain. Food trucks, small parking lots, and solo handymen often list only a phone number or a Facebook page. With no website, google-maps-leads cannot crawl a domain for an email.
Raw email yield is rows with at least one email / total rows. Count how many rows fill the email column, and check all_emails. Many sites expose both a generic inbox (info@, office@, sales@) and a personal address (john@).
Deliverable email yield is verified emails / total emails. Before cold email, pass the non-empty email column through email-verify ($0.0015 per email). That drops catch-all traps, dead domains, and syntax mistakes from broken HTML on small business sites.
Measure all three in Python right after you write leads.csv:
import csv
with open("leads.csv", newline="", encoding="utf-8") as f:
rows = list(csv.DictReader(f))
total = len(rows)
with_site = sum(1 for r in rows if r["website"])
with_email = sum(1 for r in rows if r["email"])
print(f"Total unique places: {total}")
print(f"With website: {with_site} ({with_site / total:.1%})")
print(f"With email: {with_email} ({with_email / total:.1%})")Exact cost breakdown for 500 Google Maps leads#
Every tool and model on Lovely Router has a per-unit price, so you can price a 500-lead run before you send a request.
1. Google Maps leads with emails#
500 places through google-maps-leads at $0.00051 per place ($0.51 per 1,000):
500 places × $0.00051 per place = $0.255
2. LLM tokens to plan queries and summarize#
In the script above, claude-haiku-5.5 ($0.10 per 1M input tokens, $0.50 per 1M output tokens) splits the prompt into 5 geographic sub-queries. That call uses roughly 200 input tokens and 100 output tokens, well under a tenth of a cent.
Pass all 500 JSON records into the model so the agent can score, categorize, or write a one-line icebreaker for each business, and the token cost stays tiny. Suppose 500 compact lead records take 50,000 input tokens (0.05M) and the agent writes 25,000 output tokens (0.025M) of personalized notes.
With Claude Haiku 5.5 (claude-haiku-5.5): (0.05M input tokens × $0.10 per 1M) + (0.025M output tokens × $0.50 per 1M) = $0.005 + $0.0125 = $0.0175
With Gemini 3 Flash (gemini-3-flash): (0.05M input tokens × $0.50 per 1M) + (0.025M output tokens × $3.00 per 1M) = $0.025 + $0.075 = $0.10
With Claude Sonnet 5.5 (claude-sonnet-5.5): (0.05M input tokens × $2.00 per 1M) + (0.025M output tokens × $10.00 per 1M) = $0.10 + $0.25 = $0.35
3. Optional email verification and review checks#
If those 500 places yield 250 email addresses and you verify all 250 with email-verify ($0.0015 per email):
250 emails × $0.0015 per email = $0.375
To read the latest 10 customer reviews on 50 of those businesses with google-maps-reviews ($0.00068 per review, or $0.675 per 1,000) and pull specific complaints for outreach:
500 reviews × $0.00068 per review = $0.34
The core run is 500 places from google-maps-leads ($0.255) plus a 50,000-input / 25,000-output token pass with Claude Haiku 5.5 ($0.0175), for $0.2725. Email verification on 250 addresses ($0.375) brings the verified, agent-scored sheet to $0.6475.
For larger lead generation workflows, chain google-maps-leads with linkedin-company-search ($0.0030 per company plus $0.0015 per run) or b2b-leads ($0.0020 per lead) on the same API key when a local business turns out to be a regional mid-market company.
Run your first 500-lead extraction#
Get a prepaid API key, open the request schemas for google-maps-leads and email-verify in the data tools catalog, and run the script against your city and category.
Try it yourself
One prepaid key, no subscription. Every price in this article is the price you pay.
Keep reading
All articles →
Track TikTok trends for a niche every morning
Pull TikTok search and hashtag data on a daily schedule, extract transcripts and comments, and see what a full week of tracking costs.

How to Automate Login with 2FA Using a Browser Agent
Automate login with 2FA safely by pairing an AI browser agent with vault secrets and local TOTP tools so credentials never enter the LLM prompt.

Give Claude Code web search and a browser in one command
Add a remote MCP server to Claude Code in one terminal command for live web search, page crawling, and browser screenshots on one prepaid API key.