Google Product Offers API
Google Product Offers API uses /api/v1/search?engine=google_product_offers
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
. Note: this parameter also allows to add custom filters that could be find in URL.
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
-
sort_by
- Required
- Optional
- Description
-
This parameter controls the sort order. These are options to sort offers:
-
base_price
- Sorts by base price from low to high. -
base_price_high_to_low
- Sorts by base price from high to low. -
total_price
- Sorts by total price from low to high. -
total_price_high_to_low
- Sorts by total price from high to low. -
promotion
- Sorts by current promotion deals (special offers). -
sellers_rating
- Sorts by sellers rating.
prds
parameter. -
-
- Name
-
durability
- Required
- Optional
- Description
-
This parameter controls the durability of products. There are few options:
-
used
- Refurbished/Used products. -
new
- New products.
prds
parameter. -
-
- Name
-
filters
- Required
- Optional
- Description
-
This parameter controls the filters. These are few to filter options:
-
free_delivery
- Free delivery. -
nearby
- Nearby results. -
buy_on_google
- Buy on Google.
prds
parameter. -
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
-
page
- Required
- Optional
- Description
-
This parameter indicates which page of offers to return. By default, it is set to
1
. Every page has a maximum of20
offers. Note: this parameter is not compatible with a customprds
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_offers
.
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
Full Response
https://www.searchapi.io/api/v1/search?engine=google_product_offers&product_id=16127099509847096080
- 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_offers",
"product_id": "16127099509847096080"
}
response = requests.get(url, params=params)
print(response.text)
{
"search_metadata": {
"id": "search_9jGd7bMw38EDuYmpmJ8v5YAR",
"status": "Success",
"created_at": "2024-01-23T15:18:42Z",
"request_time_taken": 1.23,
"parsing_time_taken": 0.05,
"total_time_taken": 1.28,
"request_url": "https://www.google.com/shopping/product/16127099509847096080/offers?gl=us&hl=en&ie=UTF-8",
"html_url": "https://www.searchapi.io/api/v1/searches/search_9jGd7bMw38EDuYmpmJ8v5YAR.html",
"json_url": "https://www.searchapi.io/api/v1/searches/search_9jGd7bMw38EDuYmpmJ8v5YAR"
},
"search_parameters": {
"engine": "google_product_offers",
"product_id": "16127099509847096080",
"google_domain": "google.com",
"hl": "en",
"gl": "us"
},
"search_information": {
"page": "1"
},
"product": {
"product_id": "16127099509847096080",
"title": "Apple AirPods Pro (2nd Generation) with MagSafe Charging Case (USB-C)(45,434)",
"link": "https://www.google.com/shopping/product/16127099509847096080?gl=us&hl=en&prds=pid:8327715312244391204,rsk:PC_9055274590772580661",
"rating": 4.5,
"reviews": 45434
},
"offers": [
{
"position": 1,
"link": "https://www.apple.com/us/shop/go/product/MTJV3?cid=aos-us-seo-pla&opi=95576897&sa=U&ved=0ahUKEwjcm6yy5_ODAxXdIEQIHRGRAkwQ2ykIHw&usg=AOvVaw1OKIclo2SperPMT8aPjPuj",
"price": "$249.00",
"extracted_price": 249,
"delivery_price": "$0.00",
"extracted_delivery_price": 0,
"tax_price": "$25.52",
"extracted_tax_price": 25.52,
"total_price": "$274.52",
"extracted_total_price": 274.52,
"delivery_return": "Free 14-day returns",
"merchant": {
"name": "Apple",
"rating": 4.6,
"reviews": 2700,
"link": "https://www.google.com/shopping/ratings/account/metrics?q=apple.com&c=US&v=19&hl=en&opi=95576897&sa=U&ved=0ahUKEwjcm6yy5_ODAxXdIEQIHRGRAkwQlZ4BCCU&usg=AOvVaw2cjqxWSAq5_PLiAtE2kpKc",
"badge": "Top Quality Store"
},
"promo_code": "Make it Yours. Engrave your AirPods for free. Only at Apple",
"tag": "SPECIAL OFFER"
},
{
"position": 2,
"link": "https://www.bestbuy.com/site/apple-airpods-pro-2nd-generation-with-magsafe-case-usbc-white/6447382.p?skuId=6447382&utm_source=feed&opi=95576897&sa=U&ved=0ahUKEwjcm6yy5_ODAxXdIEQIHRGRAkwQ2ykILQ&usg=AOvVaw17ys5lbJHbWZf81ilHXmc2",
"price": "$189.99",
"extracted_price": 189.99,
"original_price": "$249.99",
"extracted_original_price": 249.99,
"delivery_price": "$0.00",
"extracted_delivery_price": 0,
"tax_price": "$19.47",
"extracted_tax_price": 19.47,
"total_price": "$209.46",
"extracted_total_price": 209.46,
"delivery_return": "Free 15-day returns",
"merchant": {
"name": "Best Buy",
"rating": 4.4,
"reviews": 371,
"link": "https://www.google.com/shopping/ratings/account/metrics?q=bestbuy.com&c=US&v=19&hl=en&opi=95576897&sa=U&ved=0ahUKEwjcm6yy5_ODAxXdIEQIHRGRAkwQlZ4BCDM&usg=AOvVaw3qRm_aIiFWQpKR0nZPTtQr",
"badge": "Top Quality Store"
},
"tag": "SALE"
},
...
],
"pagination": {
"current": 1,
"next": "https://www.google.com/shopping/product/16127099509847096080/offers?gl=us&hl=en&prds=cid:16127099509847096080,cs:1,pid:8327715312244391204,rsk:PC_9055274590772580661,start:20",
"other_pages": {
"2": "https://www.google.com/shopping/product/16127099509847096080/offers?gl=us&hl=en&prds=cid:16127099509847096080,cs:1,pid:8327715312244391204,rsk:PC_9055274590772580661,start:20"
}
}
}