# 🔍 Baidu Search Scraper (`scraper-engine/baidu-search-scraper`) Actor

Scrape Baidu search results at scale. Extract organic listings, answer boxes, related videos, related searches, and top searches. Supports bulk queries, proxy fallback, date filters, and device/language options for SEO and market research.

- **URL**: https://apify.com/scraper-engine/baidu-search-scraper.md
- **Developed by:** [Scraper Engine](https://apify.com/scraper-engine) (community)
- **Categories:** SEO tools, Developer tools, Agents
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.99 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

### 🔍 Baidu Search Scraper

The 🔍 Baidu Search Scraper is a production-ready Baidu search engine scraper that extracts structured SERP data (organic listings, answer boxes, related videos, related searches, and top searches) at scale. It solves the challenge of reliable Baidu search data extraction with an intelligent proxy fallback strategy and robust parsing. Built for marketers, developers, data analysts, and researchers, this Baidu SERP scraper powers keyword tracking, market intelligence, and research workflows at scale.

### What is 🔍 Baidu Search Scraper?

The 🔍 Baidu Search Scraper is a scalable Baidu search results scraper that collects structured SERP data programmatically. It addresses roadblocks like geo/language differences and anti-bot challenges using an automatic proxy fallback and device/language options. Ideal for SEO teams, growth marketers, analysts, and researchers, this Baidu search scraper tool enables repeatable, large-scale SERP monitoring and Baidu search data extraction for competitive insights, content planning, and research.

### What data / output can you get?

Below are the fields pushed to the Apify dataset during the run. Each row represents one SERP element (organic result, answer box, related video, related/“people also search for”/top searches).

| Data field      | Description                                                                 | Example value |
| ---             | ---                                                                          | --- |
| query           | The search term processed                                                    | python tutorial |
| resultType      | Result category: organic, answer_box, related_video, people_also_search_for, related_search, top_search | organic |
| title           | Title of organic/answer/video items                                          | Learn Python – Official Tutorial |
| link            | URL for organic/video/related items                                          | https://www.python.org/about/gettingstarted/ |
| snippet         | Organic result snippet/description                                           | Python is an easy to learn, powerful programming language... |
| displayedLink   | Host/domain shown with the organic result                                    | www.python.org |
| thumbnail       | Image URL (when present for organic/video)                                   | https://example.com/thumb.jpg |
| position        | Organic ranking position (1-based across fetched pages)                      | 1 |
| richSnippet     | Additional highlighted text extracted from organic result                    | Beginner-friendly resources |
| content         | Answer box content/body                                                      | Python is a programming language… |
| source          | Source citation for answer box (when available)                              | Baidu Baike |
| searchTerm      | The related search term (for related_search, people_also_search_for, top_search) | python basics |

Notes:
- Results stream to the Apify dataset in real time and can be exported (e.g., JSON, CSV, Excel) from the platform.
- If you set the outputFile input, the actor also saves a consolidated JSON to the key-value store with summary and results_by_query for each term.

### Key features

- 🛡️ Intelligent proxy fallback  
  Starts with no proxy by default; automatically falls back to Apify datacenter and then RESIDENTIAL proxies (up to 3 retries) if Baidu blocks requests. Once residential works, it sticks with it for all remaining requests.

- 📚 Bulk queries at scale  
  Paste multiple Baidu search URLs or plain search terms into urls and process them all in a single run — perfect for Baidu keyword ranking scraper workflows and large campaigns.

- 🖥️📱 Device & language controls  
  Choose deviceType (desktop/mobile/tablet) for different SERP layouts and set languageLocalization (1–3) to align with regional/language preferences — ideal for Baidu SEO scraping tool use cases.

- 🕒 Time period filtering  
  Flexible timePeriod with startDate/endDate or daysAgo enables date-scoped Baidu search automation and trend analysis.

- 📊 Real-time dataset streaming  
  Results are flattened and pushed row-by-row for immediate visibility (Baidu organic results, answer boxes, videos, related/“people also search for”/top searches). Great for dashboards and pipelines.

- 🎯 Fine-grained result limits  
  Control results with numResults per page and maxPagination (0–10). Start from any startPage to continue pagination.

- 💾 Optional consolidated JSON export  
  Set outputFile to also save a summary + results_by_query object to the key-value store for easy retrieval or downstream processing.

- 🧰 Developer-friendly on Apify  
  Designed for programmatic use as a Baidu SERP API via the Apify platform. Integrate with scripts, workflows, or data pipelines for Baidu SERP scraping Python and automation scenarios.

### How to use 🔍 Baidu Search Scraper - step by step

1. Create or log in to your Apify account.
2. Open the actor named baidu-search-scraper.
3. Add input data in urls: either Baidu search URLs (e.g., https://www.baidu.com/s?wd=python) or plain search terms (e.g., python tutorial).
4. Configure settings:
   - deviceType: desktop (default), mobile, or tablet.
   - languageLocalization: 1 (all languages, default), 2 (Simplified Chinese), 3 (Traditional Chinese).
   - numResults and maxPagination to control volume; startPage to set the starting page.
   - timePeriod with startDate/endDate or daysAgo for date filtering.
   - proxyConfiguration (optional): leave unset to start without proxy; fallback kicks in automatically on block.
   - outputFile (optional): set a key to save the consolidated JSON to the key-value store.
5. Start the run. The actor probes connectivity and automatically applies proxy fallback if needed.
6. Watch logs for progress, page fetches, and proxy events.
7. Download results from the dataset as JSON/CSV/Excel, or retrieve the key-value store record (if outputFile was set).

Pro Tip: Use deviceType and languageLocalization together to compare desktop vs. mobile rankings by region and build a robust Baidu keyword research scraper workflow.

### Use cases

| Use case | Description |
| --- | --- |
| SEO teams – keyword ranking tracking | Monitor organic positions, answer boxes, and related searches for target keywords using a reliable Baidu SERP crawler. |
| Market research – trend analysis | Analyze top searches and “people also search for” to identify rising topics and market signals. |
| Content strategy – SERP feature mapping | Extract answer boxes and related videos to understand content formats that surface for your topics. |
| Localization testing – desktop vs mobile | Compare SERPs across deviceType and languageLocalization for accurate regional SEO strategies. |
| Data pipelines – API ingestion | Stream row-based results into data lakes or analytics tools via the Apify dataset for Baidu search automation. |
| Academic research – search behavior | Study query relationships via related_search and people_also_search_for for research on information retrieval. |
| Competitive monitoring – SERP visibility | Track competitor visibility, links, and snippets to inform strategic decisions. |

### Why choose 🔍 Baidu Search Scraper?

This Baidu search results API solution is built for precision, automation, and reliability at scale.

- 🎯 Accurate SERP parsing: Extracts organic fields, answer boxes, related videos, and query suggestions cleanly.
- 🌐 Multilingual/regional support: languageLocalization and deviceType mirror real SERPs for better coverage.
- 📈 Scales with bulk queries: Process many terms in one run for Baidu keyword ranking scraper workflows.
- 🧪 Developer access: Runs on Apify with programmatic access for pipelines and Baidu SERP scraping Python integrations.
- 🛡️ Robust & resilient: Automatic proxy fallback (none → datacenter → residential) with retries keeps runs stable.
- 💾 Flexible output: Real-time row streaming to dataset plus optional consolidated JSON to key-value store.
- 🔄 Better than extensions: Avoid brittle browser add-ons; use a production-grade Baidu search engine scraper with logs and infrastructure.

Bottom line: A reliable Baidu results parser and Baidu SERP scraper that balances accuracy, flexibility, and scale.

### Is it legal / ethical to use 🔍 Baidu Search Scraper?

Yes — when used responsibly. This actor collects data from publicly available Baidu SERPs and does not require login or access private content.

Guidelines for compliant use:
- Collect only public SERP data and respect platform terms.
- Ensure your use complies with data protection regulations (e.g., GDPR, CCPA) and local laws.
- Do not attempt to access private or authenticated resources.
- Consult your legal team for edge cases and jurisdiction-specific requirements.

### Input parameters & output format

#### Example JSON input
```json
{
  "urls": [
    "python tutorial",
    "https://www.baidu.com/s?wd=machine%20learning"
  ],
  "deviceType": "desktop",
  "languageLocalization": 1,
  "startPage": 1,
  "numResults": 10,
  "timePeriod": {
    "startDate": "",
    "endDate": "",
    "daysAgo": 0
  },
  "maxPagination": 3,
  "outputFile": "baidu_serp_summary",
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
````

Parameters (from the actor input schema):

- urls (array, required): Baidu search URLs (e.g., https://www.baidu.com/s?wd=python) OR plain search terms. Default: none (required).
- deviceType (string, optional): Desktop/mobile/tablet targeting. Default: "desktop".
- languageLocalization (integer, optional): 1 = All languages; 2 = Simplified Chinese; 3 = Traditional Chinese. Default: 1.
- startPage (integer, optional): Starting page number (1-based). Default: 1.
- numResults (integer, optional): Results per page (1–50). Default: 10.
- timePeriod (object, optional): Date filter. Use:
  - startDate (string): YYYY-MM-DD. Default: "".
  - endDate (string): YYYY-MM-DD. Default: "".
  - daysAgo (integer): Last N days (0 disables). Default: 0.
- maxPagination (integer, optional): Max pages per query (0–10; 0 treated as up to 10 in code). Default: 3.
- outputFile (string, optional): If set, also saves the consolidated JSON to the key-value store under this key. Default: "".
- proxyConfiguration (object, optional): Apify proxy config. By default: no proxy; automatic fallback applies on block. Default: not set (no proxy).

#### Example dataset items (primary output)

This is what the actor pushes to the Apify dataset during the run:

```json
[
  {
    "query": "python tutorial",
    "resultType": "organic",
    "title": "Learn Python – Official Tutorial",
    "link": "https://www.python.org/about/gettingstarted/",
    "snippet": "Python is an easy to learn, powerful programming language...",
    "displayedLink": "www.python.org",
    "thumbnail": "https://example.com/thumb.jpg",
    "position": 1,
    "richSnippet": "Beginner-friendly resources"
  },
  {
    "query": "python tutorial",
    "resultType": "answer_box",
    "title": "What is Python?",
    "content": "Python is a programming language...",
    "source": "Baidu Baike"
  },
  {
    "query": "python tutorial",
    "resultType": "related_video",
    "title": "Python Basics in 15 Minutes",
    "link": "https://www.baidu.com/video/xyz",
    "thumbnail": "https://example.com/video.jpg"
  },
  {
    "query": "python tutorial",
    "resultType": "people_also_search_for",
    "searchTerm": "python basics",
    "link": "https://www.baidu.com/s?wd=python%20basics"
  },
  {
    "query": "python tutorial",
    "resultType": "related_search",
    "searchTerm": "learn python online"
  },
  {
    "query": "python tutorial",
    "resultType": "top_search",
    "searchTerm": "python download",
    "link": "https://www.baidu.com/s?wd=python%20download"
  }
]
```

#### Optional consolidated JSON (when outputFile is set)

If you provide outputFile, the actor also saves the following structure to the key-value store:

```json
{
  "summary": {
    "total_queries": 2,
    "queries": ["python tutorial", "machine learning"],
    "total_organic_results": 20,
    "total_answer_boxes": 2,
    "total_related_videos": 3,
    "total_people_also_search_for": 10,
    "total_related_searches": 12,
    "total_top_searches": 6
  },
  "results_by_query": {
    "python tutorial": {
      "query": "python tutorial",
      "organic_results": [...],
      "answer_box": [...],
      "related_videos": [...],
      "people_also_search_for": [...],
      "related_searches": [...],
      "top_searches": [...]
    },
    "machine learning": {
      "query": "machine learning",
      "organic_results": [...],
      "answer_box": [...],
      "related_videos": [...],
      "people_also_search_for": [...],
      "related_searches": [...],
      "top_searches": [...]
    }
  }
}
```

Note: Arrays above contain the corresponding structures as parsed from Baidu SERPs during the run.

### FAQ

#### Does the 🔍 Baidu Search Scraper work without a proxy?

Yes. By default, it starts with no proxy. If Baidu blocks a request, it automatically falls back to Apify datacenter and then RESIDENTIAL proxies with retries.

#### Can I start with a proxy from the beginning?

Yes. Set proxyConfiguration to enable the Apify proxy at the start. The automatic fallback still applies if a block is detected.

#### How do language and device settings affect results?

languageLocalization maps to Baidu’s rqlang parameter and influences regional/language results. deviceType selects between www.baidu.com (desktop) and m.baidu.com (mobile/tablet), which can change SERP layout and content.

#### How do I limit or expand the number of results per keyword?

Use numResults (1–50) and maxPagination (0–10; 0 is treated as up to 10 in the scraper). startPage lets you begin from a later page for continuation workflows.

#### Can I filter results by date?

Yes. Use timePeriod with either startDate/endDate or daysAgo. The scraper converts these to Baidu’s stf/stftype parameters to scope the SERP.

#### What data types does it capture?

It extracts organic results (title, link, snippet, displayedLink, thumbnail, position, richSnippet), answer boxes (title, content, source), related videos (title, link, thumbnail), people also search for, related searches, and top searches.

#### Is there an API to run this as part of a pipeline?

Yes. As an Apify actor, it can be triggered via the Apify API and integrated into pipelines for Baidu search scraping bot and automation workflows.

#### Can I export results to CSV or Excel?

Yes. Dataset items can be exported from the Apify platform in multiple formats such as JSON, CSV, or Excel for downstream analysis.

### Closing CTA / Final thoughts

The 🔍 Baidu Search Scraper is built for accurate, scalable Baidu SERP data extraction. With intelligent proxy fallback, device/language controls, and real-time dataset streaming, it’s an ideal Baidu search results API solution for marketers, developers, analysts, and researchers. Use it for SEO tracking, trend analysis, and Baidu keyword research at scale, and optionally save consolidated summaries via outputFile. Developers can run it programmatically via the Apify API to power automation pipelines. Start extracting smarter Baidu insights with a reliable, production-ready Baidu SERP scraper today.

# Actor input Schema

## `urls` (type: `array`):

📝 **What to enter:** Baidu search URLs (e.g. https://www.baidu.com/s?wd=python) OR plain search terms (e.g. python tutorial, machine learning). Add one per line for bulk scraping.

💡 **Tip:** Use plain terms for simplicity. URLs are parsed automatically to extract the query.

## `deviceType` (type: `string`):

🖥️ **Desktop** = www.baidu.com (default). 📱 **Mobile/Tablet** = m.baidu.com. Use to scrape mobile vs desktop SERP (different layouts & results).

## `languageLocalization` (type: `integer`):

1 = All languages (default). 2 = Simplified Chinese (简体中文). 3 = Traditional Chinese (繁體中文). Affects search result language/region.

## `startPage` (type: `integer`):

Page number to start scraping from. 1 = first page (default). Use 2+ to skip earlier pages (e.g. for pagination continuation).

## `numResults` (type: `integer`):

Number of results per page (1–50). Baidu typically shows 10. Higher = more results per request. Use with maxPagination for total result cap.

## `timePeriod` (type: `object`):

Optional date range filter. Leave empty for no filter (all results). Use Start Date + End Date for custom range, OR Days Ago for "last N days" (e.g. 7 = last week).

## `maxPagination` (type: `integer`):

Max pages to scrape per query. 0 = no limit (capped at 10). 3 = first 3 pages. More pages = more results but longer run time.

## `outputFile` (type: `string`):

Optional custom key for key-value store. Results are always saved to Apify dataset. If set, also saves to KVS with this name for easy retrieval.

## `proxyConfiguration` (type: `object`):

By default: no proxy. If Baidu blocks → datacenter → residential (3 retries). Enable Apify proxy here if you want to start with proxy. Fallback still applies when blocked.

## Actor input object example

```json
{
  "urls": [
    "python tutorial"
  ],
  "deviceType": "desktop",
  "languageLocalization": 1,
  "startPage": 1,
  "numResults": 10,
  "maxPagination": 3,
  "outputFile": "",
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "urls": [
        "python tutorial"
    ],
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("scraper-engine/baidu-search-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "urls": ["python tutorial"],
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("scraper-engine/baidu-search-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "urls": [
    "python tutorial"
  ],
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call scraper-engine/baidu-search-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=scraper-engine/baidu-search-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "🔍 Baidu Search Scraper",
        "description": "Scrape Baidu search results at scale. Extract organic listings, answer boxes, related videos, related searches, and top searches. Supports bulk queries, proxy fallback, date filters, and device/language options for SEO and market research.",
        "version": "0.1",
        "x-build-id": "zzOrHGBRETh69VLlE"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/scraper-engine~baidu-search-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-scraper-engine-baidu-search-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/scraper-engine~baidu-search-scraper/runs": {
            "post": {
                "operationId": "runs-sync-scraper-engine-baidu-search-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/scraper-engine~baidu-search-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-scraper-engine-baidu-search-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "urls"
                ],
                "properties": {
                    "urls": {
                        "title": "🔎 Search Queries (required)",
                        "type": "array",
                        "description": "📝 **What to enter:** Baidu search URLs (e.g. https://www.baidu.com/s?wd=python) OR plain search terms (e.g. python tutorial, machine learning). Add one per line for bulk scraping.\n\n💡 **Tip:** Use plain terms for simplicity. URLs are parsed automatically to extract the query.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "deviceType": {
                        "title": "📱 Device Type",
                        "enum": [
                            "desktop",
                            "mobile",
                            "tablet"
                        ],
                        "type": "string",
                        "description": "🖥️ **Desktop** = www.baidu.com (default). 📱 **Mobile/Tablet** = m.baidu.com. Use to scrape mobile vs desktop SERP (different layouts & results).",
                        "default": "desktop"
                    },
                    "languageLocalization": {
                        "title": "🌐 Language",
                        "minimum": 1,
                        "maximum": 3,
                        "type": "integer",
                        "description": "1 = All languages (default). 2 = Simplified Chinese (简体中文). 3 = Traditional Chinese (繁體中文). Affects search result language/region.",
                        "default": 1
                    },
                    "startPage": {
                        "title": "📄 Starting Page",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Page number to start scraping from. 1 = first page (default). Use 2+ to skip earlier pages (e.g. for pagination continuation).",
                        "default": 1
                    },
                    "numResults": {
                        "title": "📊 Results Per Page",
                        "minimum": 1,
                        "maximum": 50,
                        "type": "integer",
                        "description": "Number of results per page (1–50). Baidu typically shows 10. Higher = more results per request. Use with maxPagination for total result cap.",
                        "default": 10
                    },
                    "timePeriod": {
                        "title": "📅 Time Period Filter",
                        "type": "object",
                        "description": "Optional date range filter. Leave empty for no filter (all results). Use Start Date + End Date for custom range, OR Days Ago for \"last N days\" (e.g. 7 = last week).",
                        "properties": {
                            "startDate": {
                                "title": "📆 Start Date",
                                "type": "string",
                                "editor": "datepicker",
                                "description": "From date (YYYY-MM-DD). Used with End Date for custom range. Ignored if Days Ago is set.",
                                "default": ""
                            },
                            "endDate": {
                                "title": "📆 End Date",
                                "type": "string",
                                "editor": "datepicker",
                                "description": "To date (YYYY-MM-DD). Used with Start Date for custom range. Ignored if Days Ago is set.",
                                "default": ""
                            },
                            "daysAgo": {
                                "title": "⏱️ Days Ago",
                                "type": "integer",
                                "description": "Alternative: filter to last N days. e.g. 7 = last week, 30 = last month. Set to 0 to disable (use Start/End dates or no filter).",
                                "minimum": 0,
                                "default": 0
                            }
                        }
                    },
                    "maxPagination": {
                        "title": "📑 Maximum Pages",
                        "minimum": 0,
                        "maximum": 10,
                        "type": "integer",
                        "description": "Max pages to scrape per query. 0 = no limit (capped at 10). 3 = first 3 pages. More pages = more results but longer run time.",
                        "default": 3
                    },
                    "outputFile": {
                        "title": "💾 Output File",
                        "type": "string",
                        "description": "Optional custom key for key-value store. Results are always saved to Apify dataset. If set, also saves to KVS with this name for easy retrieval.",
                        "default": ""
                    },
                    "proxyConfiguration": {
                        "title": "🔒 Proxy Configuration",
                        "type": "object",
                        "description": "By default: no proxy. If Baidu blocks → datacenter → residential (3 retries). Enable Apify proxy here if you want to start with proxy. Fallback still applies when blocked."
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
