google-maps-scraper

This is a pupeeter based scraper for Google Maps. This script will seach for the term you provide and scrape the information from the search results.

APACHE-2.0 License

Downloads
59
Stars
1
Committers
2

Google Maps Scraper

Note: This script might break if Google changes the structure of the website. If you encounter any issues, please open an issue on the GitHub repository or create a pull request.

This is a pupeeter based scraper for Google Maps. This script will seach for the term you provide and scrape the information from the search results. Each search will be saved in a separate file in the current directory. Due to the limitations of the Google Maps API, this script will not work for more than 120 search results.

The output file will be a csv file with the following format:

- Name
- Business Type
- Address
- Phone
- Website
- Rating
- URL
- Scraping Date
- Website

Important: This script is for educational purposes only. Please make sure to respect the terms of service of Google Maps and do not use this script for commercial purposes.

Prerequisite

The following software is required to run this script:

Usage

You can run the script by providing the search term as an argument. For example, to search for restaurants in New York, you can run the following command:

npx google-maps-scraper "restaurants in New York"

Or you pass the search term as well as the output file name. In this case, 10 scroll events will be performed to load more results:

npx google-maps-scraper "restaurants in New York" 10 "User/Path/To/OutputFile.csv"

This will start a search for restaurants in New York and save the results in a file in the current directory. The file will be named restaurants-in-new-york.csv.

NAME TYPE STAR RATING ADDRESS PHONE WEBSITE SCRAPED AT EMAIL CONTACTED URL
OLIO E PIÙ Italienisches Restaurant 4,6 Sterne 3 Greenwich Ave, New York, NY 10014, Vereinigte Staaten +1 212-243-6546 Opentable, Menus, Website 2024-08-06T15:41:10.406Z Google Maps
Boucherie West Village Französisches Restaurant 4,7 Sterne 99 7th Ave S, New York, NY 10014, Vereinigte Staaten +1 212-837-1616 Opentable, West Village Menus, Website 2024-08-06T15:41:12.208Z Google Maps
Gramercy Tavern Restaurant 4,6 Sterne 42 E 20th St, New York, NY 10003, Vereinigte Staaten +1 212-477-0777 Menu, Website 2024-08-06T15:41:14.022Z Google Maps

Author

This tool is created by Robert Julian Kratz. You can find the source code on my profile robert-kratz.

License

This project is licensed under the Apache License - see the LICENSE file for details.

Package Rankings
Top 31.95% on Npmjs.org
Related Projects