DEV Community

Iscle Beltran
Iscle Beltran

Posted on

How to build a B2B lead list from Google Maps with emails (Python, no browser)

Google Maps is the biggest free directory of local businesses. The problem: it shows phones and websites, but not emails. Here's how I get a lead list with emails for any business type and city in a few lines of Python.

The idea

  1. Search Google Maps for a business type in a location ("dentist" in "Madrid, Spain").
  2. For each place with a website, visit the site and extract emails and social profiles.
  3. Keep only clean, contactable data: E.164 phones, emails with valid MX records, no tracking parameters.

I packaged this as an Apify Actor, Google Maps Email Extractor, so it runs in the cloud and exports to JSON, CSV or Excel.

Run it from Python

pip install apify-client
Enter fullscreen mode Exit fullscreen mode
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("iscle/google-maps-leads-emails").call(run_input={
    "searchQueries": ["dentist", "orthodontist"],
    "location": "Madrid, Spain",
    "maxPlacesPerQuery": 100,
    "scrapeContacts": True,
    "onlyWithEmail": True,
})

for lead in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(lead["name"], lead.get("email"), lead.get("phone"), lead.get("website"))
Enter fullscreen mode Exit fullscreen mode

What came out in my tests (18 Nov 2026)

Searches Places With website With email
dentist + plumber, Madrid 260 236 165 (63 %)
plumber Austin TX, Italian restaurant Berlin, coworking Lisbon 167 165 119 (71 %)

260 places with website enrichment took about 2 minutes.

Tips

  • Google Maps returns roughly 120–140 places per search. For more, split by neighbourhood ("dentist Chamberí Madrid").
  • Emails are tagged generic, personal or legal; use generic (info@, hello@) for first contact.
  • Respect local rules on B2B outreach (GDPR in the EU, CAN-SPAM in the US).

Pricing

Pay per event: a small fee per place, and the email fee only when an email is actually found. If you already have a list of websites, the companion Website Email Extractor does just the enrichment step.

Questions or ideas? Leave a comment.

Top comments (0)