Google Product Reviews API
Google Product Reviews API uses /api/v1/search?engine=google_product_reviews
API endpoint to scrape real-time results.
You can obtain product_id
and prds
parameters from the Google Shopping API.
Current engine is an extension of Google Product API.
API Parameters
Search Query
-
- Name
-
product_id
- Required
- Required
- Description
-
Parameter defines the product_id you want to search. You can find these values in JSON responses or in google shopping page that appears in URL:
https://www.google.com/shopping/product/product_id
.
-
- Name
-
prds
- Required
- Optional
- Description
-
Parameter defines the product you want to search, when
product_id
is equal to 1. For example:https://www.google.com/shopping/product/1?prds=prds&gl=us&hl=en&ie=UTF-8
. Parameter also allows to write custom filters for search.
Geographic Location
-
- Name
-
location
- Required
- Optional
- Description
-
Parameter defines from where you want the search to originate. If several locations match the location requested, we'll pick the most popular one. Head to the Locations API if you need more precise control.
-
- Name
-
uule
- Required
- Optional
- Description
-
Parameter is the Google encoded location you want to use for the search. SearchApi automatically generated the
uule
parameter when you use thelocation
parameter but we allow you to overwrite it directly.uule
andlocation
parameters can't be used together.
Filters
-
- Name
-
rating
- Required
- Optional
- Description
-
Parameter filters reviews based on the rating of the review. The rating must be an integer number from
1
to5
.
-
- Name
-
filter_token
- Required
- Optional
- Description
-
Allows retrieving a single page of reviews for a specific product feature or attribute. The filter token can be obtained from the initial Google Product Reviews JSON response. It is not compatible with other filters or pagination parameters.
Localization
-
- Name
-
google_domain
- Required
- Optional
- Description
-
The default parameter
google.com
defines the Google domain of the search. Check the full list of supported Googlegoogle_domain
domains.
-
- Name
-
gl
- Required
- Optional
- Description
-
The default parameter
us
defines the country of the search. Check the full list of supported Googlegl
countries.
-
- Name
-
hl
- Required
- Optional
- Description
-
The default parameter
en
defines the interface language of the search. Check the full list of supported Googlehl
languages.
Pagination
-
- Name
-
num
- Required
- Optional
- Description
-
This parameter specifies the number of reviews to display per page. By default, it is set to
10
. Max num per page is100
, min -1
. Note: this parameter is not compatible with a customprds
parameter.
-
- Name
-
next_page_token
- Required
- Optional
- Description
-
Parameter defines the next page token that is used to retrieve the next page of results. Note: this parameter is not compatible with a custom
prds
parameter.
Engine
-
- Name
-
engine
- Required
- Required
- Description
-
Parameter defines an engine that will be used to retrieve real-time data. It must be set to
google_product_reviews
.
API key
-
- Name
-
api_key
- Required
- Required
- Description
-
The
api_key
authenticates your requests. Use it as a query parameter (https://www.searchapi.io/api/v1/search?api_key=YOUR_API_KEY
) or in the Authorization header (Bearer YOUR_API_KEY
).
API Examples
Filters
Filters appear only in English languages. For example, hl=au
, hl=nz
, hl=en
.
It contains detailed information such as filter titles, review counts, and corresponding filter_token
values.
https://www.searchapi.io/api/v1/search?engine=google_product_reviews&product_id=5253447980445207469
- Python
- Node
- Ruby
- Java
- Go
- PHP
- Bash
- R
- Kotlin
- Swift
- C#
- C
- C++
- requests
import requests
url = "https://www.searchapi.io/api/v1/search"
params = {
"engine": "google_product_reviews",
"product_id": "5253447980445207469"
}
response = requests.get(url, params=params)
print(response.text)
{
"filters": [
{
"title": "Ease of use",
"reviews": 640,
"positive_reviews": 609,
"negative_reviews": 31,
"filter_token": "dGFnOjg0LHJzazpQQ185ODIwNDY2NzMwNDg3NTE2MTI2LG9wcHRhZzoxNDU="
},
{
"title": "Performance",
"reviews": 610,
"positive_reviews": 537,
"negative_reviews": 73,
"filter_token": "dGFnOjQ0OCxyc2s6UENfOTgyMDQ2NjczMDQ4NzUxNjEyNixvcHB0YWc6NDQ3"
},
...
]
}
Product
https://www.searchapi.io/api/v1/search?engine=google_product_reviews&product_id=11825672369752322331
- Python
- Node
- Ruby
- Java
- Go
- PHP
- Bash
- R
- Kotlin
- Swift
- C#
- C
- C++
- requests
import requests
url = "https://www.searchapi.io/api/v1/search"
params = {
"engine": "google_product_reviews",
"product_id": "11825672369752322331"
}
response = requests.get(url, params=params)
print(response.text)
{
"product": {
"product_id": "11825672369752322331",
"title": "Apple iPhone XR - Red - 64 GB - Unlocked(55,104)",
"link": "https://www.google.com/shopping/product/11825672369752322331?ie=UTF-8&gl=us&hl=en&prds=pid:8740609057154060728,rsk:PC_15653290272112071452",
"rating": 4.5,
"reviews": 55104,
"reviews_histogram": {
"1": 3088,
"2": 1160,
"3": 2335,
"4": 7147,
"5": 41374
}
},
...
}
Review Results
https://www.searchapi.io/api/v1/search?engine=google_product_reviews&product_id=445989611894468931
- Python
- Node
- Ruby
- Java
- Go
- PHP
- Bash
- R
- Kotlin
- Swift
- C#
- C
- C++
- requests
import requests
url = "https://www.searchapi.io/api/v1/search"
params = {
"engine": "google_product_reviews",
"product_id": "445989611894468931"
}
response = requests.get(url, params=params)
print(response.text)
{
"review_results": {
"reviews": [
{
"username": "trung.n",
"source": "influenster.com",
"date": "February 11, 2024",
"rating": 4,
"text": "While searching for a set of wireless headphones to use with my Apple products,..."
},
{
"username": "queenie.n",
"source": "influenster.com",
"date": "May 17, 2024",
"rating": 4,
"text": "First, let's briefly touch on Beats by Dr. Dre. The Beats Solo3 has a strong tightening feeling. Actually,..."
},
...
]
},
"pagination": {
"link": "https://www.google.com/shopping/product/445989611894468931/reviews?gl=us&ie=UTF-8&hl=en&prds=cid:445989611894468931,cs:1,pid:2290967491568342657,rnum:10,rpt:EngKdgp0MCwwLjk1NjgwOTYzOTkzMDcyNTEsImE6MDAwMDAwMDAwMDAwM2RlYSIsImE6MTcxMjMwMTQ0OTE0NDA5Nzk2NzMiLDEsIjE3MTIzMDE0NDkxNDQwOTc5NjczIiwiNTUyMjk3NTY5ODQ1NTAyODE5MV9DUCI,rsk:PC_1918205548965792255,sgro:or",
"prds": "cid:445989611894468931,cs:1,pid:2290967491568342657,rnum:10,rpt:EngKdgp0MCwwLjk1NjgwOTYzOTkzMDcyNTEsImE6MDAwMDAwMDAwMDAwM2RlYSIsImE6MTcxMjMwMTQ0OTE0NDA5Nzk2NzMiLDEsIjE3MTIzMDE0NDkxNDQwOTc5NjczIiwiNTUyMjk3NTY5ODQ1NTAyODE5MV9DUCI,rsk:PC_1918205548965792255,sgro:or",
"next_page_token": "EngKdgp0MCwwLjk1NjgwOTYzOTkzMDcyNTEsImE6MDAwMDAwMDAwMDAwM2RlYSIsImE6MTcxMjMwMTQ0OTE0NDA5Nzk2NzMiLDEsIjE3MTIzMDE0NDkxNDQwOTc5NjczIiwiNTUyMjk3NTY5ODQ1NTAyODE5MV9DUCI"
}
}
Filter Token
- The
filter_token
helps to retrieve a single page of reviews by specific product feature or attribute. - Only a single page of results is available for each filter.
- You can obtain
filter_token
by first making a request to retrieve Google Product Reviews. Look into thefilters
array in the initial response.
https://www.searchapi.io/api/v1/search?engine=google_product_reviews&filter_token=YXNwOjM0OSxyc2s6UENfMjI1OTg2NjQzMjI4NTMyNjkxMA%3D%3D&product_id=9837433246579187464
- Python
- Node
- Ruby
- Java
- Go
- PHP
- Bash
- R
- Kotlin
- Swift
- C#
- C
- C++
- requests
import requests
url = "https://www.searchapi.io/api/v1/search"
params = {
"engine": "google_product_reviews",
"product_id": "9837433246579187464",
"filter_token": "YXNwOjM0OSxyc2s6UENfMjI1OTg2NjQzMjI4NTMyNjkxMA=="
}
response = requests.get(url, params=params)
print(response.text)
{
"review_results": {
"reviews": [
{
"username": "SouthernTechy",
"source": "samsung.com",
"title": "Cool phone but needs work",
"date": "Sep 2021",
"rating": 3,
"text": "Design: I love that the Z Fold 3 has a all metal case..."
},
...
]
}
}