Mapsscraper is a simple and free open-source CLI tool for scraping business information from Google Maps.
Built in less than 500 lines of Go. The application scrapes business information from Google Maps using web automation. Given a set of coordinates, a query string and a search raduis, the tool collects details like business names, addresses, ratings, review counts, and phone numbers for a given search term and location and saves the results in a CSV file. A tipical search will find a couple of hundred results in a few minutes.
- 🌎 Search businesses by latitude/longitude coordinates
- 📍 Configurable search radius
- 🤖 Automated browser interaction
- 💾 CSV export
- 📱 Collects Business Details: Business Name, Address, Stars, # of reviews, Phone Number and Website
An example result can found in the 'example_results' directory.
To search for prosthodontists in Mexico City within a 5 km radius, you can use the following command:
mapsscrap --lat 19.4343491 --lon -99.1775742 --query "prosthodontists" --radius 20
| Name | Address | Stars | Reviews | Phone | Hours | Website |
|---|---|---|---|---|---|---|
| Dental Services Lomas | Perif. Blvd. Manuel Ávila Camacho 66-Primer Piso | 5 | 3 | 55 4952 2356 | Abierto ⋅ Cierra a las 7 p.m. | dentalslomas.com.mx |
| Alicama 16 Di Dental Lomas | Alicama 16-1 piso, int 5 | 5 | 3 | 55 6905 6286 | Cerrado ⋅ Abre a las 12 p.m. | www.doctoralia.com.mx |
| Dental Moliere | Av. Emilio Castelar 240 | 5 | 9 | 55 4132 5981 | Abierto ⋅ Cierra a las 7 p.m. | www.dentalmoliere.com.mx |
Releases can be found on the GitHub Releases page.
If you are not sure how this works copy the content of this file and of the releases page to your LLM of choice and ask it how to do it. It should take 2 or 3 commands at the terminal to get it running.
curl -L https://github.com/edlgg/mapsscrap/releases/latest/download/mapsscrap_linux_x86_64 -o mapsscrap
chmod +x mapsscrap
sudo mv mapsscrap /usr/local/bin/mapsscrap --help
mapsscrap --lat 19.4343491 --lon -99.1775742 --query "lawyer" --radius 20-
I have no idea how to install and run this. What should I do?
Copy the content of this file and of the releases page to your LLM of choice and ask it how to do it. It should take 3 commands at the terminal to get it running.
-
How can I get the coordinates for a location?
Go to Google Maps and click on a location. The url will look like this:
https://www.google.com/maps/place/place-name/@19.4343491,-99.1775742/data=.... The coordinates are the two numbers after the@part of the URL.
- Scrape each element in list
- Save results to CSV
- Add scrolling to load more results
- parse all wanted elements
- get website for each place
- add radius search in klm
- parallelize
- headless
- add progress bar
- convert to cli
- research way to easy install
- add example query and result
- add comments to methods
- add coordinates and query to results
- env var so only one execution can run at a time
- add logging for errors and warnings
- make readme more user focused. "Want to get hundreds of potential leads in a couple of minutes?"
- add save_path argument. Default should be ./output/name.csv
- add integration tests
- add unit tests
- functionality for multiple queries and coordinates