Documentation
Google Shopping API
Find product listings, prices and sellers when provided.
Request Parameters Response Result fields Pagination Errors
Request
POST https://api.serqo.io/v1/search
Field Value
engine google
type shopping
Request headers
Create an API key and store it on your server. Use either authentication header below.
Header Value Description
Content-Type application/jsonJSON request body.
Authorization Bearer YOUR_API_KEYRecommended authentication header.
x-api-key YOUR_API_KEYAlternative to Authorization; use one authentication header.
bash
export SERP_API_KEY='YOUR_API_KEY'
curl https://api.serqo.io/v1/search \
-H "Authorization: Bearer $SERP_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"q": "espresso machine",
"engine": "google",
"type": "shopping",
"gl": "us",
"hl": "en"
}'
GET request
The same endpoint also accepts URL query parameters. Keep the API key in the header.
bash
curl --get https://api.serqo.io/v1/search \
-H "Authorization: Bearer $SERP_API_KEY" \
--data-urlencode 'q=espresso machine' \
--data-urlencode 'engine=google' \
--data-urlencode 'type=shopping' \
--data-urlencode 'gl=us' \
--data-urlencode 'hl=en'
Parameters
The number of results returned per request depends on the search engine and may vary.
Field Type Required Default Description
q string Yes — Non-empty search query.
engine string No google Use google for this API.
type string No web Use shopping for this API.
gl string No — Two-letter lowercase country code, for example us.
hl string No — Interface language code, for example en.
start integer No — Offset from 0 to 1000000. Use nextStart from the response.
safe off | active No — Explicit-content filter: off disables it, active enables it.
tbs string No — Google time filter, such as qdr:d, qdr:w or qdr:m.
Only q is required by the API, but keep engine and type as shown for this search. A dash means the API does not assign a default. Unknown parameters return 422 INVALID_PARAM.
Response
HTTP 200. This is an abbreviated example using the unified response structure, not a live search. Field availability and result groups vary by the returned page; values can be null.
JSON
{
"success": true,
"requestId": "req_example",
"data": {
"engine": "google",
"results": [],
"features": {
"shoppingResults": [
{
"position": 1,
"title": "Example espresso machine",
"price": "$199.00",
"extractedPrice": 199,
"oldPrice": null,
"source": "Example store",
"link": "https://www.google.com/shopping/product/example",
"productId": "example",
"thumbnailId": null,
"rating": 4.5,
"reviews": "120",
"delivery": null,
"badge": null,
"group": null
}
]
},
"pagination": {
"page": 1,
"start": 0,
"hasNext": false,
"nextStart": null
},
"meta": {
"elapsedMs": 250
},
"type": "shopping",
"query": {
"q": "espresso machine",
"gl": "us",
"hl": "en",
"device": "desktop",
"start": 0
},
"searchInformation": {
"totalResults": null,
"timeTakenMs": null,
"displayed": null
}
},
"meta": {
"cache": "miss"
}
}
Response fields
Field Type Description
data.query object Search query passed to the engine.
data.searchInformation object Reported result count and search timing, when provided.
success boolean Whether the request succeeded. True in this example.
requestId string Request identifier to include when troubleshooting.
data.type string Search type used for this response.
data.engine string Engine that returned the results.
data.results array Main result list. Check feature groups as well when present.
data.features object Additional result groups; groups not returned by the engine may be absent.
data.pagination object Current offset and next-page availability.
data.meta.elapsedMs number Search duration in milliseconds, not a performance guarantee.
meta.cache string | null hit, miss, or null if cache status is unknown.
Result fields
Read data.features.shoppingResults when present. Some results may instead appear in data.results; check both before treating a search as empty.
Field Type Description
data.features.shoppingResults[].position integer Product position.
data.features.shoppingResults[].title string Product name.
data.features.shoppingResults[].price string | null Displayed price, including currency text.
data.features.shoppingResults[].extractedPrice number | null Numeric price, when extracted.
data.features.shoppingResults[].oldPrice string | null Previous price when shown.
data.features.shoppingResults[].source string | null Seller or source label.
data.features.shoppingResults[].link string | null Product link; may be a Google redirect rather than a merchant URL.
data.features.shoppingResults[].productId string | null Product identifier, when provided.
data.features.shoppingResults[].thumbnailId string | null Thumbnail identifier, not a direct image URL.
data.features.shoppingResults[].rating number | null Displayed rating.
data.features.shoppingResults[].reviews string | null Review-count text.
data.features.shoppingResults[].delivery string | null Delivery text when shown.
data.features.shoppingResults[].badge string | null Product badge when shown.
data.features.shoppingResults[].group string | null Product group label.
Main result entries
Field Type Description
data.results[].domain string | null Destination domain, when available.
data.results[].favicon string | null Site icon when provided.
data.results[].sitelinks array Additional links nested under the result.
data.results[].sitelinks[].title string Sitelink label.
data.results[].sitelinks[].url string | null Sitelink destination.
data.results[].extensions object Other result-specific properties.
data.results[].snippetHighlightedWords string[], optional Highlighted terms in the snippet, when provided.
data.results[].position integer Rank on this results page, starting at 1.
data.results[].type string Result category: organic, news, image, video, shopping, local, forum, book, patent or ad. This can differ from the request type.
data.results[].title string | null Title shown in the result.
data.results[].url string | null Destination URL when resolved; it may be null.
data.results[].displayedUrl string | null URL or domain displayed by the engine; not always a clickable link.
data.results[].source string | null Source name or displayed domain.
data.results[].date string | null Date text when extracted; not necessarily an ISO timestamp.
data.results[].snippet string | null Result summary.
data.results[].thumbnail string | null Thumbnail URL or inline data URL, when provided.
data.results[].duration string | null Video duration text when provided.
data.results[].price string | null Price text when provided.
data.results[].rating number | null Rating when provided.
Check data.pagination.hasNext; stop when it is false.
Use data.pagination.nextStart as start. Keep the other search parameters unchanged.
Send the next request. Each page is a separate search request.
Field Type Description
data.pagination.nextUrl string | null Search-engine URL for the next page, when available; use nextStart with this API.
data.pagination.requestedPage integer Page requested; may differ from the returned page if the engine does not provide it.
data.pagination.page integer Current page number.
data.pagination.start integer Current result offset.
data.pagination.hasNext boolean Whether another page is available.
data.pagination.nextStart integer | null Offset for the next request, or null when unavailable.
Errors
JSON
{
"success": false,
"requestId": "req_example",
"error": {
"code": "INVALID_PARAM",
"message": "Unknown parameter \"page\"",
"retryable": false
}
}
Field Type Description
error.code string Machine-readable error code.
error.message string Reason the request failed.
error.retryable boolean Whether retrying is recommended.
error.retryAfterMs number, optional Minimum wait before retrying, in milliseconds.
HTTP status Meaning What to do
400 Invalid request or unsupported search type. Check the query and engine/type combination.
401 Missing, invalid or revoked API key. Check the authentication header and API key.
402 Insufficient credits. Check your credit balance.
403 Permission or plan restriction. Check account access and plan limits.
422 Invalid parameter. Correct the parameter identified by error.message.
429 Request rate or queue limit. Follow the retry rules below.
5xx Server or search service failure. Keep the requestId; retry only if allowed.
Retry rules
Retry only when error.retryable is true. If error.retryAfterMs is present, wait at least that many milliseconds.
Credits
Successful searches use credits at the applicable rate.
Failed searches and timeouts are not charged.
Cache hits are free at the default rate. Before searching, your available balance must cover the full request cost.
See credit rules .