Search and places
Baidu Search API
Retrieve native Baidu Search data.
Make a request
Use your existing PrismCrawl API key and credit balance. A completed request consumes one credit, including recognized empty or unavailable results and source changes found during a valid continuation. Validation and operational errors remain uncharged. Each completed continuation request is billed separately.
POST /v1/baidu/search
curl 'https://api.prismcrawl.com/v1/baidu/search' \
--request POST \
--header 'content-type: application/json' \
--header 'x-api-key: <PRISMCRAWL_API_KEY>' \
--data '{
"query": "coffee"
}'Supported parameters
| Parameter | Usage |
|---|---|
queryRequired | Text to search for on the selected service. |
page | One-based page number. |
device | Device presentation for the source request. desktop, mobile, tablet |
html | Return the encoded original response rather than parsed JSON. |
zero_trace | Do not archive source or parsed response artifacts. |
ct | Result language: 1 for all languages, 2 for Simplified Chinese, 3 for Traditional Chinese. |
pn | Zero-based result offset. Cannot be combined with a page after page 1. |
rn | Requested results per page, up to 50. Baidu web supports this on desktop and tablet. |
gpc | Time interval as stf=START,END|stftype=1, using Unix seconds. |
q5 | Restrict matching to page titles (1) or URLs (2). |
q6 | Restrict results to this domain. |
bs | Previous search query. |
oq | Original query when following a related search. |
f | Search origin: 8 for normal search, 3 for a suggestion, 1 for a related search. 1, 3, 8 |
Structured results
Read items from data.content.results. The response also includes the search metadata, pagination state, and any extracted SERP features. Optional fields appear when supplied by the provider.
addresscategorycoordinatesdescriptionidlatitudelongitudenamephonepositionrankratingrating_maxrating_sourcereview_countsnippetsourcethumbnailtitletypeurlwebsiteSDKs and guides
The official SDKs cover this endpoint with typed parameters, automatic retries, and pagination helpers.
- Python SDK:
pip install prismcrawl - Node.js SDK:
npm install prismcrawl