# Baidu 百度 Search Scraper (`parsebird/baidu-search-scraper`) Actor

Scrape Baidu 百度 search results for any keyword: organic results with titles, links, snippets and dates, plus Baidu's AI answer, videos, news, ads, related searches and the 百度热搜 hot list. Desktop or mobile, time and language filters, up to 50 results per page. Export JSON, CSV, Excel or use the API.

- **URL**: https://apify.com/parsebird/baidu-search-scraper.md
- **Developed by:** [ParseBird](https://apify.com/parsebird) (community)
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $12.99 / 1,000 result pages

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

### Baidu 百度 Search Scraper

**Baidu Search Scraper** extracts search results from [Baidu (百度)](https://www.baidu.com/), China's largest search engine. Enter any keyword in Chinese or English. For each results page you get the organic results with title, real target URL, site name, snippet and date, plus everything else Baidu puts on the page: its AI answer (AI 智能回答), video and news carousels, paid ads with their landing pages, 大家还在搜 (people also search for), related searches and the 百度热搜 hot list. You don't need a Baidu account, a cookie or an API key.

<table><tr>
<td style="border-left:4px solid #1C1917;padding:12px 16px;font-weight:600">
One dataset item per Baidu results page: organic results with position, title, real link, domain, site name, snippet, date and thumbnail, plus Baidu's AI answer, videos, news, image results, ads, people also search for, related searches, the 百度热搜 hot list and pagination info. Desktop or mobile, 10, 20 or 50 results per page, time and language filters, up to about 760 results per keyword.
</td>
</tr></table>

##### Copy to your AI assistant

Copy this block into ChatGPT, Claude, Cursor, or any LLM to start using this actor.

```
Apify Actor: parsebird/baidu-search-scraper. Scrapes Baidu (baidu.com, 百度) search results pages without login. Call via ApifyClient: client.actor("parsebird/baidu-search-scraper").call(run_input={"queries": ["python tutorial", "咖啡"], "maxPages": 3}). Inputs: queries (string[]: keywords, Chinese or English, Baidu operators like site:zhihu.com pass through), maxPages (integer, default 1, 0 = every page Baidu shows, max about 760 results), device ("desktop" | "mobile", default desktop), resultsPerPage ("10" | "20" | "50", desktop only), language ("all" | "simplified" | "traditional", desktop only), timeRange ("any" | "day" | "week" | "month" | "year", desktop only), dateFrom / dateTo (YYYY-MM-DD, China time, desktop only, override timeRange), startPage (integer, default 1). Output: one item per results page: query, page, device, language, results_per_page, time_period, organic_results_count, organic_results [{position, rank, title, link (real target URL), domain, displayed_link, source (site name), snippet, date, thumbnail, result_type, baidu_link}], answer_box [{type (ai_summary | weather), title, text}], related_videos [{title, link, thumbnail, source, author, duration, date, description}], images [{thumbnail, link}], news_results [{title, link, snippet, source, date, thumbnail}], ads [{position, title, link, landing_url, advertiser, snippet}], people_also_search_for [{query, link}], related_searches [{query, link}], top_searches [{position, title, link, is_pinned}] (百度热搜), pagination_info {current_page, total_pages, has_next_page, max_pagination_set, pagination_stopped_by_limit}, search_metadata {query, device, language, start_page, results_per_page, time_period, max_pagination, baidu_url, scraped_at}. Pricing: pay per results page saved. Full API spec: https://apify.com/parsebird/baidu-search-scraper/api. Get your token: https://console.apify.com/settings/integrations.
```

### What is Baidu Search Scraper?

**Baidu Search Scraper** turns Baidu search engine results pages (SERPs) into structured data. Type your keywords, choose how many pages you want, and click **Start**. Every results page Baidu returns becomes one clean item that you can download as **JSON, CSV or Excel** or read through the API.

It works as a **Baidu Search API alternative**. Baidu has no public web search API, so the Actor reads the same public results pages you see on baidu.com and m.baidu.com, and does the hard parts for you: it resolves Baidu's `baidu.com/link?url=` redirects to the real target URL, separates ads and AI answers from the organic ranking, and retries from a fresh IP when Baidu blocks a request.

### What can Baidu Search Scraper do?

- 🔎 **Scrape Baidu search results for any keyword.** Chinese, English and mixed queries work, as do Baidu search operators such as `site:zhihu.com` or `"exact phrase"`.
- 📄 **Go deep.** Scrape page 1 only, a set number of pages, or every page Baidu shows (Baidu stops at about 760 results per query). Start at any page with **Start page**.
- 🖥️📱 **Desktop or mobile rankings.** Scrape www.baidu.com or m.baidu.com, whose rankings differ, to see what mobile users in China see.
- 🗂️ **Filter like Baidu's advanced search.** On desktop, pick 10, 20 or 50 results per page, limit results to Simplified or Traditional Chinese, or to the past day, week, month, year or a custom date range.
- 🤖 **Capture every SERP feature.** Baidu's AI answer, video and news carousels, image results, ads with advertiser and landing page, 大家还在搜, related searches and the 百度热搜 hot list are saved in their own fields.
- 📅 **Track rankings over time.** Run the same keywords daily or weekly with [Apify Schedules](https://docs.apify.com/platform/schedules) to monitor SEO positions on Baidu.
- 🔌 **API and integrations.** Use the [Apify API](https://docs.apify.com/api/v2), or send results to Google Sheets, Zapier, Make, Slack or webhooks with [Apify integrations](https://docs.apify.com/platform/integrations). Export as JSON, CSV, Excel, XML or HTML.

### What data can you extract from Baidu?

Each item is one Baidu results page. The main fields:

| Field | Description |
|-------|-------------|
| `query` · `page` · `device` | The keyword, the results page number and desktop or mobile |
| `organic_results` | The organic ranking. Each result has `position`, `rank` (Baidu's own slot number, which also counts AI answers and carousels), `title`, `link` (the real target URL), `domain`, `displayed_link`, `source` (site name, e.g. 知乎), `snippet`, `date`, `thumbnail`, `result_type` (`organic`, `baike` or Baidu's card name) and `baidu_link` (Baidu's redirect link) |
| `organic_results_count` | Number of organic results on the page |
| `answer_box` | Baidu's AI answer (`ai_summary`) and weather card: `type`, `title`, `text` |
| `related_videos` | Video carousel: `title`, `link`, `thumbnail`, `source`, `author`, `duration`, `date`, `description` |
| `news_results` | News carousel: `title`, `link`, `snippet`, `source`, `date`, `thumbnail` |
| `images` | Image results: `thumbnail`, `link` |
| `ads` | Paid results: `position`, `title`, `link`, `landing_url`, `advertiser`, `snippet` |
| `people_also_search_for` | 大家还在搜 suggestions: `query`, `link` |
| `related_searches` | Related searches (相关搜索): `query`, `link` |
| `top_searches` | The 百度热搜 hot list shown next to desktop results: `position`, `title`, `link`, `is_pinned` |
| `pagination_info` | `current_page`, `total_pages` (Baidu's pager; on early pages it's an upper bound, usually 76), `has_next_page`, `max_pagination_set`, `pagination_stopped_by_limit` |
| `search_metadata` | The settings used, the `baidu_url` of the page and `scraped_at` |

### How to scrape Baidu search results

1. Open [Baidu Search Scraper](https://apify.com/parsebird/baidu-search-scraper) on Apify Store and click **Try for free**.
2. In **Search queries**, enter your keywords, one per line.
3. Set **Pages per query**. Keep `1` for the first page, or use `0` for every page Baidu shows.
4. Optionally choose **Device** and, for desktop, the filters: results per page, language, time range or dates.
5. Click **Start**. When the run finishes, open the **Output** tab. The **Organic results** view lists one row per result. Download the data as JSON, CSV, Excel, XML or HTML, or read it with the API.

#### Track Baidu rankings for a few keywords

```json
{
    "queries": ["python tutorial", "咖啡", "site:zhihu.com 机器学习"],
    "maxPages": 3
}
```

This saves pages 1 to 3 for each keyword: 9 items, each with up to 10 organic results.

#### Get 50 recent results per page

```json
{
    "queries": ["新能源汽车"],
    "resultsPerPage": "50",
    "timeRange": "week",
    "maxPages": 2
}
```

Two pages of up to 50 results each, limited to pages Baidu dates within the past week.

#### Scrape Baidu mobile results

```json
{
    "queries": ["红烧肉的做法"],
    "device": "mobile",
    "maxPages": 3
}
```

### Input parameters

See the [Input tab](https://apify.com/parsebird/baidu-search-scraper/input-schema) for the full form.

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `queries` | string\[] | — | Keywords to search on Baidu |
| `maxPages` | integer | `1` | Results pages per query. `0` = every page Baidu shows |
| `device` | string | `desktop` | `desktop` (www.baidu.com) or `mobile` (m.baidu.com) |
| `resultsPerPage` | string | `10` | `10`, `20` or `50`. Desktop only |
| `language` | string | `all` | `all`, `simplified` or `traditional` Chinese. Desktop only |
| `timeRange` | string | `any` | `any`, `day`, `week`, `month` or `year`. Desktop only |
| `dateFrom` · `dateTo` | string | — | Custom date range, `YYYY-MM-DD` in China time. Desktop only. Overrides `timeRange` |
| `startPage` | integer | `1` | First results page to scrape |

⚠️ **Mobile has no filters.** The filters above apply to desktop searches. When you choose mobile, they're ignored and the log says so. Duplicate queries are merged.

The Actor also accepts the input names used by other Baidu scrapers: `query`, `num_results`, `page`, `max_pagination`, `localization` (1 = all, 2 = Simplified, 3 = Traditional) and `time_period` (`stf=START,END|stftype=1` with Unix timestamps). `device: "tablet"` is treated as mobile.

### Output example

This is a real item for the query 咖啡 (coffee), shortened: lists are cut to one or two entries, and long text and URLs are trimmed.

```json
{
    "query": "咖啡",
    "page": 1,
    "device": "desktop",
    "language": "all",
    "results_per_page": 10,
    "time_period": null,
    "organic_results_count": 6,
    "organic_results": [
        {
            "position": 3,
            "rank": 7,
            "title": "咖啡的功效与作用_妙手医生",
            "link": "https://www.miaoshou.net/article/ZpNrlnOqp1w2DOd9_c47c3498ff3e66fc.html",
            "domain": "www.miaoshou.net",
            "displayed_link": null,
            "source": "妙手医生",
            "snippet": "1、提高代谢: 咖啡是一种常见的饮品,其中的热量比较低,适量的喝咖啡能够提高机体的代谢速度...",
            "date": "2024年08月23日",
            "thumbnail": "https://gimg3.baidu.com/search/src=https%3A%2F%2Fmuzhi-public-pic.cdn.bcebos.com...",
            "result_type": "organic",
            "baidu_link": "http://www.baidu.com/link?url=cK-DtYe6oJrgoes-5SlpMiMMvOGlb1v0..."
        }
    ],
    "answer_box": [
        {
            "type": "ai_summary",
            "title": "咖啡基础常识",
            "text": "咖啡基础常识\n1. 基础定义与起源：咖啡原产于和南苏丹一带，约14世纪被带到也门..."
        }
    ],
    "related_videos": [],
    "images": [],
    "news_results": [
        {
            "title": "“咖啡+”,带热城乡消费",
            "link": "http://www.baidu.com/link?url=cK-DtYe6oJrgoes-5SlpMbdFzLkI3V4Z...",
            "snippet": "秋日的午后，江苏昆山里厍社区的几木咖啡馆里座无虚席...",
            "source": "中国经济周刊",
            "date": "8小时前",
            "thumbnail": "https://t7.baidu.com/it/u=1615227874,300456702&fm=3035..."
        }
    ],
    "ads": [
        {
            "position": 1,
            "title": "咖啡,多种口味,尽在京东!",
            "link": "https://www.baidu.com/baidu.php?url=K60000avpXkFvm720ZnXFUzb...",
            "landing_url": "https://ccc-wt.jd.com/dsp/nc?ext=aHR0cHM6Ly9yZS5qZC5jb20v...",
            "advertiser": "京东",
            "snippet": "5分钟前有人咨询咖啡咖啡-京东热卖品质放心,服务贴心,超低折扣,品类齐全!逛京东就\"购\"了!"
        }
    ],
    "people_also_search_for": [
        { "query": "咖啡分类", "link": "https://www.baidu.com/s?wd=%E5%92%96%E5%95%A1%E5%88%86%E7%B1%BB..." }
    ],
    "related_searches": [
        { "query": "咖啡十大排名", "link": "https://www.baidu.com/s?wd=%E5%92%96%E5%95%A1%E5%8D%81..." }
    ],
    "top_searches": [],
    "pagination_info": {
        "current_page": 1,
        "total_pages": 76,
        "has_next_page": true,
        "max_pagination_set": 1,
        "pagination_stopped_by_limit": true
    },
    "search_metadata": {
        "query": "咖啡",
        "device": "desktop",
        "language": "all",
        "start_page": 1,
        "results_per_page": 10,
        "time_period": null,
        "max_pagination": 1,
        "baidu_url": "https://www.baidu.com/s?wd=%E5%92%96%E5%95%A1",
        "scraped_at": "2026-11-03T12:13:37+00:00"
    }
}
```

### How much does it cost to scrape Baidu?

Baidu Search Scraper uses **pay-per-event** pricing. You pay for each Baidu results page saved to your dataset, plus Apify's standard Actor start fee of $0.005 per run (per GB of memory; the default 256 MB counts as one). Compute and proxy costs are included in the price. Pages that fail after every retry are not saved and not charged.

| Event | Free | Bronze | Silver | Gold |
|-------|------|--------|--------|------|
| Results page (per 1,000) | $15.99 | $14.99 | $13.99 | $12.99 |

On the Free plan one results page costs about $0.016, so 100 keywords × 1 page cost about $1.60. A run costs the price × the number of pages saved (queries × pages per query). With **Results per page** set to 50, each billed page holds up to 50 results instead of 10. To cap spending, set a maximum cost per run in Apify Console; the Actor stops cleanly when it reaches it.

### Use the Baidu Search API from Python or JavaScript

Get your API token from [Apify Console](https://console.apify.com/settings/integrations), then call the Actor with the [Apify API client](https://docs.apify.com/api/client/python).

**Python**

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")

run = client.actor("parsebird/baidu-search-scraper").call(run_input={
    "queries": ["python tutorial", "咖啡"],
    "maxPages": 2,
})

for page in client.dataset(run["defaultDatasetId"]).iterate_items():
    for result in page["organic_results"]:
        print(page["query"], page["page"], result["position"], result["title"], result["link"])
```

**JavaScript**

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: '<YOUR_APIFY_TOKEN>' });

const run = await client.actor('parsebird/baidu-search-scraper').call({
    queries: ['python tutorial'],
    resultsPerPage: '50',
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items[0].organic_results.map((r) => r.link), items[0].answer_box);
```

The full endpoint reference, including synchronous runs that return the dataset in one call, is on the [API tab](https://apify.com/parsebird/baidu-search-scraper/api).

### Use cases

- **Baidu SEO and rank tracking.** Check where your pages rank on Baidu for your keywords, on desktop and mobile, and schedule runs to watch positions change.
- **China market research.** See which sites, brands and platforms (Zhihu, Baike, WeChat articles, Bilibili) dominate Baidu for a topic.
- **Competitor and ad monitoring.** Collect which advertisers bid on your keywords, their ad copy and landing pages.
- **Trend watching.** Save the 百度热搜 hot list, news carousels and related searches to follow what people in China are searching for.
- **AI and data pipelines.** Feed Chinese search results and Baidu's AI answers into RAG, LLM agents or NLP research.

### How it works

1. Each query is searched on www.baidu.com or m.baidu.com, from datacenter IPs first and from China residential IPs when Baidu pushes back or the filters need it.
2. Every response is checked. A captcha, a page that doesn't match the page number asked for, or a page without results is retried from a new IP. The Actor never solves captchas.
3. Each page is parsed into organic results, SERP features, ads and related searches, and saved and charged as soon as it's ready.
4. Pagination stops at your page limit or at the last page Baidu offers. A run that Apify moves to another server resumes without duplicates.

### FAQ

**Do I need a Baidu account, cookie or API key?**
No. The Actor reads the public results pages a logged-out visitor sees.

**Why are there fewer than 10 organic results on page 1?**
Baidu fills some of the 10 slots on a page with its AI answer, video or news carousels and other cards. Those are saved in their own fields (`answer_box`, `related_videos`, `news_results`, `images`), and `rank` shows Baidu's slot number for each organic result.

**How many results can I get per keyword?**
At most about 760: 76 pages of 10, 38 pages of 20 or 16 pages of 50. Many queries end sooner. In our November 2026 tests, 咖啡 had 22 pages and python 28, although their first pages showed 76. Set **Pages per query** to `0` to scrape every page there is; the Actor stops when Baidu has no next page.

**Why does `link` differ from `baidu_link`?**
Baidu wraps every result in a `baidu.com/link?url=` redirect. `link` is the real target URL, read from the page, and `baidu_link` is Baidu's redirect. News and video links are Baidu redirect links.

**Why do my results differ from what I see on Baidu?**
Baidu tailors results to location and device, and it personalizes results for logged-in users. The Actor searches logged out with no history, so results match a new visitor's view.

**Does the time filter work on mobile?**
No. Results per page, language and time filters are applied on desktop only. With mobile, the Actor ignores them and notes it in the log.

**Why is a run with 20 or 50 results per page and a language filter slower?**
Baidu shows its security check much more often for that combination (in our November 2026 tests, about 4 in 5 requests from China residential IPs). The Actor keeps retrying from new IPs until the page comes through, so these pages take longer, typically 20 to 60 seconds each. Either filter on its own runs at normal speed.

**What if my start page is past the last page?**
Many queries have fewer than 76 pages. When you ask for a page past the end, Baidu returns its last page instead. The Actor detects this, logs how many pages the query has, and saves and charges nothing for it.

**Why is `top_searches` sometimes empty?**
The 百度热搜 hot list is part of the desktop page's right column, and Baidu doesn't include it on every page or on mobile. When Baidu leaves it out, the field is an empty list.

**What happens when Baidu shows a captcha?**
The Actor drops that IP and retries the page from a new one, switching to China residential IPs if needed. It doesn't solve captchas. If a page still fails after all retries, it's skipped, logged and not charged.

**Can I schedule recurring runs?**
Yes. Use [Apify Schedules](https://docs.apify.com/platform/schedules) to run hourly, daily or weekly.

**Can I use it with Make, Zapier, Google Sheets or an AI agent?**
Yes, through [Apify integrations](https://docs.apify.com/platform/integrations) and the [Apify API](https://docs.apify.com/api/v2). The Actor is also available to AI agents through the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp).

**Something doesn't work. What should I do?**
Open an issue on the [Issues tab](https://apify.com/parsebird/baidu-search-scraper/issues) with your run link. We read every report.

### Is it legal to scrape Baidu?

This Actor only collects publicly available search results that any visitor can see on baidu.com. It doesn't log in, solve captchas or access private content. Search results can still include personal data, which is protected by laws such as China's Personal Information Protection Law (PIPL) and the EU's GDPR. Don't scrape personal data unless you have a legitimate reason, and check Baidu's terms of service before you use the data. If you're unsure, consult a lawyer. Read more in Apify's guide: [Is web scraping legal?](https://blog.apify.com/is-web-scraping-legal/)

### Related Actors

| Actor | What it does |
|-------|--------------|
| [Sogou WeChat Article Search Scraper](https://apify.com/parsebird/sogou-wechat-search-scraper) | WeChat articles by keyword from Sogou's WeChat search |
| [WeChat Official Accounts Scraper (微信公众号)](https://apify.com/parsebird/wechat-official-accounts-scraper) | WeChat official account data |
| [Bilibili 哔哩哔哩 Scraper](https://apify.com/parsebird/bilibili-scraper) | Bilibili videos, comments, danmaku and UP主 profiles |
| [Kuaishou 快手 Scraper](https://apify.com/parsebird/kuaishou-scraper) | Kuaishou videos with stats, MP4 links, music and creator counts |
| [Taobao & Tmall Scraper](https://apify.com/parsebird/taobao-tmall-scraper) | Taobao and Tmall product listings and prices |
| [Naver AI Overview API](https://apify.com/parsebird/naver-ai-overview-api) | Naver's AI search answers for Korean keywords |
| [NAVER Blog & Cafe Scraper](https://apify.com/parsebird/naver-blog-cafe-scraper) | Naver blog and cafe posts by keyword |
| [Startpage Search Scraper](https://apify.com/parsebird/startpage-search-scraper) | Web search results from Startpage |

# Changelog

This Actor's version history is a separate document: https://apify.com/parsebird/baidu-search-scraper/changelog.md

# Actor input Schema

## `queries` (type: `array`):

Add the keywords to search on Baidu, one per line, exactly as you would type them into baidu.com. Chinese and English both work, and Baidu search operators such as <code>site:zhihu.com</code> or <code>"exact phrase"</code> are passed through.

## `maxPages` (type: `integer`):

Set how many Baidu results pages to scrape for each query. Each page is one dataset item and one billed event. Use <b>0</b> for every page Baidu shows (Baidu stops at about 760 results).

## `device` (type: `string`):

Choose which Baidu results to scrape: the desktop site (www.baidu.com) or the mobile site (m.baidu.com). Rankings differ between the two. Filters below work on desktop only.

## `resultsPerPage` (type: `string`):

Pick how many results Baidu puts on each page. Baidu offers 10, 20 or 50. Larger pages cover more results per billed page.

## `language` (type: `string`):

Limit results to pages in Simplified or Traditional Chinese, as in Baidu's advanced search.

## `timeRange` (type: `string`):

Limit results to pages Baidu dates within the last day, week, month or year. Ignored when you set the dates below.

## `dateFrom` (type: `string`):

Optional start of a custom date range (China time). Leave empty for no start date.

## `dateTo` (type: `string`):

Optional end of a custom date range, inclusive (China time). Leave empty for today.

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

Start from this results page instead of page 1, for example 3 to skip the first two pages.

## Actor input object example

```json
{
  "queries": [
    "python tutorial"
  ],
  "maxPages": 1,
  "device": "desktop",
  "resultsPerPage": "10",
  "language": "all",
  "timeRange": "any",
  "startPage": 1
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

# 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 = {
    "queries": [
        "python tutorial"
    ],
    "maxPages": 1
};

// Run the Actor and wait for it to finish
const run = await client.actor("parsebird/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 = {
    "queries": ["python tutorial"],
    "maxPages": 1,
}

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

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

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

```

## CLI example

```bash
echo '{
  "queries": [
    "python tutorial"
  ],
  "maxPages": 1
}' |
apify call parsebird/baidu-search-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,parsebird/baidu-search-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/h0DUztpCd1x3CQkrJ/builds/KS3rG0NnJCkBdWVWC/openapi.json
