Google Shopping API
API Parameters
Search Query
-
- Name
-
q - Required
- Required
- Description
-
Specifies the search query, similar to performing a regular Google search. Filters embedded in the
qparameter act as hints rather than strict filters. If there are too few matching items, results outside the filters may appear. Examples of usage:- Search by price:
tshirt under $30,skinny fit kids jeans between $15 and $30,charizard over $300. - Search by size:
mens size 8.5 nike air. - Search by color:
Playstation white. - Search nearby stores:
Apparel nearby. - Search by condition:
iphone used,macbook new. - Search by brand:
prada dress,gucci shoes. - Search discounted products:
laptop on sale,headphones on sale.
- Search by price:
Localization
-
- Name
-
google_domain - Required
- Optional
- Description
-
Defines the Google domain for the search. The default is
google.com. 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 Shoppingglcountries.
-
- Name
-
hl - Required
- Optional
- Description
-
The default parameter
endefines the interface language of the search. Check the full list of supported Googlehllanguages.
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
-
shoprs - Required
- Optional
- Description
-
Applies strict filtering rules based on encoded values. Example:
CAEYFyoDcHM1MhwIFxISUHJpY2U6IGxvdyB0byBoaWdoKgQQARgBYAKIAQEsorts products by price (low to high). Filters provided in the JSON response can be used in subsequent requests to apply additional filters iteratively.
-
- Name
-
price_min - Required
- Optional
- Description
-
Specifies the minimum price of the products returned. This parameter must include the currency. For example,
2.50filters results to products priced at $2.50 or higher. Must be used as a strict filter before applyingshoprs.
-
- Name
-
price_max - Required
- Optional
- Description
-
Specifies the maximum price of the products returned. This parameter must include the currency. For example,
100filters results to products priced at $100 or less. Must be used as a strict filter before applyingshoprs.
-
- Name
-
is_on_sale - Required
- Optional
- Description
-
Filters results to show only products that are currently on sale. Set to
trueto show only discounted items. Can be combined withis_small_business,is_free_delivery, andsort_byfor more refined searches.
Note: If theshoprsparameter is provided, it takes priority and this parameter will be ignored.
-
- Name
-
is_small_business - Required
- Optional
- Description
-
Filters results to show only products sold by small businesses. Set to
trueto show only small business sellers. Can be combined withis_on_sale,is_free_delivery, andsort_byfor more refined searches.
Note: If theshoprsparameter is provided, it takes priority and this parameter will be ignored.
-
- Name
-
is_free_delivery - Required
- Optional
- Description
-
Filters results to show only products with free shipping available. Set to
trueto show only items that offer free shipping. Can be combined withis_on_sale,is_small_business, andsort_byfor more refined searches.
Note: If theshoprsparameter is provided, it takes priority and this parameter will be ignored.
-
- Name
-
sort_by - Required
- Optional
- Description
-
Sorts the shopping results by the specified criteria. Available options:
price_low_to_high- Sort products from lowest to highest priceprice_high_to_low- Sort products from highest to lowest pricerating_high_to_low- Sort products by rating, highest first
is_on_sale,is_small_business, andis_free_deliveryfilters.
Note: If theshoprsparameter is provided, it takes priority and this parameter will be ignored.
-
- Name
-
condition - Required
- Optional
- Description
-
Filters product condition. Options include:
newfor new products, andusedfor used items.
-
- Name
-
include_favicon - Required
- Optional
- Description
-
This parameter includes the seller's favicon in the shopping results. It is set to
falseby default. Set it totrueto include favicons.
-
- Name
-
include_base_images - Required
- Optional
- Description
-
This parameter includes base64-encoded product images in the shopping results. It is set to
falseby default. Set it totrueto include base64 images.
Pagination
-
- Name
-
page - Required
- Optional
- Description
-
Indicates which page of results to return. The default is
1.
Engine
-
- Name
-
engine - Required
- Required
- Description
-
Defines the engine that will be used to retrieve real-time data. It must be set to
google_shopping.
API key
-
- Name
-
api_key - Required
- Required
- Description
-
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).
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_shopping&gl=us&hl=en&location=California%2CUnited+States&q=PS5
- 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_shopping",
"q": "PS5",
"gl": "us",
"hl": "en",
"location": "California,United States"
}
response = requests.get(url, params=params)
print(response.text)
{
"search_metadata": {
"id": "search_Rrb28K9xoXv9c0jPpzE1BA7Q",
"status": "Success",
"created_at": "2024-07-12T16:54:48Z",
"request_time_taken": 2.48,
"parsing_time_taken": 0.02,
"total_time_taken": 2.5,
"request_url": "https://www.google.com/search?q=PS5&oq=PS5&gl=us&hl=en&tbm=shop&num=60&uule=w+CAIQICIYQ2FsaWZvcm5pYSxVbml0ZWQgU3RhdGVz&ie=UTF-8",
"html_url": "https://www.searchapi.io/api/v1/searches/search_Rrb28K9xoXv9c0jPpzE1BA7Q.html",
"json_url": "https://www.searchapi.io/api/v1/searches/search_Rrb28K9xoXv9c0jPpzE1BA7Q"
},
"search_parameters": {
"engine": "google_shopping",
"q": "PS5",
"location": "California,United States",
"location_used": "California,United States",
"google_domain": "google.com",
"hl": "en",
"gl": "us"
},
"search_information": {
"query_displayed": "PS5"
},
"filters": [
{
"type": "Sort by",
"options": [
{
"text": "Price: low to high",
"shoprs": "CAEYFyoDcHM1MhwIFxISUHJpY2U6IGxvdyB0byBoaWdoKgQQARgBYAKIAQE"
},
...
]
},
{
"type": "Category",
"options": [
{
"text": "PlayStation Controllers",
"shoprs": "CAEYCSoDcHM1MhsICRIXUGxheVN0YXRpb24gQ29udHJvbGxlcnNgAg"
},
...
]
},
...
],
"shopping_ads": [
{
"position": 1,
"block_position": "top",
"title": "Playstation 5 Digital Console Slim - Marvel's Spider-Man 2 Bundle, White",
"seller": "Walmart",
"link": "https://www.walmart.com/ip/Playstation-5-Digital-Console-Slim-Marvel-s-Spider-Man-2-Bundle/5395472295?wmlspartner=wlpa&selectedSellerId=147",
"price": "$459.99",
"extracted_price": 459.99,
"rating": 4.7,
"reviews": 5000,
"image": "https://encrypted-tbn1.gstatic.com/shopping?q=tbn:ANd9GcQMIFNwj3G5eCHTg3cDhtbveRuICQVC2F5Hp4vzkuGwqGS0gRic26FjqmIhjqAvFNnKXHFtvp5h7sogvM-UGHGy4ww590e3GGBzQ2RxAgJ0WSy9ujZSUe4MGiCDbi49BYFuRVR0xA&usqp=CAc"
},
...
],
"shopping_results": [
{
"position": 1,
"product_id": "8039622388823297908",
"title": "Sony Playstation 5 Digital",
"product_link": "https://www.google.com/search?q=Sony+PlayStation+5+Slim+Console+Digital+Edition&oq=Sony+PlayStation+5+Slim+Console+Digital+Edition&gl=us&hl=en&udm=28#oshopproduct=oid:9784129915425045884,iid:6744322870047317904,rds:UENfNzI4MDI4MjAxMjE0Njk3NDM4OXxQUk9EX1BDXzcyODAyODIwMTIxNDY5NzQzODk=,pvt:hg,pvo:3&oshop=apv&pvs=0",
"seller": "GameStop",
"offers": "3+",
"extracted_offers": 3,
"offers_link": "https://www.google.com/search?q=Sony+PlayStation+5+Slim+Console+Digital+Edition&oq=Sony+PlayStation+5+Slim+Console+Digital+Edition&gl=us&hl=en&udm=28#oshopproduct=oid:9784129915425045884,iid:6744322870047317904,rds:UENfNzI4MDI4MjAxMjE0Njk3NDM4OXxQUk9EX1BDXzcyODAyODIwMTIxNDY5NzQzODk=,pvt:hg,pvo:3&oshop=apv&pvs=0",
"price": "$429.99",
"extracted_price": 429.99,
"rating": 4.4,
"reviews": 9400,
"delivery": "Free by 7/16",
"durability": "Pre-owned",
"thumbnail": "https://encrypted-tbn3.gstatic.com/shopping?q=tbn:ANd9GcT7iEgHamefjZlmViMlw1HwT0rpjGuX9D_SOcC7o-iehd5IVtjFKnUzgvYJkm7FGtnn9DJkEIWvcGpuzgZ9p9PeBroASb7-8peYCh4cdM0",
"thumbnail_video": "https://www.gstatic.com/search-ar-dev/renders/11313726882518828376_ml/837011672042496373_v5/square_video.mp4",
"product_token": "eyJxIjoiUFM1IiwicHJvZHVjdGlkIjoiIiwiY2F0YWxvZ2lkIjoiMTAzNjQ4MDQxODQyNDI3MTYxMjgiLCJncGNpZCI6IjEwMjUyOTU5Nzg2MDY1MTQxMDk0IiwiaGVhZGxpbmVPZmZlckRvY2lkIjoiNTgyMTA2OTc5NDMyMTIwNDE3MSIsInJkcyI6IlBDXzEwMjUyOTU5Nzg2MDY1MTQxMDk0fFBST0RfUENfMTAyNTI5NTk3ODYwNjUxNDEwOTQiLCJpbWFnZURvY2lkIjoiNjAzNTc3NzA0NTk5MjYxNTg3MyIsInB2byI6IjMiLCJlaSI6IlMiLCJtaWQiOiIiLCJwdnQiOiJoZyIsImdsIjoidXMiLCJobCI6ImVuIiwidXVsZSI6IncrQ0FJUUlDSVlRMkZzYVdadmNtNXBZU3hWYm1sMFpXUWdVM1JoZEdWeiJ9"
},
...
]
}
Shopping Results
https://www.searchapi.io/api/v1/search?engine=google_shopping&gl=us&hl=en&location=New+York%2CUnited+States&q=Iphone
- 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_shopping",
"q": "Iphone",
"gl": "us",
"hl": "en",
"location": "New York,United States"
}
response = requests.get(url, params=params)
print(response.text)
{
"shopping_results": [
{
"position": 1,
"product_id": "5458859202991111437",
"title": "Apple iPhone 15 Pro Max",
"product_link": "https://www.google.com/shopping/product/5458859202991111437?gl=us&hl=en",
"seller": "T-Mobile",
"offers": "10+",
"extracted_offers": 10,
"offers_link": "https://www.google.com/shopping/product/5458859202991111437/offers?gl=us&hl=en&uule=w+CAIQICIYQ2FsaWZvcm5pYSxVbml0ZWQgU3RhdGVz",
"price": "$399.99 now",
"extracted_price": 399.99,
"installment": {
"down_payment": "$399.99 now",
"extracted_down_payment": 399.99,
"months": "24",
"extracted_months": 24,
"cost_per_month": "$50/mo",
"extracted_cost_per_month": 50
},
"rating": 4.5,
"reviews": 17000,
"delivery": "Free delivery",
"thumbnail": "https://encrypted-tbn3.gstatic.com/shopping?q=tbn:ANd9GcSWca-hAFk02X8lJn-3ez8iBbjWOmUNt5RZ_5EwGXt5sCHUix-srIxGmqUuBKcZgH-x_wqfG6Md6qjJ_TaXh5ZbEUkYT0Yc7o7e9I2EbpuIze1Eg7M3b6w1Uw",
"product_token": "eyJxIjoiSXBob25lIDE1IHBybyBtYXgiLCJwcm9kdWN0aWQiOiIxNTkzNjQ4NzM4NDc4MDQ2Mzc3MiIsImNhdGFsb2dpZCI6IiIsImdwY2lkIjoiIiwiaGVhZGxpbmVPZmZlckRvY2lkIjoiMTU5MzY0ODczODQ3ODA0NjM3NzIiLCJyZHMiOiJQQ18xNzc4MDc4MTMwOTQ4MzM0Njk2MXxQUk9EX1BDXzE3NzgwNzgxMzA5NDgzMzQ2OTYxIiwiaW1hZ2VEb2NpZCI6IjE3NzY4ODM2NTM5NzY2OTI1MDEwIiwicHZvIjoiMyIsImVpIjoiM1A3VGFPYm9Lc1Rja1BJUHpNYkFnUW8iLCJtaWQiOiIiLCJwdnQiOiJoZyIsImdsIjoidXMiLCJobCI6ImVuIiwidXVsZSI6IncrQ0FJUUlDSVdUbVYzSUZsdmNtc3NWVzVwZEdWa0lGTjBZWFJsY3cifQ=="
},
...
]
}
Popular Products
https://www.searchapi.io/api/v1/search?engine=google_shopping&gl=us&hl=en&location=New+York%2CUnited+States&q=Lenovo
- 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_shopping",
"q": "Lenovo",
"gl": "us",
"hl": "en",
"location": "New York,United States"
}
response = requests.get(url, params=params)
print(response.text)
{
"popular_products": [
{
"position": 1,
"product_id": "12662605563035131269",
"title": "Lenovo Tab M8 4th Gen",
"product_link": "https://www.google.com/shopping/product/12662605563035131269?gl=us&hl=en",
"seller": "Lenovo",
"offers": "10+",
"extracted_offers": 10,
"offers_link": "https://www.google.com/shopping/product/12662605563035131269/offers?gl=us&hl=en&uule=w+CAIQICIWTmV3IFlvcmssVW5pdGVkIFN0YXRlcw",
"price": "$85.49",
"extracted_price": 85.49,
"original_price": "$100",
"extracted_original_price": 100.0,
"rating": 4.3,
"reviews": 959,
"tag": "14% OFF",
"delivery": "Free delivery",
"thumbnail": "https://encrypted-tbn2.gstatic.com/shopping?q=tbn:ANd9GcTJsI5xtfkZtIgEVeSbuLr0W2SLAUrqx-ggbQhAlFLy2dqXvToE-7c5Rcwv_XhTu7T6RqDPO3_GirH5aHBWvoQ6ikOR2O2w9YfkAc9Wcso"
},
...
]
}
Shopping Ads
https://www.searchapi.io/api/v1/search?engine=google_shopping&gl=us&hl=en&location=California%2CUnited+States&q=Android
- 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_shopping",
"q": "Android",
"gl": "us",
"hl": "en",
"location": "California,United States"
}
response = requests.get(url, params=params)
print(response.text)
{
"shopping_ads": [
{
"position": 1,
"block_position": "top",
"title": "TCL TAB 8 LE (with 24 monthly payments + plan)",
"seller": "T-Mobile",
"link": "https://www.t-mobile.com/tablet/tcl-tab-8-le?sku=610214676276",
"price": "$0.00 now",
"extracted_price": 0,
"installment": {
"down_payment": "$0.00 now",
"extracted_down_payment": 0,
"months": "24",
"extracted_months": 24,
"cost_per_month": "$7.00/mo",
"extracted_cost_per_month": 7
},
"image": "https://encrypted-tbn3.gstatic.com/shopping?q=tbn:ANd9GcTEIfd7wek01FCqKnd7jj-7XbCJ2oBkkyNghqsAOITDqSucGCkSPgydPRKAAT1SGAjs_8pw4U_LsyZLey_z68o5NbHn-xiMl_Bbe-Qd7eORPHn7iUTWmufqNUekoxC6oc97fsCZb1lTC-0&usqp=CAc"
},
...
]
}
Filters
Note: When all_filters_token is present, it can be used to get all available filters (hidden by "See more" link). See Google Shopping Filters API documentation for more details.
https://www.searchapi.io/api/v1/search?engine=google_shopping&gl=us&hl=en&location=Washington%2CUnited+States&q=Shoes
- 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_shopping",
"q": "Shoes",
"gl": "us",
"hl": "en",
"location": "Washington,United States"
}
response = requests.get(url, params=params)
print(response.text)
{
"filters": [
{
"type": "Sort by",
"options": [
{
"text": "Price: low to high",
"shoprs": "CAEYFyoFc2hvZXMyHAgXEhJQcmljZTogbG93IHRvIGhpZ2gqBBABGAFgAogBAQ"
},
...
]
},
{
"type": "Department",
"options": [
{
"text": "Men's",
"shoprs": "CAEYASoFc2hvZXMyFQgBEgVNZW4nczoKCICjPhCBoz4wBVjmpyBgAg"
},
...
]
},
...
],
...
"all_filters_token": "eyJ2ZXQi...VXzUwIn0"
}