Extracting public data from Google Maps has many advantages. Let's learn how to scrape Google Maps effectively and legally.

Why scrape data from Google Maps
As of 2022 there were more more 200 million businesses and places referenced on Google Maps.
In 2019, Google Maps had photographed 98% of the world where people live, according to CNET.
You can be pretty sure that the 15 millions restaurants in the world are almost all there. Based on this huge numbers and coverage rate, you can only estimate how many reviews there are in total on the website.
Now that we have a few (huge) figures in mind, let’s talk about the data we can find on Google Maps.
What data can you find on google maps ?
Google Maps is a very rich database. It contains a lot of interesting public data concerning restaurants, places, landmarks, and many other locations.
Here is some data we can find on the Google Maps :
Rates ⭐️
Reviews 💬
Adresses 🗺
Timetables 🕦
Menus 🍽
Categories 🥑
Contact data 📪
Locations
What are the Use Cases of Scraping Google Maps ?
The huge cases offered by scraping Google Maps are proportional to the quantity of data we can get on Google Maps : numerous ! Let's review some of them :
1. Generate Leads
By Scraping Google Maps you can generate Leads based on different criteria. Indeed you can leverage locations, number of reviews or average rate to set up customized prospecting campaign for your services.
If your solution focuses on helping restaurants improve their presence online for instance, you could target places with poor reviews to offer them your services.
2. Analyse brand sentiment
Guess what exploded last year ? Generative AI ! Well well, could we cross skills here ? Imagine setting up a reviews pipeline from Google Maps and automatically analyse it with a LLM model, this offers huge possibilities.
We are preparing something big about that, if you want to know more, subscribe below !
3. Monitor competitor prices and offers
Being always ahead of your competitors regarding offers and prices is a big advantage. You can setup a Google Maps Scraper that focuses on specific areas and products (hotels, restaurants, etc) to gather daily prices tendencies and dynamically adapt your prices based on it
We could go on and on, and we actually wrote a detailed article concerning the 5 best Scraping Google Maps use cases. Feel free to check it out !
Subscribe to our mailing list to be notified in priority upon the launch of our new Scraping AI product !
How to scrape Google Maps ?
Now that we are convinced we won’t be losing our time today, let’s get on to business and scrape Google Maps.
Let’s wrap up what we’ll do
- Setup the project
- Analyse the target
- Extract data
- Parse data
- Little surprise : you don’t need to parse the data
Setup the project
We’ll use Node.js to extract data from Google Maps.
Node.js is a server-side JavaScript runtime that allows developers to build scalable and efficient network applications.
Node.js is useful for scraping due to its non-blocking input / output, allowing for efficient handling of multiple concurrent requests, making web scraping tasks faster and more responsive.
Ensure that you have Node.js 16.0 version installed on your computer or higher.
Initialize the project
Open a terminal and navigate to the directory where you want to create your project.
This will create a package.json file.
Add the following line at the beginning of your package.json :
Install node-fetch
Use npm to install the node-fetch module.
Create a JavaScript File
Create a new JavaScript file, for example, app.js.
Analyse the target
Now we’ll select our target : let’s extract some restaurants from San Diego.
Go to Google Maps and perform a request such as “restaurant san diego”.

Open the developer tool and go to the Network Tab. This is where you can always find hidden gold mines while analysis a Website for Scraping.
Find the “search” request corresponding to the request the browser just performed for us :

You can find the html sent back by Google server in the “Response” tab.
I’ll save you the analysis work : the gold mine here takes the form of a huge json object directly included in the html response. By targeting specifically this hidden gem, we can save us the trouble of parsing manually the whole html file !
Moreover, Google is less likely to change the structure of this file than html classes and ids, thus making our scraper even more reliable in the long run.
Extract Data
So let’s get back to our project ! Add the following code to your app.js file :
This will return the html of the page we are trying to obtain. We'll transform this huge chunk of data into a clean usable object in the next part.
Parse Data
Let's create a function to extract the hidden json object we were talking about earlier :
And add it to our main function :
Now we have a json object. But this json is not so easy to read, right ? It contains a lot of data used by Google Maps client that we don’t need.
I like to use an online JSON formatter such as this one to analyse my objects and look for precious informations.
Again, I’ll prevent you from spending more hours looking for the positions of the relevant informations in the object we obtained. Here is the code to parse the Google Maps huge json and return a clean and filtered object :
Let's update our main function :
And launch the code 🚀
And here is the result :
Pretty cool right ? We have a clean json object with precious data that we can leverage for our various use cases ! Now you can just replace the url with your search and get as much data as you want !
Want to scrape at scale ? Contact us !
Frequently asked questions
Why scrape Google Maps ?
Scraping Google Maps gives you access to countless data such as location names, reviews, rates, addresses.... You can leverage this data for many use cases, whether you want to generate leads, analyse brand perception or monitor your competitors prices and offers for instance.
Is it legal to scrape Google Maps ?
Google Maps provides accessible data that is freely available for use and distribution. Whether through manual methods like copying or utilizing web scraping tools designed for Google Maps, the key feature of public data lies in its open accessibility.
It is imperative to adhere strictly to the website's terms of service, respecting any specified limitations on data utilization. Conforming to legal and ethical standards governing activities related to scraping business data from Google Maps is of utmost importance.
Can I extract reviews from Google Maps ?
Certainly ! Reviews are located in the response to a specific request that can be accessed for each location. If you want to know more about this process, feel free to contact us !