# Baijiahao Article Scraper (百家号) - Baidu Articles (`hgservices/baijiahao-article-scraper`) Actor

Scrape Baidu Baijiahao (百家号) articles by URL or ID. Get title, full text, HTML, publish time, images, videos, AI summary and author details such as name, ID, followers, total likes and IP location. No login needed.

- **URL**: https://apify.com/hgservices/baijiahao-article-scraper.md
- **Developed by:** [Harish Garg](https://apify.com/hgservices) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.00 / 1,000 scraped articles

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

**Baijiahao Article Scraper** extracts **Baidu Baijiahao (百家号) article data** from article URLs or IDs. For each article you get the **title, full text, HTML, publish time, images, videos, AI summary** and **author details** such as name, ID, followers, total likes and IP location.

**No Baidu account, app, login or cookies are needed.** Paste article links and click **Start**. Then download the data as JSON, CSV or Excel, get it through the Baijiahao API that this Actor gives you, run it on a schedule, or ask an AI assistant such as Claude or ChatGPT to get Baijiahao articles for you.

### What is Baijiahao Article Scraper?

Baijiahao Article Scraper is an unofficial **Baijiahao API and scraper** for articles. You give it a list of article links, and it saves **one row for each article**:

- 📰 **Article:** ID, link, title and publish time (Beijing time)
- 📝 **Content:** the full text, one line for each paragraph, and the full body as HTML with the images and videos in place
- 🤖 **AI summary:** the summary that Baidu writes for some articles (AI导读)
- 🖼️ **Images:** the link, width, height and caption of every image in the article
- 🎬 **Videos:** the direct MP4 link, cover, length, size and resolution of every video in the article
- 👤 **Author:** name, author ID (`app_id`), author page, avatar, description and verification (for example `北京日报报业集团`)
- 📊 **Author reach:** followers and the total likes on all of the author's content
- 📍 **IP location:** the province and city that Baidu shows for the author (IP属地)

The Actor runs on the Apify platform, so you also get **API access, scheduling, integrations, monitoring and data export** in many formats.

### Why scrape Baijiahao articles?

Baijiahao (百家号) is Baidu's publishing platform. Chinese news media, government offices, companies and millions of independent writers publish on it, and its articles rank high in Baidu search. Use the data for:

- **Media monitoring:** collect the full text of the articles that mention your brand, products or competitors.
- **News and policy research:** archive the articles of official media accounts, such as 新华社 or 北京日报客户端, with their exact publish times.
- **AI and NLP datasets:** get clean Chinese article text for translation, summarization, classification or RAG pipelines.
- **Author research:** compare the followers, likes and IP locations of the accounts that write about a topic.
- **Content archiving:** keep a copy of articles, with their images and video links, before they change or are deleted.

### How to scrape Baijiahao articles

1. Open an article on [baijiahao.baidu.com](https://baijiahao.baidu.com), or find one in Baidu search, and copy its link.
2. Paste one or more links into **Article URLs**.
3. Click **Start** and wait for the run to finish. A small list takes less than a minute.
4. Open the **Output** tab to see the articles, or export them as JSON, CSV, Excel, XML or HTML.

### Input

The Actor has one input field.

| Field | What it does | Example |
|-------|--------------|---------|
| **Article URLs** (`articleUrls`) | Links to Baijiahao articles, or article IDs | `["https://baijiahao.baidu.com/s?id=1878903244270643422"]` |

These forms all work:

- Article links: `https://baijiahao.baidu.com/s?id={article ID}`
- Links from Baidu search, with extra parameters: `https://baijiahao.baidu.com/s?id={article ID}&wfr=spider&for=pc`
- Baidu app links: `https://mbd.baidu.com/newspage/data/landingsuper?id={article ID}`
- Bare article IDs: `1878903244270643422`

The Actor saves each article one time, also when two links in the list point to the same article. It skips author pages (`author.baidu.com/home?app_id=...`), text that is not an article link, articles that do not exist or were deleted, and articles that Baidu sends to the publisher's own website. The run log names each skipped entry.

#### Input example

```json
{
  "articleUrls": [
    "https://baijiahao.baidu.com/s?id=1878903244270643422",
    "https://baijiahao.baidu.com/s?id=1668627464689061153&wfr=spider&for=pc",
    "1879646486175300210"
  ]
}
```

### Output

You get one row for each article. This row is from a real run (long texts and lists are shortened):

```json
{
  "articleId": "1879646486175300210",
  "articleUrl": "https://baijiahao.baidu.com/s?id=1879646486175300210",
  "title": "央视报道后，丹阳市场监管局对涉案4家镜片企业立案调查",
  "publishedAt": "2026-10-21T16:14:52+08:00",
  "contentText": "10月18日，总台新闻频道《每周质量报告》栏目播出《看不清的近视“防控”镜片》，……",
  "contentHtml": "<p><span class=\"bjh-p\">10月18日，总台新闻频道《每周质量报告》栏目播出……",
  "characterCount": 662,
  "aiSummary": null,
  "coverImageUrl": "https://pics0.baidu.com/feed/2f738bd4b31c8701c416236ba935e23d0608ff7c.jpeg@f_auto?token=06361e788bc918c420e86dee81f39d60",
  "imageCount": 3,
  "images": [
    {
      "url": "https://pics0.baidu.com/feed/2f738bd4b31c8701c416236ba935e23d0608ff7c.jpeg@f_auto?token=06361e788bc918c420e86dee81f39d60",
      "width": 1242,
      "height": 639,
      "caption": null
    }
  ],
  "videoCount": 1,
  "videos": [
    {
      "url": "https://vd3.bdstatic.com/mda-sjkbqgnkuyszzube/360p/h264/1792570589339081572/mda-sjkbqgnkuyszzube.mp4",
      "coverUrl": "https://pic.rmb.bdstatic.com/bjh/news/d072c09c8a76f7437e786a37423739f7.jpeg",
      "durationSeconds": 114,
      "width": 1920,
      "height": 1080,
      "size": "44.36M"
    }
  ],
  "authorName": "北京日报客户端",
  "authorId": "1601149438053974",
  "authorUk": "8oo7bbaEf1fq1V7zTuLFLg",
  "authorUrl": "https://author.baidu.com/home?app_id=1601149438053974",
  "authorAvatarUrl": "https://avatar.bdstatic.com/it/u=1779201848,3750860456&fm=3012&app=3012&autime=1788915347&size=b200,200",
  "authorDescription": "爱北京、关注北京、读北京",
  "authorVerification": "北京日报报业集团",
  "authorFollowers": 5851873,
  "authorTotalLikes": 82210165,
  "ipProvince": null,
  "ipCity": null,
  "sourceUrl": "https://baijiahao.baidu.com/s?id=1879646486175300210&wfr=spider&for=pc",
  "scrapedAt": "2026-10-23T14:29:58+00:00"
}
```

The **Output** tab shows the articles in a table with the cover, title, author, publish time, length, image and video counts, followers, IP province and article link. You can download the dataset as JSON, CSV, Excel, XML, HTML or RSS.

#### Baijiahao data fields

| Field | Description |
|-------|-------------|
| `articleId` | Article ID |
| `articleUrl` | Link to the article |
| `title` | Article title |
| `publishedAt` | Publish time, ISO 8601, Beijing time (+08:00) |
| `contentText` | Full article text, one line for each paragraph |
| `contentHtml` | Full article body as HTML, with images and videos in place |
| `characterCount` | Length of `contentText` in characters |
| `aiSummary` | The summary that Baidu writes with AI (AI导读), or `null` |
| `coverImageUrl` | The first image, or the first video cover |
| `imageCount` | Number of images |
| `images` | Images, each with `url`, `width`, `height` and `caption` |
| `videoCount` | Number of videos |
| `videos` | Videos, each with `url` (MP4), `coverUrl`, `durationSeconds`, `width`, `height` and `size` |
| `authorName` | Author name |
| `authorId` | Author ID (`app_id`) |
| `authorUk` | The author's Baidu account key (`uk`) |
| `authorUrl` | Link to the author page |
| `authorAvatarUrl` | Author avatar |
| `authorDescription` | The author's own description, or `null` |
| `authorVerification` | The verification text that Baidu shows, for example an organization name, or `null` |
| `authorFollowers` | Author followers (粉丝). Some accounts show `0` |
| `authorTotalLikes` | Likes on all of the author's content (获赞) |
| `ipProvince` | The province that Baidu shows for the author's IP address, or `null` |
| `ipCity` | The city that Baidu shows for the author's IP address, or `null` |
| `sourceUrl` | The link or ID from your input that gave this row |
| `scrapedAt` | When your run collected the row (UTC) |

### How to use the Baijiahao scraper

You can run the Actor from Apify Console, from the Apify API, from your own JavaScript or Python code, or from an AI assistant. Every example below gets the same data.

#### Apify Console (no code)

1. Open the Actor and paste your links into **Article URLs** on the **Input** tab.
2. Click **Start**. Follow the progress in the **Log** tab.
3. Open the **Output** tab to see the table, or click **Export** to download the data.
4. To repeat the same run, click **Save as a new task**. Add a **Schedule** to the task to check the same articles every day or week.

#### Baijiahao API (HTTP)

Run the Actor and get the articles in one request. Replace `YOUR_API_TOKEN` with your token from **Settings → API & Integrations** in Apify Console.

```bash
curl -X POST "https://api.apify.com/v2/acts/hgservices~baijiahao-article-scraper/run-sync-get-dataset-items" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"articleUrls": ["https://baijiahao.baidu.com/s?id=1878903244270643422", "https://baijiahao.baidu.com/s?id=1668627464689061153"]}'
```

The response is a JSON array with one object for each article. Add `?format=csv` or `?format=xlsx` to the URL to get CSV or Excel.

This request waits for the run to finish, for up to 5 minutes. For a long list of articles, start the run with `POST https://api.apify.com/v2/acts/hgservices~baijiahao-article-scraper/runs`. When the run is finished, get the articles from `GET https://api.apify.com/v2/datasets/{defaultDatasetId}/items`.

#### Scrape Baijiahao with JavaScript

Install the client with `npm install apify-client`. Save this code as `baijiahao.mjs` and run it with `node baijiahao.mjs`:

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

const client = new ApifyClient({ token: 'YOUR_API_TOKEN' });

const run = await client.actor('hgservices/baijiahao-article-scraper').call({
    articleUrls: [
        'https://baijiahao.baidu.com/s?id=1878903244270643422',
        'https://baijiahao.baidu.com/s?id=1668627464689061153',
    ],
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
for (const article of items) {
    console.log(article.publishedAt, article.authorName, article.title);
}
```

#### Scrape Baijiahao with Python

Install the client with `pip install apify-client` (version 3.0 or later), then run this code:

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_API_TOKEN")

run = client.actor("hgservices/baijiahao-article-scraper").call(
    run_input={
        "articleUrls": [
            "https://baijiahao.baidu.com/s?id=1878903244270643422",
            "https://baijiahao.baidu.com/s?id=1668627464689061153",
        ],
    }
)
if run is None:
    raise RuntimeError("The run was not found.")

for article in client.dataset(run.default_dataset_id).iterate_items():
    print(article["publishedAt"], article["authorName"], article["title"])
    print(article["contentText"][:200])
```

#### Claude, ChatGPT and other AI assistants (MCP)

Connect your AI assistant to the **Apify MCP server**. The assistant can then run this Actor for you and answer from the results. Use this server URL to give the assistant this Actor as a tool:

```
https://mcp.apify.com?tools=hgservices/baijiahao-article-scraper
```

**Claude (claude.ai and Claude Desktop)**

1. Open **Settings → Connectors**.
2. Click **Add**, then **Add custom connector**.
3. Enter a name, for example `Apify`, and paste the server URL above.
4. Click **Continue**, keep the detected settings, and click **Add**.
5. Sign in to Apify in the browser window that opens.

On Claude Team and Enterprise plans, an organization owner adds the connector for the organization.

**ChatGPT**

1. Open **Settings → Apps & Connectors** and click **Create**. If you do not see **Create**, turn on **Developer mode**.
2. Enter a name, for example `apify-mcp`, and paste the server URL above as the **MCP Server URL**.
3. Select **OAuth** for authentication and click **Create**.
4. Sign in to Apify and allow access.
5. In a new chat, click **+**, select **More**, and select your Apify connector.

**Claude Code, Cursor, VS Code and Codex**

- **Claude Code:** run `claude mcp add --transport http apify "https://mcp.apify.com?tools=hgservices/baijiahao-article-scraper"`, then run `/mcp` and sign in to Apify.
- **Apify CLI:** run `apify mcp install claude-code --tools hgservices/baijiahao-article-scraper`. You can use `cursor`, `vscode` or `codex` in place of `claude-code`.
- **Other MCP clients:** add the server URL as a remote (HTTP) MCP server.

Then ask in plain language, for example:

- *"Get the Baijiahao article https://baijiahao.baidu.com/s?id=1878903244270643422 and summarize it in English."*
- *"Scrape these Baijiahao articles and make a table of their authors, publish times and follower counts."*
- *"Translate the text of these Baijiahao articles into English."*

#### Integrations

Send the results to **Google Sheets, Slack, email, Zapier, Make, n8n, Airbyte** or any **webhook** from the Actor's **Integrations** tab. For example, add every new article from your monitoring list to a Google Sheet.

### Tips for scraping Baijiahao

- **Paste any article link.** Web links, links from Baidu search and Baidu app links all work.
- **Find article links with Baidu.** Search for a keyword on [baidu.com](https://www.baidu.com) or in Baidu News, and copy the `baijiahao.baidu.com/s?id=` links from the results.
- **Use the text or the HTML.** `contentText` is ready for reading, translation and AI tools. `contentHtml` keeps the layout, the images and the videos.
- **Download images and videos soon.** The image and video links work without a login, but they can change or stop working after some time. When you download an image, do not send a `Referer` header from another website.

### Limits

- **The Actor needs article links or IDs.** It does not search Baidu and does not list all the articles of an author.
- **No like, comment or read counts.** The article page does not include these counts. The Actor gives the author's followers and total likes.
- **No comment texts.**
- **Some articles are on other websites.** For some publishers, Baidu sends the article link to the publisher's own website. The Actor skips these articles and names them in the run log.
- **No image or video files.** The Actor saves the link to each file, not the file itself.
- **The IP location is what Baidu shows.** It is not a verified address. Many media accounts show no IP location.

### 中文简介

百家号文章抓取工具：输入百家号文章链接 (baijiahao.baidu.com/s?id=…)、百度 App 链接或文章 ID，即可获取每篇文章的标题、正文 (纯文本与 HTML)、发布时间、图片、视频、AI 导读摘要，以及作者名称、作者 ID (app_id)、粉丝数、获赞总数、认证信息和 IP 属地。无需登录百度账号，可导出 JSON、CSV、Excel，也可通过 API 或 AI 助手调用。

### FAQ, disclaimers and support

#### Do I need a Baidu account or the Baidu app?

No. The Actor reads only what baijiahao.baidu.com shows to any visitor. It never logs in.

#### Do I need a proxy?

No. You do not need to set up a proxy.

#### Can I get the articles of one author?

Not with this Actor. It scrapes the articles that you give it. Each row has the author ID and the link to the author page.

#### Is it legal to scrape Baijiahao?

The Actor collects only data that is publicly available. Articles, images and videos are protected by copyright, and the data can contain personal data, which laws such as the GDPR and China's PIPL protect. You are responsible for using the data in line with Baidu's terms of service and these laws. Do not republish content that you do not have the rights to.

#### I found a problem or need a feature

Open an issue on the **Issues** tab, and we will look into it. Custom solutions for Baijiahao and other Chinese websites are available on request.

# Actor input Schema

## `articleUrls` (type: `array`):

Baijiahao article URLs or article IDs, one per line. Supported: https://baijiahao.baidu.com/s?id=<id> (with or without extra parameters such as \&wfr=spider\&for=pc), https://mbd.baidu.com/newspage/data/landingsuper?id=<id>, and bare article IDs. Author pages are skipped. Duplicates are scraped once.

## Actor input object example

```json
{
  "articleUrls": [
    "https://baijiahao.baidu.com/s?id=1878903244270643422",
    "https://baijiahao.baidu.com/s?id=1668627464689061153"
  ]
}
```

# Actor output Schema

## `articles` (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 = {
    "articleUrls": [
        "https://baijiahao.baidu.com/s?id=1878903244270643422",
        "https://baijiahao.baidu.com/s?id=1668627464689061153"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("hgservices/baijiahao-article-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 = { "articleUrls": [
        "https://baijiahao.baidu.com/s?id=1878903244270643422",
        "https://baijiahao.baidu.com/s?id=1668627464689061153",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("hgservices/baijiahao-article-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 '{
  "articleUrls": [
    "https://baijiahao.baidu.com/s?id=1878903244270643422",
    "https://baijiahao.baidu.com/s?id=1668627464689061153"
  ]
}' |
apify call hgservices/baijiahao-article-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,hgservices/baijiahao-article-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/GSKpcCf4xOXYmVWT7/builds/8iJJH8JPfeGtN8c2o/openapi.json
