Collectors · Lead generation
Lead scraper API in Python
Businesses for a keyword + location enriched with emails, phones and socials from their websites. One POST from Python with query and location, rows back as JSON with 34 fields, $0.01 per delivered lead. No proxies or parsers to maintain.

First call
Install, call, read the rows.
pip install requestsimport os, requests
r = requests.post(
"https://api.quanticdata.io/v1/scraper/collectors/local_business_leads/run",
headers={"Authorization": f"Bearer {os.environ['QD_API_KEY']}"},
json={
"query": "dentist",
"location": "Austin, TX",
"country": "us",
"max_results": 10,
},
timeout=120,
)
r.raise_for_status()
run = r.json()["payload"]
print(run["count"], "rows,", run["cost"]["usd"], "USD")
for row in run["results"]:
print(row.get("name"), row.get("category"), row.get("rating"), row.get("reviews"))The key comes from an environment variable, never from the code. The run answers in the same request when it finishes in time; payload.results holds the rows and payload.cost what they cost.
Request parameters
What the collector takes.
| Parameter | Type | Required | Meaning |
|---|---|---|---|
query | string | yes | Business type, e.g. "dentist", "officina meccanica". |
location | string | yes | City / area, e.g. "Austin, TX". |
country | string | no | ISO 3166-1 alpha-2 code — proxy exit geo and Google locale (gl). Omit for the default pool. |
lang | string | no | Interface language (hl), e.g. en, it, de. |
only_with_contacts | boolean | no (default false) | Deliver only leads with at least one email or phone. |
directories | array | no | Add businesses listed in these Italian directories that Google Maps did not return — the operators with no web presence. Off by default: it delivers, and bills, more rows. |
cross_check | boolean | no (default false) | Resolve the same business across the channels into one record instead of delivering it twice. Matching is on the phone number, on street+civic plus a distinctive word of the name, or on the name alone when it carries two distinctive words. Adds sources, sources_count, matched_by and address_confirmed to every row. Off by default: it changes the shape of the delivered rows. |
verify_emails | boolean | no (default false) | Add email_check to each row: syntax, whether the domain has a mail server that accepts delivery (MX), whether the address is a role mailbox (info@, segreteria@) and whether the same address appears on other rows of the run. |
deep_contacts | boolean | no (default false) | When the homepage shows no email, try up to three of the site's own pages instead of one — contatti, dove siamo, and the privacy notice, which in Italy has to name the data controller with an address. Stops at the first page that yields an email. |
serp_emails | boolean | no (default false) | For businesses whose site showed no email, run one web search on their domain and keep any address the search engine quotes in its snippets — only when it is on the business's own domain. One search per such business. |
professionals | boolean | no (default false) | Read MioDottore for the same category and place and attach the professionals who practise at each business — name, specialty, profile and published prices. Maps gives you the practice and its website; this gives you the person to address the letter to. Matched by phone or by street and civic number, never by name: a dentist is not called like the clinic. |
professional_phones | boolean | no (default false) | Open each professional's profile to read their phone numbers too. One extra request per professional; only meaningful with professionals. |
professionals_as_leads | boolean | no (default true) | With professionals: the practices MioDottore lists at addresses that Maps and the directories did not return become rows of their own (source: miodottore, sources_count 1). Set false to only attach professionals to the businesses already found. |
enrich_details | boolean | no (default false) | Look up the place card of every business the map listed without its weekly hours or its review count, and fill them in (it can also add a website or phone the list row lacked). One small extra lookup per such business; off by default. |
max_results | integer | no (default 10) | How many leads to deliver at most (1–500). You pay only for delivered leads. |
Response fields
34 fields per lead.
| Field | Type | What it holds |
|---|---|---|
rank | integer | 1-based position. |
name | string | Business name. |
category | string, nullable | Google category. |
rating | number, nullable | Star rating. |
reviews | integer, nullable | Review count. |
address | string, nullable | Address. |
phone | string, nullable | Phone from Google. |
website | string, nullable | Website URL. |
emails | string[] | Emails found on the site (mailto, JSON-LD, page text). |
phones | string[] | Phones found on the site (tel: links) + Google phone. |
socials | object | { facebook, instagram, linkedin, twitter, youtube, tiktok } URLs when found. |
maps_url | string, nullable | Google Maps link. |
place_id | string, nullable | Google place id. |
data_id | string, nullable | Feature id. |
source_pages | string[] | Website pages that were scanned. |
site_status | string | scanned | no_website | unreachable | blocked |
email_source | string, nullable | With serp_emails: "search_snippet" when the address came from a search result rather than from the site itself. |
source | string | Which channel delivered the row: "google_maps" or the directory name. |
sources | string[], nullable | With cross_check: every channel that listed this business. |
sources_count | integer, nullable | With cross_check: how many independent channels agreed on it. A buyer checking a sample checks this column first. |
matched_by | string[], nullable | With cross_check: how the channels were tied together — "phone", "address" (same street and civic plus a distinctive word) or "name". |
address_confirmed | boolean, nullable | With cross_check: two channels printed the same street and civic number, not merely the same name. |
names | string[], nullable | With cross_check: the other spellings the channels used — the legal name next to the signage. |
addresses | string[], nullable | With cross_check: the addresses the channels printed, when they differ. |
professionals | object[], nullable | With professionals: who practises at this address, as { name, specialty, url, phone, prices }. The business card says "Poliambulatorio X"; this says which fifteen doctors receive there. |
email_check | object[], nullable | With verify_emails: per address { email, status: ok | no_mx | duplicate | invalid, mx, shared_with, role }. "duplicate" means the same address is on other rows — a chain's head office, not a practice. |
hours | string, nullable | Opening hours as the map shows them: today's line, or the whole week ("Monday: 9 AM–6 PM; …") when the weekly table is known. |
weekly_hours | object, nullable | Weekly opening hours as { day: hours }, when the map has them (always looked up with enrich_details). |
open_state | string, nullable | Open state as the map states it ("Open", "Closed", "Temporarily closed"…). |
latitude | number, nullable | Latitude of the place. |
longitude | number, nullable | Longitude of the place. |
price_level | string, nullable | Price level as shown on the map ($, $$, €€…). |
checked_at | string, nullable | Date (YYYY-MM-DD) the row was last checked: the end of this run. |
email_type | string, nullable | First email of the row: "generic" for a role mailbox (info@, segreteria@, the same rule as email_check.role), "personal" otherwise, null without an email. |
Add ?format=csv to the runs endpoint to get the same rows as CSV.
Long runs
Run in the background, then poll.
A run that needs more time can go to the background: send "async": true, get 202 with the run id, and poll the runs endpoint until the status is done. Reading a run is free.
import os, time, requests
H = {"Authorization": f"Bearer {os.environ['QD_API_KEY']}"}
r = requests.post("https://api.quanticdata.io/v1/scraper/collectors/local_business_leads/run", headers=H,
json={**{"query":"dentist","location":"Austin, TX","country":"us","max_results":10}, "async": True}, timeout=30)
run_id = r.json()["payload"]["run_id"]
while True:
run = requests.get(f"https://api.quanticdata.io/v1/scraper/collectors/runs/{run_id}", headers=H, timeout=30).json()["payload"]
if run["status"] in ("done", "failed"):
break
time.sleep(5)
print(run["status"], run["count"])Errors
What can come back, and what is billed.
| Status | Meaning | Billed |
|---|---|---|
400 | The input does not match the collector (payload.errors) | No |
401 | Missing or wrong API key | No |
402 | Balance and free credit do not cover the run: top up | No |
422 | The input can never resolve; retrying the same input cannot help | No |
424 | The run failed at the source (blocked, timed out, layout changed); safe to retry | No |
429 | Rate limit or a per-account brake; wait for Retry-After | No |
Only delivered rows are billed: a run that delivers nothing costs nothing.
Price
$0.01 per delivered lead.
| Rows | Cost |
|---|---|
| 1 | $0.01 |
| 1,000 | $10.00 |
| 10,000 | $100.00 |
Up to 500 leads per run; split larger jobs into several runs. The $2 free credit every month covers about 200 leads. No subscription; paid tiers lower the unit price. All collector prices: collector pricing.
Before you run it
Questions developers ask
Is there a free Local business leads API?
Every account gets $2 of free usage each month, about 200 leads of this collector at $0.01 each, with no card.
Do I have to handle proxies, retries or blocks?
No. The collector runs on our network and handles them; a run blocked at the source returns 424 and is not billed.
How many rows can one run return?
Up to 500 leads per run (the max_results input, where the collector has one).
Can an AI agent run it?
Yes: the MCP server exposes it as the run_collector tool, with the same input and price. See the MCP server.
Run it on the free credit.
Create an API key, export it as QD_API_KEY and run the example. $0.01 per delivered lead, no subscription.