# Toutiao News & Article Scraper (`bovi/toutiao-scraper`) Actor

Collect public Toutiao feed items, keyword search results, and article details. Get structured records with titles, URLs, IDs, timestamps, and available text. Run with an operation, keyword, or article ID/URL; no login. Pricing: $0.003 per dataset item plus $0.00005 per Actor Start event on Free.

- **URL**: https://apify.com/bovi/toutiao-scraper.md
- **Developed by:** [Vitalii Bondarev](https://apify.com/bovi) (community)
- **Categories:** News, Social media
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 toutiao news & article scrapers

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## Toutiao Scraper

Toutiao Scraper extracts publicly available recommendation-feed items, keyword search cards, and public article details from Toutiao into an Apify dataset. It does not log in to Toutiao; Free-plan live pricing is detailed in the Pricing section below.

- Collect public recommendation-feed rows for monitoring current Toutiao content.
- Search Toutiao by a Chinese or other term for keyword research and result collection.
- Fetch public article metadata and visible body text for article-level datasets.
- Build structured news and social-media datasets with IDs, timestamps, genres, thumbnails, and available comment counts.
- Run from your Apify account without a Toutiao login or buyer-supplied API key.

### What you get

Each dataset row contains only fields present in the selected Toutiao source. Feed records can represent articles, videos, or user posts; `articleGenre` identifies the type when Toutiao provides it.

| Field | Type | Present in | Description |
|---|---|---|---|
| `_operation` | string | All operations | Operation that produced the record: `latestFeed`, `searchArticles`, or `articleDetail`. |
| `articleTitle` | string | Feed, search, and article details | Headline or visible search-card title. |
| `articleUrl` | string | Feed, search, and article details | Public Toutiao article URL. |
| `groupId` | string | Feed, search, and article details | Toutiao group ID. |
| `itemId` | string | Feed when provided | Feed item ID when supplied by Toutiao. |
| `authorName` | string | When provided by the source | Public creator or publisher name. |
| `publishTime` | string | Feed, search, and article details when available | UTC timestamp from feed or article data, or the time label shown in search results. |
| `searchKeyword` | string | `searchArticles` | Keyword used for the search request. |
| `articleAbstract` | string | Feed and search when available | Public feed summary or search-card excerpt. |
| `articleDescription` | string | `articleDetail` when available | Article description from Toutiao JSON-LD. |
| `articleContent` | string | `articleDetail` when available | Visible article body text. |
| `articleGenre` | string | Feed when provided | Toutiao feed genre, such as `article`, `video`, or `ugc`. |
| `imageUrl` | string | Feed when available | Feed thumbnail URL. |
| `commentCount` | integer | Feed when provided | Comment count available in the public feed. |

Read counts, likes, favorites, and creator follower totals are not returned because the inspected public pages did not expose those values.

### Sample output

```json
{
  "_operation": "latestFeed",
  "articleTitle": "一颗细胞如何成为一个人。 #生命的奇迹 #胎儿发育全过程#科普一下 #生命诞生 #涨知识",
  "articleUrl": "https://www.toutiao.com/group/7700925472192856639/",
  "groupId": "7700925472192856639",
  "itemId": "7700925472192856639",
  "authorName": "学无止境",
  "articleGenre": "video",
  "publishTime": "2026-10-28T07:07:38+00:00",
  "imageUrl": "http://p3.toutiaoimg.com/list/tos-cn-i-e874c6/ooM6KACDqCLnAaqFEAAyKTI2RAWff3RgcZQpGU",
  "commentCount": 29
}
```

### Pricing

Toutiao Scraper uses pay-per-event billing. The live Free-plan prices are:

| Charge event | Billing unit and condition | Free-plan price |
|---|---|---:|
| `apify-actor-start` — Actor Start | Charged when the Actor starts running. The number of events depends on Actor memory, with one event per GB and a minimum of one event. | $0.00005 per event on the Free plan |
| `apify-default-dataset-item` — Toutiao News & Article Scraper | One scraped result with all fields. | $0.003 per dataset item on the Free plan |

At the listed event prices, 1,000 Actor Start events = 1,000 × $0.00005 = $0.05 and 1,000 dataset-item events = 1,000 × $0.003 = $3.00 on Free; 10,000 Actor Start events = 10,000 × $0.00005 = $0.50 and 10,000 dataset-item events = 10,000 × $0.003 = $30.00 on Free.

For example, **10 results = $0.03005 on Free** when the run has one Actor Start event: 10 dataset items at $0.003 each plus one $0.00005 start event.

The Apify Free plan includes **$5 of monthly platform usage credit**. At the listed event prices, one Actor Start event plus dataset-item charges covers exactly **1,666 dataset results on Free** from that credit, calculated as `floor((5 - 0.00005) / 0.003)`.

For this pay-per-event Actor, compute, Apify Proxy traffic including residential traffic, and storage are included in the event prices and paid by the Actor developer. This Actor does not use the separately billed “Pay per event + usage” option, so platform usage is not separately charged to the buyer.

### How to use

1. **Choose** an operation: `latestFeed` for the current public recommendation feed, `searchArticles` for keyword results, or `articleDetail` for public article metadata and visible text.
2. **Provide** a `keyword` when using `searchArticles`. The mobile search page returns server-rendered result cards for the supplied term.
3. **Provide** an `articleId` or `articleIds` value when using `articleDetail`. Each value can be a Toutiao group ID or a public article URL.
4. **Set** `maxResults` to the maximum number of dataset records to push. The default is 50.
5. **Configure** `proxyConfiguration` only if needed. When proxying is disabled or the field is omitted at runtime, the Actor uses direct requests. The setting is passed to Apify Proxy configuration, and the Actor does not force a proxy group or country.
6. **Repeat** the run through Apify Schedules; daily is a reasonable starting point for feed or keyword monitoring, then adjust the schedule to your needs.

Example input for a keyword search:

```json
{
  "operation": "searchArticles",
  "keyword": "人工智能",
  "maxResults": 10
}
```

Export the dataset as JSON or CSV, or read it through the Apify dataset API.

### Input parameters

| Parameter | What it does | Default |
|---|---|---|
| `operation` | Selects `latestFeed`, `searchArticles`, or `articleDetail`. | `latestFeed` |
| `keyword` | Search term used by `searchArticles`; the schema default is `人工智能`, and the run requires a non-empty value for this operation. | `人工智能` in the schema |
| `articleId` | One Toutiao group ID or public article URL used by `articleDetail`. | None |
| `articleIds` | Array of Toutiao group IDs or public article URLs used by `articleDetail`. | None |
| `maxResults` | Maximum number of dataset records to return. | `50` |
| `proxyConfiguration` | Optional Apify Proxy settings. The schema default enables Apify Proxy with the `RESIDENTIAL` group; when omitted at runtime, direct requests are used. | Schema default: `useApifyProxy: true`, `apifyProxyGroups: ["RESIDENTIAL"]` |

The `operation` field is required. `articleId` and `articleIds` are read for `articleDetail`; the Actor accepts either one or multiple article references.

### Limits and edge cases

| Condition | What the buyer sees | What to do |
|---|---|---|
| `maxResults` is set | The value is an upper bound for every operation, so the dataset can contain fewer records than the limit. | Increase the limit or run the Actor again if more source records are needed. |
| `latestFeed` is selected | The Actor requests the public recommendation-feed response and parses records from that response. It does not request additional feed pages in the shown operation. | Run it again when another collection is needed. |
| A feed row is an advertisement, lacks a title, or lacks a usable group ID | That row is skipped and does not become a dataset record. | Use the records returned by the Actor or try another operation. |
| `searchArticles` receives an empty keyword | The run raises a validation error instead of requesting the search page. | Supply a non-empty search term. |
| The search page has no `#results` container or no parseable result cards | The search operation returns no records. | Check the term and run again with a public search phrase. |
| `articleDetail` receives neither a valid `articleId` nor a valid `articleIds` entry | The run raises a validation error. | Supply a numeric Toutiao group ID or a public article URL. |
| An article page has no supported Article, NewsArticle, or BlogPosting JSON-LD record, or its article URL has no usable group ID | The Actor logs that no public article data was found for that group and adds no record for it. | Check the public reference and try another article. |
| A request still fails after three attempts | The run fails and does not complete normally. Results are added only after records have been collected; for `articleDetail`, requested pages are processed before results are added. | Retry the run and review the selected proxy configuration. |
| A field is absent from the selected Toutiao source | That field is omitted from the dataset row rather than filled with an invented value. | Use the fields available for that source and operation. |

### FAQ

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

The live rate is $0.003 per dataset item on the Free plan, plus $0.00005 per Actor Start event on the Free plan. With one Actor Start event, 10 results = $0.03005 on Free.

#### Why did my search return no records?

Search results are parsed from Toutiao’s server-rendered mobile search page. An empty keyword causes a validation error, while a page without the expected results container or parseable cards produces no dataset rows. Try a non-empty search term and run the Actor again.

#### Why is the Actor not working?

Check that the selected operation has the required input: a non-empty `keyword` for `searchArticles`, or a valid group ID or public article URL for `articleDetail`. Requests are attempted up to three times; if a request still fails, the exception reaches the run. You can retry and review `proxyConfiguration`.

#### Is scraping public Toutiao data legal or allowed?

This Actor collects data from Toutiao’s publicly available feed, search, and article pages. Source terms and applicable law depend on your use case, so review the relevant terms and legal requirements before using the data; the Actor does not provide a legal guarantee.

### Related actors

- [Dzen.ru Scraper - Articles & Channels](https://apify.com/bovi/dzen-scraper) — related scraper for articles and channels on Dzen.ru.
- [Multi-Platform Viral Content Tracker](https://apify.com/bovi/multi-platform-viral-tracker) — related actor for tracking content across multiple platforms.
- [Telegram Channel Scraper — Messages, Views & Media](https://apify.com/bovi/telegram-channel-scraper) — related scraper for Telegram channel messages, views, and media.

# Actor input Schema

## `operation` (type: `string`):

Collect the current public feed, search Toutiao by keyword, or fetch article details.

## `keyword` (type: `string`):

Chinese or other search term. Used by searchArticles.

## `articleId` (type: `string`):

One Toutiao group ID or public article URL. Used by articleDetail.

## `articleIds` (type: `array`):

Multiple Toutiao group IDs or public article URLs. Used by articleDetail.

## `maxResults` (type: `integer`):

Maximum number of dataset records to return.

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

Optional proxy settings. Leave disabled to connect directly.

## Actor input object example

```json
{
  "operation": "latestFeed",
  "keyword": "人工智能",
  "articleId": "https://www.toutiao.com/group/7664616922066993691/",
  "articleIds": [
    "7664616922066993691"
  ],
  "maxResults": 50,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `results` (type: `string`):

Toutiao records collected by this Actor.

# 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 = {
    "operation": "latestFeed",
    "keyword": "人工智能",
    "maxResults": 50,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("bovi/toutiao-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 = {
    "operation": "latestFeed",
    "keyword": "人工智能",
    "maxResults": 50,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("bovi/toutiao-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 '{
  "operation": "latestFeed",
  "keyword": "人工智能",
  "maxResults": 50,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call bovi/toutiao-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,bovi/toutiao-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/l3p4z6WQXBnL9w20P/builds/1AgRIoHbCn0g75JVN/openapi.json
