Google Maps Lead Generation: Build a B2B Lead List with an API
Turn Google Maps searches into a clean B2B lead list: search city by city, dedupe by place ID, add phone and website, then export it to your CRM.
Updated 10 min readBy the ScrapeMapsAPI team
Google Maps is the largest public directory of local businesses there is: names, categories, addresses, phone numbers, websites, opening hours and ratings for almost every shop, clinic, agency and restaurant on the planet. For B2B lead generation that makes it the obvious starting point. If you sell to dentists in Texas, roofers in Ohio or independent cafés in Berlin, the list of your prospects already exists on Google Maps: you just need to get it out in a clean, deduplicated form.
This guide shows how to build that lead list with an API instead of copying results by hand or babysitting a browser scraper. The method is simple: search one category city by city, dedupe on the place ID, keep only businesses that look like real prospects, add the details you need, and export the result to a CSV your CRM can import.
What a Google Maps lead actually contains
Before writing any code, be clear about what you can and cannot get. A search result on Google Maps gives you, per business:
- the name and the categories ("Dental clinic", "Cosmetic dentist")
- the full address, split into street, postal code, city, region and country code
- the coordinates
- the rating and the number of reviews
- the phone number and the website, when the owner published them
- the business status: operational, temporarily closed or permanently closed
What you will not get is an email address. Google Maps does not show business emails, so no honest API returns them. If you need emails, the website field is your bridge: we cover how to find contact addresses on business websites, and the legal side of emailing them, in how to extract phone numbers and emails from Google Maps.
The Places API returns all of the fields above in one search call, so for most lead lists you never need a second request per business. The Place Details API adds opening hours, the international phone format, a description, attributes and booking links, which is useful for qualifying leads but costs one call per place.
Step 1: define the list before you search
The quality of a lead list is decided before the first request. Write down three things:
- The search phrase. Use the words a customer would type into Google Maps: "physiotherapist", "wedding photographer", "HVAC contractor". Google matches categories and names, so plain terms work better than clever ones.
- The territory. A list of cities, or a list of points with a radius. One query for a whole country does not work: a single search runs out after a limited number of pages, so a query like "dentist in Texas" returns a small, biased sample of the state.
- The qualification rules. For example: operational, has a website, at least 10 reviews, rating above 3.5. Rules you apply in code are cheaper than rules you apply in a sales call.
Step 2: search city by city
The search endpoint takes a text query q and returns up to 20 places per call. You can bias the results to an area with lat, lng and radius_km, or simply put the city in the query. Here is a single call with cURL:
curl "https://api.scrapemapsapi.com/v1/places/search?q=dentist+in+Austin®ion=us&language=en&limit=20" \
-H "X-API-Key: $SCRAPEMAPSAPI_API_KEY"Each call costs 1 credit and returns one page of up to 20 places. When pagination.has_more is true, call again with the same q and cursor set to pagination.next_cursor. The cursor remembers the language, region and location of the first call, so you only need to repeat the query.
The Python script below loops over a list of cities, follows the cursors until each search is exhausted (with a page cap so a mistake never burns credits), and keeps every place in a dictionary keyed by place ID. It handles 429 responses by waiting for the number of seconds in the Retry-After header.
import os
import time
import requests
API = "https://api.scrapemapsapi.com/v1"
HEADERS = {"X-API-Key": os.environ["SCRAPEMAPSAPI_API_KEY"]}
MAX_PAGES_PER_QUERY = 10
def get(path, params):
while True:
r = requests.get(f"{API}{path}", headers=HEADERS, params=params, timeout=60)
if r.status_code == 429:
time.sleep(int(r.headers.get("Retry-After", "30")))
continue
if r.status_code != 200:
raise RuntimeError(f"{r.status_code}: {r.json()['detail']}")
return r.json()
def search_all(query, region="us"):
params = {"q": query, "region": region, "language": "en", "limit": 20}
for _ in range(MAX_PAGES_PER_QUERY):
page = get("/places/search", params)
yield from page["data"]
if not page["pagination"]["has_more"]:
return
params = {"q": query, "cursor": page["pagination"]["next_cursor"]}
cities = ["Austin", "Dallas", "Houston", "San Antonio", "Fort Worth", "El Paso"]
leads = {}
for city in cities:
for place in search_all(f"dentist in {city}, TX"):
key = place["ids"]["cid"] # always present, unlike place_id
leads.setdefault(key, place)
print(len(leads), "unique places")Two details matter here. First, the dedupe key: neighbouring cities overlap, and a clinic near a city border will show up in both searches. Google's identifiers are stable, so keying on them removes duplicates exactly, with no fuzzy matching on names. The id field holds the ChIJ place ID when Google provides one; ids.cid is always present, which makes it the safest key. Our guide to place IDs, CIDs and feature IDs explains how the three relate.
Second, the page cap. Big cities can have hundreds of matching businesses; if a city's search is still returning full pages at the cap, split it into neighbourhoods with coordinates instead of paging deeper.
Step 3: cover large cities with a grid
For a dense metro area, a text query plus a city name only scratches the surface. The better approach is a grid of points, each searched with a small radius:
def grid(lat_min, lat_max, lng_min, lng_max, step):
lat = lat_min
while lat <= lat_max:
lng = lng_min
while lng <= lng_max:
yield round(lat, 4), round(lng, 4)
lng += step
lat += step
for lat, lng in grid(30.15, 30.50, -97.95, -97.60, 0.05):
params = {"q": "dentist", "lat": lat, "lng": lng, "radius_km": 3, "region": "us", "limit": 20}
page = get("/places/search", params)
for place in page["data"]:
leads.setdefault(place["ids"]["cid"], place)A step of 0.05 degrees is roughly 5 km; with a 3 km radius the circles overlap a little, which is what you want. The dedupe dictionary absorbs the overlap. Budget it before running: this grid has 8 by 8 = 64 points, so 64 credits for the first page of each cell. Note that lat and lng always go together: sending only one returns 400 invalid_location.
Step 4: qualify the leads in code
Raw search results include businesses you would never call: permanently closed shops, duplicates of chains, listings with no phone or website. Filter them out before anything reaches your CRM:
def qualified(place):
return (
place["status"] in ("operational", None)
and place["website"]
and place["phone"]
and (place["review_count"] or 0) >= 10
and (place["rating"] or 0) >= 3.5
)
good = [p for p in leads.values() if qualified(p)]
print(f"{len(good)} of {len(leads)} places pass the rules")status is null when Google does not state it, so treat it as "probably open" rather than dropping the place. The review count is a useful proxy for business size and activity: a clinic with 600 reviews is a different prospect from one with 4.
Step 5: enrich only the leads you keep
If your sales process needs opening hours (to call at the right time), the international phone format (for a dialer) or a description, fetch the details for the qualified leads only. One call per place, 1 credit each:
for place in good:
details = get(f"/places/{place['ids']['cid']}", {"language": "en"})["data"]
place["phone_international"] = details["phone_international"]
place["timezone"] = details["timezone"]
hours = details["opening_hours"]
place["hours"] = "; ".join(d["text"] or "" for d in hours["weekly"]) if hours else ""The {place} path parameter accepts a place ID, a CID or a feature ID, so you can use whichever you stored.
Step 6: export to CSV for your CRM
Most CRMs (HubSpot, Pipedrive, Salesforce, Close) import CSV with a column-mapping screen. Flatten the nested address and identifiers into columns:
import csv
columns = ["name", "category", "phone", "phone_international", "website", "street", "postal_code",
"city", "region", "country_code", "rating", "review_count", "maps_url", "place_cid"]
with open("leads.csv", "w", newline="", encoding="utf-8") as f:
w = csv.DictWriter(f, fieldnames=columns)
w.writeheader()
for p in good:
a = p["address"]
w.writerow({
"name": p["name"],
"category": (p["categories"] or [""])[0],
"phone": p["phone"],
"phone_international": p.get("phone_international", ""),
"website": p["website"],
"street": a["street"], "postal_code": a["postal_code"], "city": a["city"],
"region": a["region"], "country_code": a["country_code"],
"rating": p["rating"], "review_count": p["review_count"],
"maps_url": p["ids"]["google_maps_url"], "place_cid": p["ids"]["cid"],
})Keep the CID column. When you refresh the list next quarter, it lets you match new results to existing CRM records and spot new businesses, closures and rating changes. For more spreadsheet-oriented recipes, including a one-line cURL export, see export Google Maps search results to CSV or Excel.
The same flow works from Node.js with fetch: the request is a plain GET with one header.
const res = await fetch(
"https://api.scrapemapsapi.com/v1/places/search?" + new URLSearchParams({ q: "dentist in Austin, TX", limit: "20" }),
{ headers: { "X-API-Key": process.env.SCRAPEMAPSAPI_API_KEY } }
);
const page = await res.json();
console.log(page.data.map((p) => [p.name, p.phone, p.website]));What it costs
Billing is per call: every successful call costs 1 credit, whatever it returns, and errors are free. A full page of search results is 20 places for 1 credit, so 10,000 raw places is about 500 calls, or $1.50 at the list price of $3 per 1,000 calls. Enriching 2,000 qualified leads with details adds 2,000 calls, $6. The first 200 calls every month are free, enough to test the whole pipeline on one city. Credit packs bring the price down to $1.50 per 1,000 calls; the details are on the pricing page.
Using the list responsibly
A lead list built from public business listings is common practice, but how you use it is regulated. Calling businesses is subject to local telemarketing rules (do-not-call registries, calling hours), and emailing them falls under the ePrivacy rules in Europe and CAN-SPAM in the US. For sole traders, the business name and phone can be personal data under GDPR. Our guide is it legal to scrape Google Maps? goes through the rules in more detail. In short: contact businesses about things relevant to their business, identify yourself, make opting out easy, and do not keep data you no longer need.
To get started, create a free account, copy your API key from the dashboard and run the first script on one city. The API reference lists every parameter of the search endpoint.
FAQ
Can I get business emails from Google Maps?
No. Google Maps does not display email addresses for businesses, so neither the official API nor any honest scraping API returns them. The usual approach is to take the website from each listing and look for a contact address on the business's own site, while respecting anti-spam and data protection rules.
How many leads can I get from one Google Maps search?
One call returns up to 20 places, and a single query can be paged with cursors for several pages before Google stops returning more. For a whole city or region, split the territory into neighbourhoods or a grid of coordinates with a small radius, and dedupe the results on the place's CID or place ID.
How do I avoid duplicate leads across overlapping searches?
Key every result on a Google identifier rather than on the name. The CID in ids.cid is always present and stable, so storing results in a dictionary keyed on it removes duplicates exactly, even when the same business appears in several neighbouring searches.
How much does a Google Maps lead list cost with an API?
With ScrapeMapsAPI every successful call costs 1 credit and a search call returns up to 20 places, so 10,000 places cost about 500 calls, roughly $1.50 at the list price of $3 per 1,000 calls. The first 200 calls every month are free, and credit packs lower the price to $1.50 per 1,000 calls.
Is it legal to use Google Maps data for lead generation?
Collecting public business listings is widespread, but outreach is regulated: telemarketing rules for calls, ePrivacy and CAN-SPAM for email, and GDPR when the business is a sole trader. Contact businesses about relevant offers, identify yourself, honour opt-outs and keep only the data you need.
Try it on your own data
Create a free account and get 200 free API calls every month. No credit card required.