Getting all reviews from the Official Google Maps API

The official Google places API limits the amount of the reviews you can fetch from it to 5 reviews only. Despite many developers asking for pagination and sorting parameters since 2015 the limitation still exists. Fortunately, there are some tools you can use from your code to get ratings & reviews in the right way.


The ultimate way of fetching reviews

With Outscraper's API, you can fetch any amount of reviews from any business. You can sort the reviews, and paginate over the pages. It's possible to ignore empty reviews by using the "ignoreEmpty" parameter and there are many advanced parameters like cutoff, cutoffRating, etc.

Reviews API examples

The basic example of fetching 20 reviews by the default sorting (most relevant reviews).

				
					# fetch 20 most relevant reviews
curl -X GET "https://api.app.outscraper.com/maps/reviews-v2?query=PLACE_ID&reviewsLimit=20&async=false" -H  "X-API-KEY: API_KEY"
				
			

The sort parameter might be one of the following: "most_relevant" (default), "newest", "highest_rating", and "lowest_rating".

				
					# fetch reviews with highest rating first
curl -X GET "https://api.app.outscraper.com/maps/reviews-v2?query=PLACE_ID&reviewsLimit=20&sort=highest_rating&async=false" -H  "X-API-KEY: API_KEY"

# fetch reviews with lowest rating first
curl -X GET "https://api.app.outscraper.com/maps/reviews-v2?query=PLACE_ID&reviewsLimit=20&sort=lowest_rating&async=false" -H  "X-API-KEY: API_KEY"

				
			

In addition to the reviewsLimit parameter you can specify cutoffRating. The parameter specifies the maximum for "lowest_rating" or the minimum for "highest_rating" rating for reviews.

				
					# fetch reviews with 5 and 4 stars ratings only
curl -X GET "https://api.app.outscraper.com/maps/reviews-v2?query=PLACE_ID&reviewsLimit=1000&sort=highest_rating&cutoffRating=4&async=false" -H  "X-API-KEY: API_KEY"


				
			

The cutoff parameter will help you to fetch only the newest reviews till the specific date in the past. Might be helpful when you have all the reviews in your database and want to fetch only the reviews that were added since your last update.

				
					# fetch reviews till the specific date (cutoff)
curl -X GET "https://api.app.outscraper.com/maps/reviews-v2?query=PLACE_ID&reviewsLimit=250&sort=newest&cutoff=1629269269&async=false" -H  "X-API-KEY: API_KEY"
				
			

There is build-in pagination that you can use to fetch many pages of reviews. Use the skip parameter to control where API begins returning results.

				
					# page 1, sorted by newest
curl -X GET "https://api.app.outscraper.com/maps/reviews-v2?query=PLACE_ID&reviewsLimit=20&sort=newest&async=false" -H  "X-API-KEY: API_KEY"

# page 2, sorted by newest
curl -X GET "https://api.app.outscraper.com/maps/reviews-v2?query=PLACE_ID&reviewsLimit=20&sort=newest&skip=20async=false" -H  "X-API-KEY: API_KEY"
				
			

Fetching many reviews in one request might take time. In order to prevent a timeout error from the webserver, it's recommended to use async requests. This way you will submit your requests to Outscraper and retrieve them later (usually within 1-3 minutes, depends on the amount of reviews) with the Request Results endpoint.

A good practice is to send async requests and starting checking the results at 15-sec intervals. Check out this Python implementation if necessary.

				
					# step 1: submit the task and get request id
curl -X GET "https://api.app.outscraper.com/maps/reviews-v2?query=PLACE_ID_1&reviewsLimit=2000&sort=newest&async=true" -H  "X-API-KEY: API_KEY"

# step 2: retrieve the task results later (usually within 1-3 minutes, depends on the amount of reviews)
curl -X GET "https://api.app.outscraper.com/requests/REQUEST_ID"
				
			

Google Reviews API pricing

The prices depend on the usage during the subscription period (30 days). There are different tiers starting from $0 per the first 500 reviews.

Free Tier

Usage before 500 reviews

$0/review
  • Price per one review for the usage from 1 to 500 reviews
Started Tier

Usage after 500 reviews

$0.002/review
  • Price per one review for the usage from 501 to 50,00 reviews
Business Tier

Usage after 50,000 reviews

$0.001/review
  • Price per one review for the usage after 50,000 reviews

Bonus & helpful links

10% OFF

Sign up now and use promo code: SCRAPER2021 to get the discount.

FAQ

Most frequent questions and answers

Although, Google limits the amount of reviews you can fetch with it’s official API, you can use Google Maps reviews API provided by Outscraper to get all the reviews from any places.

You can get all Reviews from Google by using Reviews API or by using Google Reviews Scraper application.

  1. Copy link to you place on Google Maps
  2. Go to Google Maps Reviews scraper
  3. Insert the link into queries input
  4. Set up sorting, and other parameters
  5. Start extraction
Categories: API

0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *

en_US