Baidu Videos Scraper
Pricing
from $1.99 / 1,000 search results
Baidu Videos Scraper
Scrape video search results from Baidu (China's #1 search engine). Extracts video titles, sources, durations, view counts, thumbnails, and embed URLs. Supports pagination and Baidu redirect resolution.
Pricing
from $1.99 / 1,000 search results
Rating
0.0
(0)
Developer
Search API
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
0
Monthly active users
4 days ago
Last modified
Categories
Share
Search Baidu's public video results and export normalized, API-ready video records. The Actor uses a persistent mobile-emulated Playwright browser against Baidu's own mobile video tab (m.baidu.com/sf/vsearch?pd=video), validates each response, accepts only verified mobile video cards, reads each card's real destination from Baidu's own card payload, and writes a stable dataset plus an OUTPUT run summary.
Input modes
- Single query: set
query. - Batch search: set
querieswith up to 20 phrases. Duplicate queries are removed and output is interleaved fairly. - Single item: set
maxItemsandmaxItemsPerQueryto1. - Multiple offsets: raise
maxPages. The Actor stops when an offset contains no new verified mobile video cards or no accepted records. - No results: a valid search with explicit no-result text completes with an empty dataset and
OUTPUT.status = "no-results".
You never need to construct or paste a Baidu result-page URL.
Input
| Section | Fields | Purpose |
|---|---|---|
| Search | query, queries, market | Search phrase(s) and browser locale |
| Limits | maxItems, maxItemsPerQuery, maxPages | Total, per-query, and offset limits |
| Filters and sorting | includeKeywords, excludeKeywords, includePlatforms, excludePlatforms, minViewCount, maxDurationSeconds, includeShorts, sortBy | Narrow and order normalized records |
| Developer options | maxConcurrency, maxRequestRetries, navigationTimeoutSecs, requestHandlerTimeoutSecs, requestDelayMs, resolveRedirects, blockMedia | Tune bounded concurrency, retries, timeouts, pacing, redirect resolution, and resources |
| Proxy | proxyConfiguration | Direct access, an authorized Apify Proxy, or custom proxy URLs |
Example batch input:
{"queries": ["机器学习 教程", "人工智能 教程"],"maxItems": 20,"maxItemsPerQuery": 10,"maxPages": 2,"maxConcurrency": 2,"includeKeywords": ["教程"],"sortBy": "viewsDesc","requestDelayMs": 500,"proxyConfiguration": {"useApifyProxy": true,"apifyProxyGroups": ["RESIDENTIAL"],"countryCode": "CN"}}
GOOGLE_SERP cannot be used with Baidu. It is an HTTP proxy specialized for supported Google Search and Google Shopping traffic. For Baidu, use direct access, an authorized Residential proxy, or custom proxy URLs.
The complete input schema is in .actor/input_schema.json. The field names, defaults, and purpose are:
| Field | Type | Default | Description |
|---|---|---|---|
query | string | — | One phrase to search before opening video results. |
queries | array of strings | [] | Up to 20 phrases; duplicates are removed and results are interleaved fairly. |
maxItems | integer | 50 | Global output cap. Set to 1 for a single item. |
maxItemsPerQuery | integer | 50 | Per-query cap before fair selection. |
maxPages | integer | 5 | Maximum Baidu result offsets inspected per query. |
market | string | zh-CN | Browser locale and output metadata. |
maxConcurrency | integer | 2 | Number of query sessions processed in parallel. |
maxRequestRetries | integer | 1 | Retries temporary failures; verification pages are not retried. |
navigationTimeoutSecs | integer | 45 | Maximum time for navigation or redirect resolution. |
requestHandlerTimeoutSecs | integer | 150 | Maximum time for all offsets of one query. |
requestDelayMs | integer | 200 | Delay before each search navigation. |
resolveRedirects | boolean | true | Resolve Baidu redirect links to canonical video destinations. |
blockMedia | boolean | true | Reduce media requests while retaining thumbnails and destination metadata. |
includeShorts | boolean | true | Keep cards classified as short videos. |
sortBy | string | searchOrder | searchOrder, viewsDesc, dateDesc, durationDesc, or titleAsc. |
includeKeywords | array of strings | [] | Keep records when every keyword appears in a text field. |
excludeKeywords | array of strings | [] | Skip records when any keyword appears in a text field. |
includePlatforms | array of strings | [] | Keep only listed normalized video platforms. |
excludePlatforms | array of strings | [] | Skip listed normalized video platforms. |
minViewCount | integer | — | Minimum parsed view count. |
maxDurationSeconds | integer | — | Maximum duration in seconds. |
proxyConfiguration | object | — | Optional authorized Apify Residential or custom proxy configuration. |
Output
The dataset schema documents the rich normalized record contract, including:
All output fields, types, and requiredness are defined in .actor/dataset_schema.json.
- Stable identity and ordering:
id, global/query/result/page positions. - Text: title, sanitized highlighted title, highlighted terms, description, and snippet when displayed.
- Destinations: canonical watch/source URLs, domain, platform, and video ID.
- Media: thumbnail and preview image URLs.
- Video metadata: duration, parsed duration seconds, displayed and parsed view counts, likes, comments, publication date, short-video and advertisement flags.
- Provenance: extraction method, engine metadata, query, locale, search URL, and ISO scrape timestamp.
Optional fields that Baidu does not expose are omitted recursively. The Actor never stores challenge pages, ordinary non-video cards, unresolved Baidu redirects, unsafe HTML, secrets, or fabricated placeholder records.
The OUTPUT key-value record contains safe run metrics: status, requested queries, limits, developer settings, filters, pages fetched/failed, verified cards, filtered count, per-query metrics, connection mode, DNS mode, failure categories, and completion time. It also records the last HTTP status, response content type, final page host, and sanitized error code per query. It does not contain cookies, authorization headers, proxy credentials, or raw response bodies.
Pagination and batch behavior
Each query is crawled independently across Baidu's pn offsets. Results are deduplicated by canonical URL and stable ID, capped per query, then interleaved fairly before the global limit and final sort are applied. A later failed query cannot silently turn into a successful complete run: the summary records failed query positions and the final status is partial only when usable records were produced.
Proxy and access behavior
The Actor first tries ordinary browser navigation. When the host cannot be resolved locally, it uses bounded public DNS-over-HTTPS lookups after checking HTTP status and JSON content type, then supplies validated host mappings to Chrome. This is a transport fallback, not an access-control bypass.
An authorized Apify Proxy or custom proxy can be supplied through proxyConfiguration. Cookies are kept inside the current browser context, response status and HTML content type are validated before extraction, and temporary transport/rate-limit/time-out errors receive bounded retries. Baidu verification, CAPTCHA, and access-denied pages are detected, marked as target verification, and fail closed without solving or bypassing them.
How to use
Enter one or more search phrases in the Apify Input tab, set the limits and filters, then start the Actor. Review video records in the Output dataset and safe run metrics in the OUTPUT key-value record.
Current source limitations
Baidu may expose a video carousel on the first offset and ordinary web cards on later offsets. Ordinary cards are not videos and are never stored, so a run can return fewer items than requested. Some layouts do not display descriptions, view counts, dates, or thumbnails; those fields remain absent rather than inferred.
Repeated direct requests can trigger Baidu's interactive verification. The Actor detects this condition, records lastErrorCode: "TARGET_VERIFICATION" and the failure category in OUTPUT, and does not attempt to solve or bypass the challenge. Use an authorized China Residential proxy in Apify Cloud when direct access is rate-limited.