https://github.com/andrepradika/scrape-google-maps
π Google Maps Business Scraper πΊοΈπ A Python-based tool that automates business data extraction from Google Maps using Playwright. Easily collect details like: π’ Business Name | π Address | π Website | π Phone | β Reviews | π Coordinates πΉ Saves data in Excel & CSV πΉ Perfect for lead generation & market research πΉ Supports bulk searches
https://github.com/andrepradika/scrape-google-maps
automation crawl data-extraction google-maps scrape web-scraping
Last synced: 3 months ago
JSON representation
π Google Maps Business Scraper πΊοΈπ A Python-based tool that automates business data extraction from Google Maps using Playwright. Easily collect details like: π’ Business Name | π Address | π Website | π Phone | β Reviews | π Coordinates πΉ Saves data in Excel & CSV πΉ Perfect for lead generation & market research πΉ Supports bulk searches
- Host: GitHub
- URL: https://github.com/andrepradika/scrape-google-maps
- Owner: andrepradika
- Created: 2025-03-08T03:18:24.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2025-03-08T03:26:10.000Z (3 months ago)
- Last Synced: 2025-03-08T04:20:42.744Z (3 months ago)
- Topics: automation, crawl, data-extraction, google-maps, scrape, web-scraping
- Language: Python
- Homepage:
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Google Maps Business Scraper
## Overview
This script scrapes business details from Google Maps using Playwright and stores the extracted data in Excel and CSV formats.## Features
- Automates Google Maps search for businesses.
- Extracts details such as name, address, website, phone number, reviews average, and coordinates.
- Saves the data in both Excel and CSV formats.
- Supports batch search via `input.txt`.## Requirements
- Python 3.7+
- Playwright
- Pandas## Installation
1. Clone the repository or download the script.
2. Install dependencies:
```bash
pip install playwright pandas
playwright install
```## Usage
### Run the script with a single search term:
```bash
python script.py -s "Restaurants in New York" -t 50
```### Run the script with multiple search terms from `input.txt`:
1. Create a file named `input.txt` and list search queries (one per line).
2. Run the script without arguments:
```bash
python script.py
```### Arguments
- `-s`, `--search`: Search query (e.g., "Hotels in Los Angeles").
- `-t`, `--total`: Maximum number of results to scrape.## Output
The extracted data is saved in the `output` directory as:
- `google_maps_data_.xlsx`
- `google_maps_data_.csv`## Error Handling
- If `-s` is not provided and `input.txt` is empty, an error message will be displayed.
- If scraping fails for a business, the script continues to the next one.## License
MIT License## Author
andrepradika