Skip to main content
POST
/
api
/
baidu
/
search
/baidu/search
curl --request POST \
  --url https://api.anysite.io/api/baidu/search \
  --header 'Content-Type: application/json' \
  --header 'access-token: <api-key>' \
  --data '
{
  "query": "<string>",
  "count": 2,
  "timeout": 300,
  "time_range": "any",
  "published_after": 1,
  "published_before": 1
}
'
[
  {
    "url": "<string>",
    "@type": "BaiduSearchResult",
    "source": "<string>",
    "date": "<string>",
    "snippet": "<string>",
    "redirect_url": "<string>"
  }
]

Authorizations

access-token
string
header
required

API token from the dashboard

Headers

access-token
string
required

Body

application/json
query
string
required

Search query. Supports Chinese and Latin text

Minimum string length: 1
Example:

"人工智能"

count
integer
required

Maximum number of results

Required range: x >= 1
timeout
integer
default:300

Max scrapping execution timeout (in seconds)

Required range: 20 <= x <= 1500
time_range
enum<string>
default:any

Restrict results to a preset recency window

Available options:
any,
day,
week,
month,
year
published_after
integer | null

Custom window start as a Unix timestamp (seconds). Mutually exclusive with time_range

Required range: x > 0
published_before
integer | null

Custom window end as a Unix timestamp (seconds). Mutually exclusive with time_range

Required range: x > 0

Response

Successful Response

url
string
required
@type
string
default:BaiduSearchResult
source
string | null
date
string | null
snippet
string | null
redirect_url
string | null