Skip to main content
GET
Baidu Image Search
Search Baidu images. Each result carries the full-size image URL (Baidu’s decoded objURL), three Baidu-hosted copies at different sizes, the real pixel dimensions, the file format, and the page the image was found on. Credits: 5

Authorization

string
required
Your ScrapeBadger API key.

Query Parameters

string
required
Search keywords, e.g. . URL-encode as UTF-8.
integer
default:"1"
Result page, 150. Fixed at 30 images per page — Baidu’s own page size, not adjustable.

Response

string
Echo of the requested query.
integer
The page returned.
integer
Baidu’s own reported total for the query.
ImageResult[]
Images on this page (up to 30).
Only position, query and page are guaranteed present — including title, which Baidu omits on some tiles. Every other field is nullable.

Example

Response

Which URL to use

image_url points at a third-party host, so it can 404, hotlink-block, or redirect — Baidu’s index outlives the pages it indexed. Fall back to thumbnail_url when a fetch of image_url fails, and treat width/height as describing the original asset, not the Baidu-hosted copies.
type is Baidu’s declared format and is frequently jpg even for a .webp asset. Sniff the bytes if the real format matters.

Errors