# Toutiao Scraper – News, 微头条 Posts, Comments & Hot Board (`smoldesk/toutiao-scraper`) Actor

Scrape Toutiao (今日头条) without login: keyword search of news and 微头条 posts with date ranges, reads, likes, comments and shares, comment threads and the hot board (热榜). Articles $2 per 1,000, posts $4 per 1,000.

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

## Pricing

from $2.00 / 1,000 article or videos

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 – News, 微头条 Posts, Comments & Hot Board

![Toutiao Scraper: news articles, videos, comments and the hot board (热榜) without login](https://raw.githubusercontent.com/smoldesk/apify-scrapers/main/assets/toutiao/banner.webp)

Scrape **Toutiao (今日头条)**, China's biggest news app, without login, cookies or an API key. **Search any keyword** with date ranges and get **articles and videos** with **title, summary, publish time, author and verification**, **reads, plays, likes, comments, shares and saves**, **cover images** and Toutiao's **content categories**. Switch the search to **微头条 posts** (Toutiao's short posts, like Weibo) and get the **full post text, images, hashtags, author, reads, likes, comments and shares**. Add the **comments and reply threads** under any article or post, and the **Toutiao hot board (头条热榜)** with rank and heat score.

**Mix sources in one run**: keywords (news, posts or both), article and post links and the hot board together. Results found twice are saved once. **Articles and videos cost $2 per 1,000, 微头条 posts $4 per 1,000, comments and hot-board topics $1 per 1,000.** No monthly fee.

\*\*中文用户：\*\*本页下方有完整的「中文使用说明」。

### What you can use it for

- **Brand and PR monitoring in China**: every Toutiao article that mentions your brand, product or competitor, with reads and comment counts so you see what spreads.
- **Market and sentiment research**: Chinese news coverage and reader comments (with the commenter's province) for any topic.
- **Social listening on 微头条**: what users, creators and media accounts post about your brand in their own words, with hashtags, images and engagement, the way you would track Weibo.
- **Trend tracking**: snapshot the hot board every hour and watch which stories rise and fall.
- **Media and KOL research**: find which accounts (官方账号, 创作者) write about a niche and how much engagement they get.
- **AI / NLP datasets**: each article has a clean `markdown` field (title, summary, source, date, link) for RAG pipelines and LLM prompts.
- **Scheduled feeds**: turn on **Only new results** to get only the articles you haven't seen yet for a keyword.

### How to use it

**1. Add what to follow.** Type keywords, pick a date range and switch on comments or the hot board (热榜) if you want them.

![Step 1: add keywords, a date and the options you need](https://raw.githubusercontent.com/smoldesk/apify-scrapers/main/assets/toutiao/how-to-1.webp)

**2. Click Start.** Six keywords with 100 results each plus their comments take about 2 minutes.

![Step 2: click Start and watch the run log](https://raw.githubusercontent.com/smoldesk/apify-scrapers/main/assets/toutiao/how-to-2.webp)

**3. Get clean data.** Every article comes with title, author, reads, likes, comments and shares. Export it as JSON, CSV or Excel, or send it to Google Sheets or your app through the API.

![Step 3: get clean data and export it as JSON, CSV, Excel or via API](https://raw.githubusercontent.com/smoldesk/apify-scrapers/main/assets/toutiao/how-to-3.webp)

### How to scrape Toutiao

1. **Create a free Apify account** (no credit card needed to start) and open this Actor.
2. **Pick what you want** in the input form. Add **Search keywords** and choose **Search in**: *News* (articles and videos), *Posts (微头条)* or *Both*. Switch on **Hot board** for trending topics, or paste **Article, video or post URLs** to collect their comments. You can fill several at once.
3. **Set the limits.** *Max results per search* is how many articles each keyword returns. Use *Posted after / Posted before* to focus on a period. Turn on **Include comments for search results** if you want the discussion too.
4. **Click Start.** Six keywords with 100 results each plus their comments take about 2 minutes. Results appear in the **Output** tab while it runs.
5. **Download or connect.** Export as JSON, CSV, Excel or HTML, or read the dataset through the API, Make, Zapier, n8n, Google Sheets or a webhook.
6. **Automate it.** Open **Schedules**, add a daily or hourly schedule, and switch on **Only new results** so each run returns only articles and posts it hasn't seen before.

Ready-made tasks you can run, save and schedule in one click: [Monitor a brand on Toutiao (news + 微头条 posts, new only)](https://apify.com/smoldesk/toutiao-scraper/examples/toutiao-brand-monitoring) · [微头条 posts + comments for sentiment research](https://apify.com/smoldesk/toutiao-scraper/examples/toutiao-posts-comments-sentiment) · [Toutiao hot board (头条热榜), top 50](https://apify.com/smoldesk/toutiao-scraper/examples/toutiao-hot-board).

**Tips**

- Search in Chinese for the best results (小米汽车, not "Xiaomi car"). English brand names also work.
- Toutiao asks logged-out visitors to solve a captcha for a few very broad brand names on their own (比亚迪, sometimes 华为). The Actor skips those keywords without charging and tells you in the log; a more specific keyword works (比亚迪汽车, 华为手机, 华为Mate80).
- Toutiao returns about 100 results per keyword, and fewer when you set a date range. To cover a whole month, run one search per week with *Posted after / before*.
- The hot board changes all day. Schedule it hourly and compare `rank` and `heat` over time. Each topic has a `searchUrl` you can feed back in as a keyword.

### 中文使用说明

无需登录、Cookie 或 API 密钥，即可采集今日头条的公开数据：按关键词搜索文章和视频（标题、摘要、发布时间、作者及认证信息，以及阅读/播放、点赞、评论、分享和收藏数）、微头条（全文、图片和话题）、文章和微头条下的评论与回复，以及头条热榜。输入表单中的字段名为英文，下文以粗体标出，方便对照。

1. **注册免费的 Apify 账号**（开始使用无需绑定信用卡），然后打开本 Actor。
2. **选择要采集的内容**（可同时填写多项）：
   - **Search keywords**：搜索关键词，并在 **Search in** 中选择 *News*（文章和视频）、*Posts (微头条)* 或 *Both*（两者都要）。
   - **Hot board (热榜)**：打开后采集头条热榜。
   - **Article, video or post URLs (comments)**：粘贴文章、视频或微头条的链接，采集其评论。
3. **设置数量和时间范围**：**Max results per search** 是每个关键词返回的结果数量；**Posted after / Posted before** 用于限定发布时间段。如需同时采集搜索结果下的评论，请打开 **Include comments for search results**。
4. **点击 Start**。6 个关键词、每个 100 条结果并含评论，大约需要 2 分钟。运行期间结果会实时显示在 **Output** 标签页中。
5. **导出或对接数据**：可导出为 JSON、CSV、Excel 或 HTML，也可以通过 API、Make、Zapier、n8n、Google Sheets 或 Webhook 获取数据。
6. **定时监测**：在 **Schedules** 中添加每天或每小时运行的定时任务，并打开 **Only new results (monitor mode)**。之后每次运行只返回此前未采集过的文章和微头条。

**提示**：用中文搜索效果最好（例如用“小米汽车”，而不是“Xiaomi car”）。少数非常宽泛的品牌词（如“比亚迪”，有时还有“华为”）会要求未登录访客完成验证码。本 Actor 会跳过这些关键词，不收费，并在日志中说明；请改用更具体的关键词，例如“比亚迪汽车”“华为手机”。

**价格**（每 1,000 条）：文章或视频 $2，微头条 $4，评论或回复 $1，热榜话题 $1。无月费，未保存的数据不收费。可在运行选项中设置单次运行的最高费用，达到上限后 Actor 会自动停止。

**限制**：不提供文章正文（头条的文章页面设有浏览器验证），但会提供标题、摘要、各项互动数据和链接；微头条和评论均为完整内容。每个关键词在每个类型下约返回 100 条结果。无法获取作者的发布列表和粉丝列表。

### Output: article or video

```json
{
  "type": "article",
  "id": "7703867117984154152",
  "url": "https://www.toutiao.com/article/7703867117984154152/",
  "title": "胡晓庆揭秘比亚迪仰望U9X极速测试惊险瞬间：360km/h撞击护栏、试车员下车不去医院“搁那看”",
  "summary": "IT之家 11 月 3 日消息，比亚迪仰望销售事业部总经理胡晓庆在 11 月 1 日发文，宣布仰望 U9 Xtreme 将在阿联酋首都阿布扎比开启一场全新的开放公路极速挑战。……",
  "publishedAt": "2026-11-03T08:59:07+00:00",
  "authorName": "IT之家",
  "authorId": "3353880530",
  "authorAvatarUrl": "https://p9-passport.byteacctimg.com/img/user-avatar/af0d33491379272a4eb108fab111b1dd~300x300.image",
  "authorVerification": "IT之家官方账号",
  "readCount": 11426,
  "playCount": null,
  "likesCount": 108,
  "commentsCount": 63,
  "sharesCount": 0,
  "savesCount": 12,
  "durationSeconds": null,
  "imageUrl": "https://p3-sign.toutiaoimg.com/tos-cn-i-tjoges91tu/f4724369e8c401de0b68e23520f80f91~tplv-26tn0yjwph-cspd-v1:450:294.jpg?...",
  "images": ["https://p3-sign.toutiaoimg.com/tos-cn-i-tjoges91tu/f4724369e8c401de0b68e23520f80f91~tplv-26tn0yjwph-cspd-v1:450:294.jpg?..."],
  "categories": ["news_car", "news_car/domestic_car"],
  "searchQuery": "比亚迪",
  "searchRank": 8,
  "markdown": "# 胡晓庆揭秘比亚迪仰望U9X极速测试惊险瞬间……\n\nIT之家 11 月 3 日消息，……\n\nIT之家 · 2026-11-03 · https://www.toutiao.com/article/7703867117984154152/"
}
```

Videos have `"type": "video"`, a `/video/` URL, `playCount` and `durationSeconds`.

### Output: 微头条 post

```json
{
  "type": "post",
  "id": "1881069730069524",
  "url": "https://www.toutiao.com/w/1881069730069524/",
  "text": "【瑞幸咖啡KPL联名“真人杯”引发消费者不满】瑞幸近期与《王者荣耀》KPL十周年联名，将十位电竞选手的真人头像印上杯身和外卖袋，引发大量非电竞玩家的普通消费者不满。不少消费者反映，点单时未获任何提示，打开外卖袋看到陌生真人面孔，感到“毫……",
  "publishedAt": "2026-11-06T01:18:09+00:00",
  "authorName": "餐宝典",
  "authorId": "3021063171874379",
  "authorAvatarUrl": "https://p3-sign.toutiaoimg.com/user-avatar/b7a172fce1b2004794d41dc0de86c2ab~300x300.image?...",
  "authorVerification": "头条新锐创作者",
  "readCount": 168,
  "likesCount": 0,
  "commentsCount": 0,
  "sharesCount": 0,
  "hashtags": ["餐饮"],
  "links": [],
  "imageUrl": "https://p3-sign.toutiaoimg.com/tos-cn-i-ezhpy3drpa/f01f48d6590647b79f9b5eff59a671fd~tplv-shrink:1280:1280.jpeg?...",
  "images": ["https://p3-sign.toutiaoimg.com/tos-cn-i-ezhpy3drpa/f01f48d6590647b79f9b5eff59a671fd~tplv-shrink:1280:1280.jpeg?..."],
  "searchQuery": "瑞幸咖啡",
  "searchRank": 5,
  "markdown": "【瑞幸咖啡KPL联名“真人杯”引发消费者不满】瑞幸近期与《王者荣耀》KPL十周年联名，将十位电竞选手的真人头像印上杯身和……\n\n![](https://p3-sign.toutiaoimg.com/tos-cn-i-ezhpy3drpa/f01f48d6590647b79f9b5eff59a671fd~tplv-shrink:1280:1280.jpeg?...)\n\n餐宝典 · 2026-11-06 · https://www.toutiao.com/w/1881069730069524/"
}
```

`text` is the full post text with line breaks. `hashtags` are the topics the author tagged (without `#`), `links` any web links in the post. `readCount` is Toutiao's read/view count.

### Output: comment or reply

```json
{
  "type": "comment",
  "id": "7703942636834472744",
  "articleId": "7703772574265786931",
  "articleUrl": "https://www.toutiao.com/article/7703772574265786931/",
  "text": "都下滑成啥了，还靠谱",
  "publishedAt": "2026-11-03T13:52:08+00:00",
  "authorName": "爱吃面的坏锅锅",
  "authorId": "108474744859",
  "authorAvatarUrl": "https://p3-sign.toutiaoimg.com/user-avatar/6b0f6473aa52a9eb224e047ba83f6331~300x300.image?...",
  "authorVerified": false,
  "likesCount": 0,
  "replyCount": null,
  "location": "陕西",
  "isReply": true,
  "parentId": "7703851877292753727"
}
```

Comments under a post have the post's `/w/` link in `articleUrl`.

### Output: hot-board topic

```json
{
  "type": "trend",
  "rank": 7,
  "isPinned": false,
  "title": "黄金从暴涨到暴跌有哪些启示",
  "heat": 14441430,
  "label": "interpretation",
  "url": "https://www.toutiao.com/trending/7703953161530117686/",
  "imageUrl": "https://p3-sign.toutiaoimg.com/tos-cn-i-qvj2lq49k0/0331fb996abc4864a7d27ac91b06dde6~tplv-tt-shrink:960:540.jpeg?...",
  "clusterId": "7703953161530117686",
  "searchUrl": "https://so.toutiao.com/search?keyword=%E9%BB%84%E9%87%91%E4%BB%8E%E6%9A%B4%E6%B6%A8%E5%88%B0%E6%9A%B4%E8%B7%8C%E6%9C%89%E5%93%AA%E4%BA%9B%E5%90%AF%E7%A4%BA"
}
```

### Input

```json
{
  "searchQueries": ["比亚迪汽车", "新能源汽车"],
  "searchType": "both",
  "maxResultsPerSearch": 100,
  "postedAfter": "2026-10-01",
  "postedBefore": "2026-10-31",
  "trending": true,
  "articleUrls": ["https://www.toutiao.com/article/7703867117984154152/"],
  "includeComments": true,
  "maxCommentsPerArticle": 20,
  "maxRepliesPerComment": 3
}
```

Leave the input empty to get a small sample.

### Pricing

You pay per result, plus a tiny start fee. No monthly fee, and you are never charged for items that were not saved.

| Result | Price per 1,000 |
|---|---|
| Article or video | $2.00 |
| 微头条 post | $4.00 |
| Comment or reply | $1.00 |
| Hot-board topic | $1.00 |

Set the maximum cost per run in the run options and the Actor stops there. Example: 6 keywords (475 articles) plus 1,414 comments and replies and the 50-topic hot board is about $2.40. The same 6 keywords on the posts tab (600 posts) add about $2.40.

### Use with AI agents (Claude, ChatGPT, Cursor, MCP)

Add the Actor as a tool through the Apify MCP server: `https://mcp.apify.com?actors=smoldesk/toutiao-scraper`. Then paste this into your agent's system prompt or tool notes, so it knows when to call it:

```text
Tool: smoldesk/toutiao-scraper (Toutiao Scraper, Apify)
Use it when: the user wants Chinese news coverage from Toutiao (今日头条) about a company, product or topic; what people post about it on Toutiao 微头条 (short posts: set "searchType": "posts" or "both"); article, video and post stats (reads, likes, comments, shares); comments under an article or post; or the Toutiao hot board (热榜). No login needed.
Don't use it when: the user wants social media reactions (use smoldesk/weibo-scraper), WeChat Official Account articles (use smoldesk/wechat-articles-scraper), private data, or anything that needs a Toutiao login.
How to call: run the Actor with JSON input and read the dataset items. Results cost money per item, so keep the counts small unless the user asks for more.
Example input: {"searchQueries": ["比亚迪 海外"], "searchType": "both", "maxResultsPerSearch": 30, "postedAfter": "2026-10-01", "includeComments": true}
```

Questions an agent can answer with it:

- How did Chinese news media cover BYD's overseas sales this month? List the most-read articles.
- What are people posting on Toutiao about Luckin Coffee's latest collab? Summarize the complaints.
- What's trending on Toutiao's hot board today? Translate the top 10.
- Collect the reader comments under this Toutiao article and summarize the reaction.

**Your agent can pay for its own runs.** This Actor is approved for agentic payments on Apify, so an agent with a Skyfire token or an x402 wallet can call it and pay per result without an Apify account. Skyfire: use `https://mcp.apify.com?payment=skyfire`. x402: buy a prepaid Apify token with USDC. Setup: [Apify agentic payments docs](https://docs.apify.com/platform/integrations/x402).

### Use with AI (LangChain / LlamaIndex / CrewAI)

Each article and post has a `markdown` field (text or title and summary, images, source, date and link) and each comment has a `text` field, ready for LLMs. With LangChain (`pip install langchain-apify`):

```python
from langchain_apify import ApifyWrapper
from langchain_core.documents import Document

apify = ApifyWrapper()  # reads APIFY_API_TOKEN
loader = apify.call_actor(
    actor_id="smoldesk/toutiao-scraper",
    run_input={"searchQueries": ["人工智能"], "maxResultsPerSearch": 100},
    dataset_mapping_function=lambda v: Document(
        page_content=v.get("markdown") or v.get("text") or v.get("title") or "",
        metadata={k: v.get(k) for k in ("type", "url", "articleUrl", "authorName", "readCount", "publishedAt")},
    ),
)
docs = loader.load()
```

Already have a run? Use `ApifyDatasetLoader(dataset_id="<run's dataset ID>", dataset_mapping_function=...)`. **LlamaIndex**: `ApifyActor` from `llama-index-readers-apify`. **CrewAI**: use the Apify MCP server above.

### Limitations

This Actor never logs in and reads only what Toutiao shows any visitor, so:

- **No full article body.** Toutiao protects article pages with a browser check, so you get the title, summary, counts and link, not the full text. 微头条 posts and comments come in full.
- **About 100 results per keyword and tab** (fewer with a date range). Split long periods with **Posted after / Posted before**.
- **Date ranges on posts are applied by the Actor.** Toutiao's 微头条 search ignores dates and sorts by relevance, so the Actor keeps only the posts inside your range (the rest are skipped, not charged). Narrow ranges far in the past may return few posts.
- **A few very broad brand names are captcha-gated** for logged-out visitors (see Tips). They are skipped without charge; use a more specific keyword.
- **No author timelines or follower lists.** To follow an account, search its name or the topics it covers.
- If Toutiao starts answering with bot checks, the Actor slows down and stops early with what it has (shown in the status message), rather than hammering the site.

### FAQ

**Does Toutiao have a public API?** No open API for search, comments or the hot board. This Actor reads the same public pages and JSON the Toutiao website loads for any visitor, and returns clean, English-named JSON.

**Do I need a Toutiao account, cookies or a Chinese phone number?** No. Nothing to log in to, nothing to configure.

**Do I need a proxy or VPN?** No. It works from Apify's servers as is.

**How do I scrape Toutiao 微头条 posts?** Add keywords and set **Search in** to *Posts (微头条)* or *Both*. Each post comes with its full text, images, hashtags, author and verification, reads, likes, comments and shares. Turn on comments to get the discussion under each post too.

**How do I scrape Toutiao comments?** Paste article, video or post links into **Article, video or post URLs**, or turn on **Include comments for search results**. Set how many comments per article and how many replies per comment. Each comment comes with its author, likes and the province Toutiao shows.

**How do I get the Toutiao hot list (头条热榜)?** Switch on **Hot board**. You get up to 50 ranked topics with heat score, label, image and link.

**Is it legal?** It collects only data Toutiao shows publicly to every visitor, with no login. Follow copyright and privacy laws (e.g. PIPL, GDPR) when you reuse it.

### Feedback

Found a bug or missing a field? Open an issue in the **Issues** tab. If the Actor saved you time, a short review on this page helps other people find it.

Code examples and a quick reference are also on GitHub: [smoldesk/toutiao-scraper](https://github.com/smoldesk/toutiao-scraper).

### More Actors from Smoldesk Studios

- [Contact Details Scraper](https://apify.com/smoldesk/contact-details-scraper): emails, phone numbers, social profiles and contact forms from any list of websites, with email domains checked and junk removed, charged only when contacts are found
- [Google Maps Scraper](https://apify.com/smoldesk/google-maps-scraper): places with phones, websites, ratings and hours from any search, plus emails and social profiles from each business website, lead filters and new-place monitoring
- [WeChat Articles Scraper](https://apify.com/smoldesk/wechat-articles-scraper): WeChat Official Account (公众号) articles from keyword search, full text as Markdown, images, account IDs and publish dates, no login
- [Weibo Scraper](https://apify.com/smoldesk/weibo-scraper): Weibo search with date ranges, posts, comments, profiles and hot search (热搜), no login
- [Bilibili Scraper](https://apify.com/smoldesk/bilibili-scraper): videos, stats, danmaku, comments and creators from China's video site, no login
- [YouTube Scraper](https://apify.com/smoldesk/youtube-scraper): videos, Shorts, channels and comments from search, channels and playlists — exact views, likes, publish dates and durations, no API key
- [YouTube Comments Scraper](https://apify.com/smoldesk/youtube-comments-scraper): comments and replies from videos, channels, playlists or keyword searches, with likes, pinned/hearted flags and authors
- [YouTube Channel Scraper](https://apify.com/smoldesk/youtube-channel-scraper): subscribers, exact total views, join date, country and social links of any channel, plus its latest videos
- [Google Ads Transparency Scraper](https://apify.com/smoldesk/google-ads-transparency-scraper): every ad a competitor runs on Google Search, YouTube and Shopping — creatives, landing pages, countries, EU impressions and new-ad alerts
- [Tennis Scraper](https://apify.com/smoldesk/tennis-scraper): ATP, WTA, Challenger and ITF results and fixtures with odds from 15 bookmakers, H2H, players and rankings, back to the 2000s
- [Google Hotels Scraper](https://apify.com/smoldesk/google-hotels-scraper): hotel prices for your dates in any currency, ratings, review aspects and booking-site prices, worldwide
- [Google Hotels Price Calendar](https://apify.com/smoldesk/google-hotel-price-calendar): the cheapest nightly rate for every check-in date up to a year ahead, for any hotel, with taxes and booking-site prices
- [Google Trends Scraper](https://apify.com/smoldesk/google-trends-scraper): interest over time, by region and city, related queries and Trending now — no API key
- [Telegram Channel Scraper](https://apify.com/smoldesk/telegram-channel-scraper): public channel posts, views, reactions and subscribers
- [Substack Scraper](https://apify.com/smoldesk/substack-scraper): newsletters, subscriber counts and posts
- [Shopify Store Analyzer](https://apify.com/smoldesk/shopify-store-analyzer): apps, contacts and products of any Shopify store
- [Career Site Jobs Scraper](https://apify.com/smoldesk/career-site-jobs-scraper): live jobs from 12,000+ company career sites (Greenhouse, Lever, Workday, Ashby) with salary and seniority
- [SEEK, JobStreet & JobsDB Scraper](https://apify.com/smoldesk/seek-jobs-scraper): jobs and salaries across Australia and Southeast Asia

# Actor input Schema

## `searchQueries` (type: `array`):

Keywords to search on Toutiao (头条搜索). Chinese works best; English brand names work too. One search per entry; pick below whether to search news, posts or both.

## `searchType` (type: `string`):

News = Toutiao's news tab (articles and videos, $2 per 1,000). Posts = 微头条 short posts (text, images, hashtags, likes, comments, reads — $4 per 1,000). Both runs each keyword on both tabs.

## `maxResultsPerSearch` (type: `integer`):

Stop each search after this many results (articles/videos or posts, per tab). Toutiao shows about 100 per keyword (fewer with a date range) — split long periods with the date fields to get more.

## `postedAfter` (type: `string`):

Only results from this date on, for example 2026-10-01 or 2026-10-01T08:00:00Z. News: Toutiao filters the search itself. Posts: Toutiao's post search ignores dates, so the Actor drops posts outside the range (no charge) and you may get fewer.

## `postedBefore` (type: `string`):

Only results up to this date, for example 2026-10-31.

## `trending` (type: `boolean`):

Add what is trending on Toutiao right now: up to 50 hot topics with rank, heat score, label, image and link.

## `maxTrending` (type: `integer`):

How many hot-board topics to save.

## `includePinned` (type: `boolean`):

Also save the topics Toutiao pins above the ranking (usually official news). They get rank 0.

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

Toutiao article, video or post links (toutiao.com/article/<id>, /video/<id>, /group/<id>, /w/<id>, m.toutiao.com/i<id>) or numeric IDs. Saves their comments (and replies if set below). Items with no comments are skipped without charge.

## `includeComments` (type: `boolean`):

Also save comments for every search result that has any (extra charge per comment).

## `maxCommentsPerArticle` (type: `integer`):

Top-level comments to save per article, video or post, hottest first.

## `maxRepliesPerComment` (type: `integer`):

Replies to save under each comment. 0 = comments only.

## `onlyNewResults` (type: `boolean`):

Remember results from earlier runs and skip them, so a scheduled run returns and charges only new articles or posts per keyword.

## `maxConcurrency` (type: `integer`):

Requests in flight at once. Lower it if the log reports bot checks.

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

Optional. Toutiao works from Apify servers without a proxy. Residential proxies are not needed.

## Actor input object example

```json
{
  "searchQueries": [
    "人工智能"
  ],
  "searchType": "news",
  "maxResultsPerSearch": 20,
  "trending": false,
  "maxTrending": 50,
  "includePinned": false,
  "includeComments": false,
  "maxCommentsPerArticle": 20,
  "maxRepliesPerComment": 0,
  "onlyNewResults": false,
  "maxConcurrency": 3
}
```

# Actor output Schema

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

Search results (type = article or video).

## `posts` (type: `string`):

Short posts from the posts tab (type = post).

## `comments` (type: `string`):

Comments and replies (type = comment).

## `trends` (type: `string`):

Hot board topics (type = trend).

# 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 = {
    "searchQueries": [
        "人工智能"
    ],
    "searchType": "news",
    "maxResultsPerSearch": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("smoldesk/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 = {
    "searchQueries": ["人工智能"],
    "searchType": "news",
    "maxResultsPerSearch": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("smoldesk/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 '{
  "searchQueries": [
    "人工智能"
  ],
  "searchType": "news",
  "maxResultsPerSearch": 20
}' |
apify call smoldesk/toutiao-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,smoldesk/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/mpM6MDUwhfIkNaaS3/builds/0s4OADVxRJbrP6ETU/openapi.json
