API 文档提供英文版本。

Bing Shopping

Search Bing Shopping products.

GET/api/v1/bing/shopping

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 search

Choose a query and result offset.

ParameterTypeDescription
qrequiredstringProduct search query, up to 2,048 characters with no control characters.Up to 2,048 characters.
efirstintegerNonnegative shopping result offset. For example, efirst=10 starts at the tenth shopping result.Range: 0 to 9007199254740991.

Refinements

Apply filters from a Bing Shopping URL.

ParameterTypeDescription
filtersstringBing Shopping filter expression, up to 6,000 characters. Copy filters from a Bing Shopping URL.Up to 6,000 characters.

Geography and localization

Choose a market or country.

ParameterTypeDescription
mktstringCase-insensitive language-country market code, such as en-US. Supply either mkt or cc.
ccstringTwo-letter country code, such as us or gb. Supply either cc or mkt.

Response

A JSON object with search_metadata (request id, credits used and remaining) and the result data: shopping_results. Groups and fields depend on the content of each page, so treat every field as optional.

Examples

cURL
curl "https://serpfast.com/api/v1/bing/shopping?q=coffee+maker&mkt=en-US" \
  -H "Authorization: Bearer $SERPFAST_KEY"
Node.js 18+
const params = new URLSearchParams({
  "q": "coffee maker",
  "mkt": "en-US"
});
const res = await fetch(`https://serpfast.com/api/v1/bing/shopping?${params}`, {
  headers: { Authorization: `Bearer ${process.env.SERPFAST_KEY}` },
});
const data = await res.json();
console.log(data);
Python
import os, requests

params = {
  "q": "coffee maker",
  "mkt": "en-US"
}
res = requests.get(
    "https://serpfast.com/api/v1/bing/shopping",
    params=params,
    headers={"Authorization": f"Bearer {os.environ['SERPFAST_KEY']}"},
    timeout=120,
)
print(res.json())