What is Google-Maps-Scrapper?
Google-Maps-Scrapper is a Python script, published on GitHub by Zohaib Bashir under the MIT license, that opens Google Maps in a Chromium browser through Playwright, runs a search and collects business details from the result listings. The README lists the extracted data as business name, address, website, phone number, review count and average rating, service options, operating hours, place type and an introduction text. The results are written to a CSV file.
The repository is small: a single script, main.py, a requirements.txt file, an example result.csv and the license. There are no GitHub releases and no package on a package index; the README installs the project by cloning the repository, installing the Python dependencies with pip and downloading the Playwright browsers with playwright install. The repository has three branches: main, Latest_Libraries for newer dependency versions (which the README says can cause issues, with main preferred) and Linux for Linux systems where the main branch does not work correctly.
The version described here is the default branch at commit c702488 of May 18, 2026, which updated the locator for the Google Maps search input. Earlier changes in the commit history include a June 2025 refactor that added the --append option and an April 2024 change that replaced fixed timeouts with waits for page elements.
The script uses the synchronous Playwright API and pandas. The requirements file pins Playwright 1.44.0, pandas 2.2.2, NumPy 1.26.4 and openpyxl 3.1.2. The README asks for Python 3.8 or 3.9, states that Python 3.10 and later may not be compatible with some dependencies, and requires Google Chrome or Chromium. On Windows the code starts Chrome from its default installation path under C:\Program Files\Google\Chrome; on other systems it starts the Playwright Chromium build. The browser window is visible, not headless.
Data is located with XPath expressions that match the current Google Maps page markup. The README notes that changes to the Google Maps DOM can break the script, in which case the XPaths in main.py have to be updated, and it advises against running too many scrapes in a short period to avoid being blocked by Google. Each run handles one search query and writes CSV only; the project has no web interface, API, scheduler or review text extraction. The author offers custom scraping work through Upwork and LinkedIn, as stated in the README.
Key capabilities
- Search query input The
-sor--searchargument sets the text typed into the Google Maps search box, for example"Turkish Restaurants in Toronto Canada". Without the argument the script searches forturkish stores in toronto Canada. One query is processed per run. - Result count The
-tor--totalargument sets how many listings to collect; the default is 1. The script scrolls the result list until it has found at least that many entries or until no new entries appear, and logsArrived at all availablein the second case. - Name and address For each listing the script clicks the result, waits for the place heading to load and reads the business name and the address line. Listings where no name can be read are skipped with a warning instead of being written as empty rows.
- Website and phone number The website shown on the place panel and the phone number from the call button are stored as text in the
websiteandphone_numbercolumns. Fields that are missing on a listing stay empty. - Review count and rating The number of reviews is parsed into an integer and the average star rating into a decimal number, with comma decimal separators converted. Only these two values are collected; the text of individual reviews is not extracted.
- Service options The script reads the information lines under the place header and sets
store_shopping,in_store_pickupandstore_deliveryto Yes or No depending on whether the listing mentions shopping, pickup or delivery. - Place type and opening hours The category label shown by Google Maps (for example a restaurant type) is stored as
place_type. Theopens_atcolumn holds the opening hours text, read from the hours button or, as a fallback, from the hours summary line. - Introduction text When a listing has a short description, the script stores it in the
introductioncolumn. Listings without one get the valueNone Found. - Column cleanup Before writing, the results are loaded into a pandas DataFrame and every column in which all rows have the same value is dropped. The example result.csv in the repository therefore contains only the columns name, address, website, phone_number, reviews_count, reviews_average, place_type and opens_at.
- CSV output Results are written with pandas to
result.csvby default, or to another path set with-oor--output. The README describes the file as the input for further analysis or for import into other tools. - Append mode With
--append, new rows are added to the end of an existing CSV file instead of replacing it. The header row is written only when the file does not exist yet, so several runs can be collected in one file. - Visible Chromium browser The browser is launched through Playwright with
headless=False, so the search and the clicks happen in a visible window. On Windows the code uses the installed Google Chrome; on other systems it uses the Chromium build downloaded byplaywright install, as described in the Playwright for Python documentation. - Progress logging The script logs to the terminal with the Python logging module at INFO level: the number of listings found while scrolling, the total selected, warnings for fields that could not be parsed and the number of rows saved.
- Installation The README steps are
git cloneof the repository,pip install -r requirements.txtandplaywright install, followed bypython main.pywith the arguments above. Python 3.8 or 3.9 is the stated requirement, with Chrome or Chromium installed. - Alternative branches The Latest_Libraries branch targets current versions of the dependencies and the Linux branch is offered for Linux systems where
maindoes not run correctly. The README recommendsmainas the default. - MIT license The code is released under the MIT license, copyright 2023 Zohaib Bashir.
Where Google-Maps-Scrapper fits
Collecting a list of businesses for one search
The README example python main.py -s "Turkish Restaurants in Toronto Canada" -t 20 opens Google Maps, searches for the phrase, scrolls until 20 results are loaded and visits each one. Progress appears in the terminal, and the rows are saved to result.csv in the working directory once the browser closes.
Building one file from several searches
Adding -o with a file name and --append keeps earlier rows, as in the README example that writes to toronto_turkish_restaurants.csv. Because constant columns are dropped per run, files built from several runs can have rows written with different column sets under the header of the first run.
Exporting business data for analysis
The CSV output holds names, addresses, websites, phone numbers, review counts, average ratings, place types and opening hours, which the README positions as input for further analysis or other tools. The file is plain CSV produced by pandas, without a separate JSON or spreadsheet export.
Running on Linux or with newer libraries
On Linux the default branch uses the Playwright Chromium build. The README points to the Linux branch if main does not work correctly there, and to the Latest_Libraries branch for current dependency versions, with the note that it can cause issues.
Updating selectors after Google Maps changes
All fields are read through XPath expressions defined at the top of extract_place in main.py. The README states that Google Maps markup changes can break extraction and that these XPaths are the place to update; the most recent commit on main changed the locator for the search input for this reason.
Similar scraping projects in the directory include Scrapling, Crawl4AI and Maxun.
Reviews of Google-Maps-Scrapper
Be the first to share your experience with Google-Maps-Scrapper.
Write a review
Loading review form…
Found Google-Maps-Scrapper useful? Upvote it todayYour vote helps other IT teams find it in the daily ranking.

