Scraping all the reviews from McDonald's restaurants
In this article, you will learn about the way of extracting all Google Maps reviews from the global foodservice retailer. This method can also be applied to any other brand or a whole category of businesses.
The current tutorial does not require technical skills, and can easily be employed by anyone with the access to the internet. Although, you can use the एपीआई to automate the process.
It can be used by data scientists in natural language processing, by marketers for brand researching, by developers for building cool applications, tools, and platforms.
Three simple steps of exporting reviews
Firstly, scraping all the places from Google Maps. This will allow you to verify that you have all the locations that you need and give you the data from Google Maps places required for the second step.
Secondly, scraping all the reviews from the places you've got from the previous step by using unique IDs for each place (google_id or palce_id).
Finally, once you have all the reviews and all the places you will learn about monitoring and scraping only new reviews so you can keep your database up to date with a minimal cost of maintaining it.
Before we begin
In this tutorial, we'll use Outscraper's Google Maps and Google Reviews scrapers. However, the principle described in this article is not limited to this tool specifically and can be applied by any other Google Maps extractor or by using the आधिकारिक Google स्थान API (although, the latter option is limited only to 5 reviews per one place).
Step 1: scraping places from Google Maps
Preparing search queries
As you might know, Google limits the number of results per one query search up to 400 items. The solution is to split locations into smaller areas: cities, towns, neighborhoods, counties, or even zip codes for some common categories that have a lot of results (e.g. "restaurants"):आउटस्क्रैपर has a list of locations that you can use. For our case with McDonald's we will go with areas without using zip codes as there are no more than 600 places per one US state. Alternatively, for some general categories that will bring thousands of places even from one big city, you can use zip codes. It's better to dedicated each task to one state to speed up the process as it will be a lot of queries for each zip code over the USA.
Submiting the taskCheck other advanced parameters before starting the extraction. You might want to remove duplicates, change the language or set up the total limit. Once you are ready to start press the "Scrape Data" button, validate, and confirm the task.
Once the task of scraping locations is finished you will receive an email with the link to the file. You can see the current progress of the task on the कार्य पृष्ठ.
Step 2: exporting all the reviews from the places
Once the task is finished you can use the google_id column as a source for reviews extraction. Unique Google IDs can be used as plain queries for Google समीक्षाएं स्क्रैपर.
Submiting the task
Again, go over queries and advanced parameters before starting the scraping task. Set up the limit, sort, or change the language for the reviews.Once everything is ready, you can start the extraction task. This task will take more time as there are many reviews.
Step 3: scraping only new reviews
After the first steps, you will have complete businesses data and reviews available on Google. However, in a few weeks that data will be outdated as users will add more reviews.
आउटस्क्रैपर allows you to get only new reviews till the specific date by using the cutoff parameter. It will fetch all the newest reviews and stop at a specific time (e.g. the date of your last extraction). Hence, you can enrich your database periodically and keep it up to date with the latest changes.