Google Shopping API
Google Shopping products for a query: title, price and old price, seller, delivery, rating and review count, and Google’s catalog id.
GET /v1/google/search/shoppingBeta2 credits per callRefunded on failureimport os, requests
res = requests.get(
"https://api.groundsocial.dev/v1/google/search/shopping?q=running%20shoes",
headers={"Authorization": f"Bearer {os.environ['GROUNDSOCIAL_API_KEY']}"},
)
res.raise_for_status()
data = res.json()Response
200 · 2 credits{ "searchParameters": { "q": "running shoes", "type": "shopping", "engine": "google", "gl": "us", "hl": "en", "num": 40, "page": 1 }, "shopping": [ { "title": "Brooks Men's Glycerin Max 2", "source": "Fitness Sports", "link": "https://www.google.com/search?ibp=oshop&q=Brooks%20Men's%20Glycerin%20Max%202&prds=catalogid%3A7412007250437676191%2Cgpc…", "price": "$129.95", "rating": 4.6, "ratingCount": 641, "productId": "7412007250437676191", "position": 1 }, { "title": "ASICS Men's Novablast 6", "source": "Fitness Sports", "link": "https://www.google.com/search?ibp=oshop&q=ASICS%20Men's%20Novablast%206&prds=catalogid%3A5656457129767971623%2Cgpcid%3A5…", "price": "$155.00", "delivery": "Free delivery", "rating": 4.7, "ratingCount": 2000, "productId": "5656457129767971623", "position": 2 }, "… 38 more" ]}Parameters
| Name | Type | Description |
|---|---|---|
qquery · required | string | The search, as typed into Google (operators work). Example: coffee. |
glquery | string | Country to search from, default us. Example: gb. |
hlquery | string | Interface language, default en. Example: de. |
locationquery | string | Where the search happens, as a canonical place name ("Austin,Texas,United States"). Example: Austin,Texas,United States. |
numquery | integer | Results per page (default 40, at most 60). |
tbsquery | string | Time filter: qdr:h (past hour), qdr:d, qdr:w, qdr:m, qdr:y, or a cdr:1,cd_min:…,cd_max:… range. Example: qdr:w. |
safequery | "active" | "off" | SafeSearch, default off. One of active, off. |
Status codes
| Status | Meaning |
|---|---|
200 | The products. |
400 | Invalid input. Nothing was charged. |
401 | Missing or invalid API key. |
402 | Not enough credits, a spend cap was reached, or payment is required. |
403 | The target is private, or the account is suspended. |
404 | No Google Maps place matches that reference. |
429 | Too many requests. Wait for Retry-After seconds. |
503 | Google is temporarily unavailable. Retryable; nothing was charged. |
Every error has code, message, hint and retryable. All error codes
Questions
How many?
Up to 60 products per call (num, default 40).
Google is a trademark of Google LLC. We are not affiliated with or endorsed by Google.