Scrape Google Maps with Python, and when not to.

You can scrape Google Maps with Python three ways: Google's official Places API, an open-source scraper, or a browser driven by Playwright. Each needs code and upkeep, and none tells you a phone's line type. Leadity has no public API yet; if you only need the data, it exports a CSV or Excel file that loads straight into pandas.

On this page
  1. What are the three ways to scrape Google Maps with Python?Start here
  2. Which Python route suits which job?
  3. How do you use the Places API from Python?
  4. Open-source Google Maps scrapers
  5. How does a Playwright scraper work?
  6. What will your Python scraper return?
  7. How do you remove duplicates from a Google Maps scrape?
  8. How do you check phone line types in Python?
  9. What does a Python scraper cost to keep running?
  10. Limits of a do-it-yourself scraper
  11. The no-code route to the same data Leadity has no public API yet

What are the three ways to scrape Google Maps with Python?

What each one asks of you.

  1. The official Places API

    Google's own API. You get a key, call it from Python and pay under Google's pricing and terms.

  2. An open-source scraper

    A project on GitHub reads the Maps site for you. You run it, update it and fix it when Maps changes.

  3. Browser automation with Playwright

    Drive a real browser with Playwright for Python. Search Maps, scroll the results, read each listing.

Which Python route suits which job?

The three code routes and the no-code one
RouteWhat you needUpkeepPhone type
Places APIA Google Cloud key and billingLow: the API is stable, its terms limit storageNot returned
Open-source scraperA server, proxies, timeHigh: breaks when Maps changesNot returned
PlaywrightA browser, proxies, your own codeHigh: you maintain every selectorNot returned
Leadity, no codeA browser and an accountNoneValidated in four steps, line type included

How do you use the Places API from Python?

Use Google's Places API web service. Search by text or by place, and ask only for the fields you need.

The API returns structured place fields, but not a phone's line type or the owner's name, the two fields a sales list needs most.

Read its usage and billing page and the Maps Platform terms before you start. The terms limit how you can store and reuse what it returns.

Open-source Google Maps scrapers

One example is gosom/google-maps-scraper on GitHub. Scrapers like it read the Maps website itself.

So they break when Maps changes its pages. Upkeep means watching for errors, updating the code, and handling blocks and captchas.

How does a Playwright scraper work?

The outline.

  1. Open and search

    Open Google Maps in a Playwright browser. Search for a trade and a place.

  2. Scroll the results

    Scroll the results panel until no new listings load.

  3. Read each listing

    Open each one and read the name, phone, address, website and rating.

  4. Save and de-duplicate

    Save the rows, then remove the repeats that neighbouring searches return.

What will your Python scraper return?

Expect about 37 in 100 listed phones to be mobiles: 36.8% were, in Leadity's Q3 2026 Google Maps data (1 July to 30 September 2026). 15.1% of businesses list no phone at all.

Expect about 36 in 100 listings to show no website: 35.9% of the 2,782,509 businesses in the same data.

Expect one ZIP code search to return 17.5 businesses on average, from about 32 for marketing agencies to about 5 for software companies.

Expect the area code to tell you nothing about the line type: 47.5% of exchanges mix kinds of line, per NANPA records read 22 September 2026. Sources: Leadity's Q3 2026 Google Maps data, read 20 October 2026, and NANPA.

What this means for you: you cannot spot a mobile from its area code or its first six digits. Leadity checks each number, so you do not have to.

How do you remove duplicates from a Google Maps scrape?

Key every row on its Google Place ID, not its name or phone, because chains share names and owners share phones.

Neighbouring ZIP code searches overlap, so the same business comes back from several of them. Leadity's own counts key on the Place ID too, so each business is counted once.

Drop a row when its Place ID is already in your table, and keep the newest read of each listing.

How do you check phone line types in Python?

Match each number's first seven digits against the NANPA thousand-block records, which name the carrier that holds each block of 1,000 numbers.

Do not stop at the exchange: 47.5% of exchanges hold more than one kind of line, and labelling by exchange gets 25% of blocks wrong, per NANPA records read 22 September 2026.

40.5% of the 1,539,378 blocks belong to wireless carriers. A ported number keeps its old block, so a block lookup says what a number was assigned as.

What does a Python scraper cost to keep running?

The code is the easy part. One search shows a limited list, so you search ZIP code by ZIP code, and nearby searches overlap, so you remove repeats.

Then you still need each phone's type and each business's email, which are not on the listing.

Budget for proxies and captcha handling too, because Maps throttles traffic that looks automated.

Limits of a do-it-yourself scraper

A scraper you run does not check line types: an area code cannot tell you a mobile, so you need phone validation on top (format, allocation, carrier lookup and line type).

A scraper that reads the Maps site breaks when the site changes, and it cannot read emails, which are not on the listing.

Google's terms limit automated access. Whether you may scrape, and what you may do with the data, is a question for your own counsel.

The no-code route to the same data Leadity has no public API yet.

If you only need the data, order the list in the web app and download a CSV or Excel file. From $0.0032 a business record, $0.016 with a carrier-verified mobile.

The file loads straight into pandas: pd.read_csv("leadity.csv").

Each row carries the Google Place ID, so it joins cleanly to anything your own scraper already collected.

Questions about scraping Google Maps with Python

Is there a Google Maps scraper API for Python?

Google's Places API is the official way to get place data with Python: you get a key, call the web service and pay under Google's pricing and terms. Leadity has no public API yet; its lists download as CSV or Excel, which load into pandas with one line of code.

Is scraping Google Maps with Python legal?

Whether scraping Google Maps with Python is legal depends on where you are and how you use the data, and that is a question for your own counsel. Google's terms limit automated access, and the Maps Platform terms limit how API results are stored. This guide is not legal advice.

Can I get phone types with a Python Google Maps scraper?

A Python Google Maps scraper cannot get phone types from the listing, because Maps does not show them and the area code cannot tell you. You need a validation step: format, allocation, a carrier lookup and a line type, checked against carrier data. 47.5% of exchanges mix kinds of line, per NANPA records read 22 September 2026.

Is there a free Google Maps scraper that needs no Python?

Yes, the Leadity Chrome extension is a free Google Maps scraper that needs no Python: account holders collect up to 200 new leads, 100 phone checks and 200 searches a day (new accounts may start at 100 leads and 40 checks). It installs from Connectors inside a Leadity account and exports CSV or Excel.

How do I get emails with a Python Google Maps scraper?

A Python Google Maps scraper gets emails only by visiting each business's own website, because listings carry none. Your script has to follow the website field, read the homepage and contact pages, and pick the best address. Leadity's email filter does that during the scrape, at 1 credit a lead.

How many results does a Python Google Maps search return?

A Python Google Maps search anchored on one ZIP code returns 17.5 businesses on average, in Leadity's Q3 2026 Google Maps data (1 July to 30 September 2026): about 32 for marketing agencies, down to about 5 for software companies. One search shows a capped list, so your script must sweep ZIP code by ZIP code and remove repeats.

Skip the code.

Keep the data.

Pick a trade and an area. Download a CSV. Load it into pandas.