Google Shopping Product
Get every merchant offer for a Google Shopping product.
GET/api/v1/google/shopping/product
Costs 1 credit per request; failed requests are refunded. Authentication, the search_metadata envelope and error codes are the same as for every endpoint (see the API reference). Try it in the playground.
Parameters
Product selection
| Parameter | Type | Description |
|---|---|---|
q | string | The search term this product was found with, up to 2,048 characters. Google resolves the product viewer against it as well as the identifiers. |
gpcid | string | Product cluster ID from a shopping result, 1 to 20 decimal digits. Single-merchant results have none; send headline_offer_docid instead.Every Shopping result with a gpcid or headline_offer_docid includes a ready-made serpfast_product_link. |
catalog_id | string | Catalog ID from a shopping result without a gpcid, 1 to 20 decimal digits. Lists every store that sells the product rather than only the headline offer. |
headline_offer_docid | string | Headline merchant offer document ID from the same shopping result, 1 to 20 decimal digits. Required when the result has no gpcid; conflicts with prds. |
image_docid | string | Image document ID from the same shopping result, 1 to 20 decimal digits. Conflicts with prds. |
prds | string | Google product selector token from a previous response, up to 2,048 characters. Conflicts with the identifiers above. |
Geography and localization
| Parameter | Type | Description |
|---|---|---|
location | string | Named search origin, up to 512 characters and 63 UTF-8 bytes once encoded. Conflicts with uule. |
uule | string | Canonical Google location token, up to 2,048 characters. Conflicts with location. |
google_domain | string | Validated first-party Google domain.Default: google.com. |
gl | string | Two-letter country code, normalized to lowercase. |
hl | string | Language code such as en, en-GB, or de. |
device | "desktop" | "tablet" | "mobile" | Google returns its real layout for the selected device.Default: desktop. |
Response
A JSON object with search_metadata (request id, credits used and remaining) and the result groups the page returns. Groups and fields depend on the content of each page, so treat every field as optional.
Examples
cURL
curl "https://serpfast.com/api/v1/google/shopping/product?q=coffee+maker&gpcid=16418087637395758399" \
-H "Authorization: Bearer $SERPFAST_KEY"Node.js 18+
const params = new URLSearchParams({
"q": "coffee maker",
"gpcid": "16418087637395758399"
});
const res = await fetch(`https://serpfast.com/api/v1/google/shopping/product?${params}`, {
headers: { Authorization: `Bearer ${process.env.SERPFAST_KEY}` },
});
const data = await res.json();
console.log(data);Python
import os, requests
params = {
"q": "coffee maker",
"gpcid": "16418087637395758399"
}
res = requests.get(
"https://serpfast.com/api/v1/google/shopping/product",
params=params,
headers={"Authorization": f"Bearer {os.environ['SERPFAST_KEY']}"},
timeout=120,
)
print(res.json())