Build a lead generation scraper with Google Maps, websites and reviews
A lead generation scraper in Python and JavaScript, from Google Maps search to each business's website and reviews, with costs per 1,000 leads.
· 7 min read
Most B2B companies that sell to local businesses build their pipeline the same way: someone opens Google Maps, searches for "dentist in Berlin" or "roofing contractor in Austin", and copies names and phone numbers into a spreadsheet. It works for twenty leads. It does not work for two thousand, and it tells you nothing about which of those leads are worth a call.
A lead generation scraper does this job in minutes and does it better, because it can read more than a person has time for. This guide builds one in three steps, each a call to the same API with the same key:
Find businesses with a Google Maps search.
Enrich each one by reading its website as clean Markdown.
Qualify the best ones by reading their latest reviews.
The result is a CSV with contact details, a short description of each business and a score, plus the code in Python and JavaScript.
Step 1: find businesses on Google Maps
The Google Maps API searches places like the Maps search box and returns up to 20 per call, each with name, primary_category, address, phone, website, rating and review_count. The SDKs follow the pagination cursor for you.
curl "https://api.scrapecrate.com/v1/maps/places/search?q=physiotherapist%20in%20Munich®ion=de&language=en" \
-H "X-API-Key: YOUR_API_KEY"Several related queries catch more businesses than one, because Google ranks places by how well their name and category match the words. For a whole country, loop over cities; for a dense city, loop over districts or use lat, lng and radius_km on a grid. Our Google Maps scraping guide covers search, details and reviews in depth.
Before going further, drop the leads you cannot use: no website (you cannot enrich them, though you may still call them), status other than operational, or a category that does not fit.
Step 2: read each website as Markdown
A Maps listing tells you a business exists. Its website tells you what it actually does: services, prices, team size, languages, booking tools, whether it already uses a product like yours. The Web Page to Markdown API fetches a page and returns its main content as clean Markdown, with title, metadata (description, language, site name...), links and word_count.
curl "https://api.scrapecrate.com/v1/web/page?url=https://example.com/" \
-H "X-API-Key: YOUR_API_KEY"A normal page costs 2 credits. Sites that build everything in JavaScript answer render_required or empty_page (400, free), and the retry with render=true costs 10 credits. Starting without the browser and retrying only when told to keeps the average cost close to 2.
Now you can look for signals in plain text: the words "online booking", "we are hiring", a list of services, the languages the site is available in, links to a contact or careers page. If the contact page is linked from the home page, read it too to find the published phone, address and contact form.
Step 3: qualify with reviews
Reviews are the best qualification signal for a local business: how many customers it has, whether they are happy, whether the owner answers, and what they complain about. If you sell a booking tool, a clinic whose reviews say "impossible to get an appointment on the phone" is a perfect lead.
Read one page of the newest reviews for each lead that passed the previous filters:
PAIN_WORDS = ("phone", "appointment", "waiting", "booking", "call back")
for lead in leads.values():
if (lead.get("review_count") or 0) < 20:
continue # too small to qualify by reviews
reviews = client.maps.place_reviews(place_id=lead["id"], sort="newest", language="en").data
texts = [(r.get("translated_text") or r.get("text") or "").lower() for r in reviews]
lead["pain_mentions"] = sum(any(w in t for w in PAIN_WORDS) for t in texts)
lead["owner_answers"] = sum(1 for r in reviews if r.get("owner_response"))translated_text puts every review in one language, so the same keyword list works in Munich, Milan and Madrid. One page has up to 20 reviews and costs 3 credits.
Businesses also collect reviews outside Maps. For software companies, G2 and Capterra matter more; for hotels, Tripadvisor and Booking.com; for apps, the App Store and Google Play. The Reviews API returns all of them in one format, described in our Trustpilot reviews guide.
Scoring and exporting
With the data in place, a simple score is enough to sort the list. For example: points for a high review_count, for pain words in reviews, for a website that mentions the services you complement, and fewer points for businesses that already show the product you replace. Then write the CSV:
import csv
def score(lead: dict) -> int:
s = min((lead.get("review_count") or 0) // 50, 5)
s += 3 * lead.get("pain_mentions", 0)
s += 2 if "online booking" not in lead.get("site_markdown", "").lower() else 0
return s
rows = sorted(leads.values(), key=score, reverse=True)
with open("leads.csv", "w", newline="", encoding="utf-8") as f:
w = csv.writer(f)
w.writerow(["score", "name", "category", "city", "phone", "website", "rating", "reviews"])
for l in rows:
w.writerow([score(l), l["name"], l["primary_category"], l["address"].get("city"),
l.get("phone"), l.get("website"), l.get("rating"), l.get("review_count")])A language model can do the qualification step even better: send it the website Markdown and five reviews with a short prompt ("Does this clinic offer online booking? What do patients complain about? Answer in JSON"). Our guide on web scraping for LLM and RAG pipelines shows how to prepare the text.
What 1,000 leads cost
| Step | Calls | Credits |
|---|---|---|
| Maps search, 20 places per page | 50 | 150 |
Website as Markdown (2 each; 10 with render=true) | 1,000 | about 2,200 |
| One page of reviews for the best 300 | 300 | 900 |
| Total | about 3,250 |
At the list price of $0.001 per credit that is around $3.25 for a qualified list of 1,000 businesses. Subscriptions lower the price further; see the pricing page. Only successful calls are billed, so dead websites and unknown IDs cost nothing.
Stay on the right side of the rules
Business listings and websites are public, but lead generation still touches personal data: owners' names, staff on the "team" page, reviewers. Collect only what your outreach needs, keep a record of where each lead came from, honour opt-outs, and check the anti-spam rules (GDPR, ePrivacy, CAN-SPAM) of each country before you send cold e-mail. Our legal guide to web scraping goes through the details.
Ready to build yours? Create a free account: the 100 free monthly credits are enough to run the whole pipeline on a first city. The parameters of every call are in the Google Maps and Web Page API references.
Frequently asked questions
What is a lead generation scraper?
A program that collects public information about potential customers, usually businesses, and turns it into a list your sales team can work with. A good one also qualifies the leads, so you call the ones that fit first.
Where do the leads come from?
For local and small businesses the best source is Google Maps, where they publish their name, category, phone, website and hours. The website then tells you what they sell and how, and the reviews tell you how they are doing.
How much does a list of 1,000 qualified leads cost?
About 50 Maps search pages (150 credits), 1,000 website reads (about 2,200 credits, a few of them in a browser) and one page of reviews for the best 300 leads (900 credits), about 3,250 credits in total, roughly $3.25 at the list price.
Can I find e-mail addresses with it?
Only the ones a business publishes on its own website, which you will find in the Markdown or the links of its contact page. Do not guess addresses or scrape personal e-mails, and follow the anti-spam rules of the countries you sell to.
Do I need proxies or a headless browser?
No. Proxies, retries and parsing are handled by the API. For websites built entirely in JavaScript, set render=true on the web page call; it costs 10 credits instead of 2.
Try it with free credits every month
One API key for every source in this guide. No card needed, and only successful calls are billed.