Technologies used:
- Serper.dev for Google Maps scraping
- Google Sheets for storing results
- ZipCodeBase API to fetch all zip codes within the specified radius area
- JavaScript for data processing
This fully automated system scrapes Google Maps for relevant business listings based on a search query (e.g. "Mexican restaurant") within a specified radius (as big as 500 miles), stores them in Google Sheets, and ensures no duplicates; at a cost of just $1 per 1,000 places scraped. Ideal for any business or marketing team that needs an easy, cheap, and efficient way to gather, organize, and track Google Maps businesses for outreach, research, or lead generation.
This automation was created by Ingrid Coll. See my other projects on GitHub at github.com/ingridcoll or send me a LinkedIn message at linkedin.com/in/ingridcoll with any questions or business inquiries!
- Automatically pulls a list of areas and associated search queries from Google Sheets.
- Only processes areas marked as “not scraped” to avoid redundancy.
- Starts a loop iteration for each area and initiates the process to scrape businesses from Google Maps.
- Optimized to avoid n8n running out of memory by separating each scraping into its own loop iteration.
- Pulls all zip codes within the specified search radius with the ZipCodeBase API, to iterate over them one by one (maximizes number of businsesses found).
- Iterates over each zip code within the given radius, using Serper.dev API to scrape Google Maps for businesses matching the specified query (e.g., "dentist" or "wedding venue").
- Pulls business details including
name,address,category,website,rating, andphone number, ensuring high-quality, accurate data for each location. - Ensures the system covers all target zip codes in the area, increasing the breadth of collected data.
- Eliminates the need for manual location checks, automating the entire scraping process across multiple zip codes.
- Processes the scraped businesses by removing duplicates (businesses with the same name or website are filtered out to ensure no redundancy).
- Appends or updates rows in Google Sheets based on unique identifiers (UIDs), keeping data up-to-date and ensuring accurate tracking of each lead.
- Marks each area as “scraped” in the main sheet, preventing re-scraping of the same locations in future runs.
- Frees up sales and marketing teams from manual data entry.
- To draw a radius over a map visualization and make sure the correct area will be targeted: https://www.calcmaps.com/map-radius/
- To see a map of all zip codes: https://www.randymajors.org/zipcodegmap?x=-98.1098958&y=30.0295675&cx=-97.9917928&cy=29.8748836&zoom=9&zipcodes=show
- Find the .json file in this repository and either select all the text and copy it, or download the file to your local computer by selecting "Download raw file".
- Log into your n8n instance and create a new blank workflow.
- If you copied the .json contents, simply paste the workflow into the blank canvas. If you downloaded the .json file, on the top-right of the screen, select the three dots and click on "Import from file...". Upload the .json file from your local computer.