---
title: "Build a lead generation scraper with one API | ScrapeCrate"
description: "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."
url: https://scrapecrate.com/blog/lead-generation-scraper
markdown: https://scrapecrate.com/blog/lead-generation-scraper.md
---

# 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.

Published November 27, 2026 · 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:

1. **Find** businesses with a Google Maps search.
2. **Enrich** each one by reading its website as clean Markdown.
3. **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](https://scrapecrate.com/google-maps-api.md) 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.

```bash
curl "https://api.scrapecrate.com/v1/maps/places/search?q=physiotherapist%20in%20Munich&region=de&language=en" \
  -H "X-API-Key: YOUR_API_KEY"
```

```python
# pip install scrapecrate
from scrapecrate import ScrapeCrate

client = ScrapeCrate()  # reads SCRAPECRATE_API_KEY

QUERIES = ["physiotherapist in Munich", "physiotherapy clinic in Munich", "sports physio in Munich"]

leads = {}
for q in QUERIES:
    for place in client.maps.iterate("places_search", q=q, region="de", language="en"):
        leads.setdefault(place["id"], place)  # the place ID removes duplicates across queries
print(len(leads), "unique businesses")
```

```javascript
// npm install scrapecrate
import { ScrapeCrate } from 'scrapecrate';

const client = new ScrapeCrate({ apiKey: process.env.SCRAPECRATE_API_KEY });
const queries = ['physiotherapist in Munich', 'physiotherapy clinic in Munich', 'sports physio in Munich'];

const leads = new Map();
for (const q of queries) {
  for await (const place of client.maps.iterate('placesSearch', { q, region: 'de', language: 'en' })) {
    if (!leads.has(place.id)) leads.set(place.id, place);
  }
}
console.log(leads.size, 'unique businesses');
```

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](https://scrapecrate.com/blog/how-to-scrape-google-maps.md) 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](https://scrapecrate.com/url-to-markdown-api.md) fetches a page and returns its main content as clean Markdown, with `title`, `metadata` (description, language, site name...), `links` and `word_count`.

```bash
curl "https://api.scrapecrate.com/v1/web/page?url=https://example.com/" \
  -H "X-API-Key: YOUR_API_KEY"
```

```python
from scrapecrate import ApiError


def read_site(url: str) -> dict | None:
    try:
        return client.web.page(url=url).data
    except ApiError as e:
        if e.code in ("render_required", "empty_page"):  # a JavaScript-only site: retry in a browser
            return client.web.page(url=url, render=True).data
        return None  # unreachable, blocked or gone: errors are never billed


for lead in leads.values():
    if lead.get("website"):
        page = read_site(lead["website"])
        lead["site_markdown"] = page["markdown"] if page else ""
        lead["site_links"] = [link["url"] for link in page["links"]] if page else []
```

```javascript
import { ApiError } from 'scrapecrate';

async function readSite(url) {
  try {
    return (await client.web.page({ url })).data;
  } catch (e) {
    if (e instanceof ApiError && ['render_required', 'empty_page'].includes(e.code)) {
      return (await client.web.page({ url, render: true })).data;
    }
    return null;
  }
}

for (const lead of leads.values()) {
  if (!lead.website) continue;
  const page = await readSite(lead.website);
  lead.siteMarkdown = page?.markdown ?? '';
  lead.siteLinks = page?.links.map((l) => l.url) ?? [];
}
```

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:

```python
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"))
```

```javascript
const painWords = ['phone', 'appointment', 'waiting', 'booking', 'call back'];

for (const lead of leads.values()) {
  if ((lead.review_count ?? 0) < 20) continue;
  const { data: reviews } = await client.maps.placeReviews({ place_id: lead.id, sort: 'newest', language: 'en' });
  const texts = reviews.map((r) => (r.translated_text ?? r.text ?? '').toLowerCase());
  lead.painMentions = texts.filter((t) => painWords.some((w) => t.includes(w))).length;
  lead.ownerAnswers = reviews.filter((r) => r.owner_response).length;
}
```

`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](https://scrapecrate.com/reviews-api.md) returns all of them in one format, described in our [Trustpilot reviews guide](https://scrapecrate.com/blog/scrape-trustpilot-reviews.md).

## 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:

```python
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](https://scrapecrate.com/blog/web-scraping-for-llm-rag.md) 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](https://scrapecrate.com/pricing.md). 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](https://scrapecrate.com/blog/is-web-scraping-legal.md) goes through the details.

Ready to build yours? [Create a free account](https://scrapecrate.com/auth/sign-up): 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](https://scrapecrate.com/docs/api/maps.md) and [Web Page](https://scrapecrate.com/docs/api/web.md) 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.

[Create a free account](https://scrapecrate.com/auth/sign-up) [Read the docs](https://scrapecrate.com/docs.md)

## Related guides

- [How to scrape Google Maps places, details and reviews Search Google Maps places, get phone, website and opening hours, and download every review as JSON. Python, JavaScript and curl code, costs and tips.](https://scrapecrate.com/blog/how-to-scrape-google-maps.md)
- [Web scraping for LLMs, from web pages to a RAG index Turn web pages into clean Markdown and YouTube videos into timestamped chunks, then embed them for retrieval. A full RAG ingestion pipeline in Python.](https://scrapecrate.com/blog/web-scraping-for-llm-rag.md)
- [Is web scraping legal? What developers need to know Public data, terms of service, GDPR and CCPA, copyright and robots.txt: what makes web scraping legal or risky, with a practical checklist for teams.](https://scrapecrate.com/blog/is-web-scraping-legal.md)

[← All guides](https://scrapecrate.com/blog.md)
