Google Product Offers Old API
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_idis 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
-
This parameter is used to specify the canonical location of the search. For exact targeting or to see all available options, check out the Locations API. If multiple locations match your input, the most popular one will be selected.
-
- Name
-
uule - Required
- Optional
- Description
-
This parameter sets the exact Google-encoded location for the search, and
uuleandlocationcannot be used at the same time. SearchApi builds it for you when you use thelocationparameter, but you can provide your own if you want precise control.
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.
prdsparameter. -
-
- Name
-
durability - Required
- Optional
- Description
-
This parameter controls the durability of products. There are few options:
-
used- Refurbished/Used products. -
new- New products.
prdsparameter. -
-
- 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.
prdsparameter. -
Localization
-
- Name
-
google_domain - Required
- Optional
- Description
-
The default parameter
google.comdefines the Google domain of the search. Check the full list of supported Googlegoogle_domaindomains.
-
- Name
-
gl - Required
- Optional
- Description
-
The default parameter
usdefines the country of the search. See the full list of Google Productglcountries.
-
- Name
-
hl - Required
- Optional
- Description
-
The default parameter
endefines the interface language of the search. Check the full list of supported Googlehllanguages.
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 of20offers. Note: this parameter is not compatible with a customprdsparameter.
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_old.
API key
-
- Name
-
api_key - Required
- Required
- Description
-
The
api_keyauthenticates 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).
Zero Data Retention
-
- Name
-
zero_retention - Enterprise Only
- Enterprise Only
- Required
- Optional
- Description
-
Set this parameter to
trueto disable all logging and persistent storage. No request parameters, HTML, or JSON responses are stored or logged. Suitable for high-compliance use cases. Debugging and support may be limited while enabled.
API Examples
Full Response
https://www.searchapi.io/api/v1/search?engine=google_product_offers_old&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_old",
"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",
"details": ["Free delivery", "Make it Yours. Engrave your AirPods for free. Only at Apple"],
"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"
},
...
],
"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"
}
}
}