{
  "openapi": "3.0.1",
  "info": {
    "title": "Toutiao News Scraper – 今日头条 China News, Hot Board & Comments",
    "description": "Toutiao scraper API (今日头条, ByteDance news app), no login: Toutiao hot board/hot list = Chinese hot search, trending topics (头条热榜), Toutiao news & keyword search (头条新闻), article details + full text, channel feeds, Toutiao comments, replies, authors, followers, video URLs. $0.004/row, $0.0015/comment.",
    "version": "2.1",
    "x-build-id": "Vh5TDOESjVVzdtnGc"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/deadc0dex~toutiao-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-deadc0dex-toutiao-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/deadc0dex~toutiao-scraper/runs": {
      "post": {
        "operationId": "runs-sync-deadc0dex-toutiao-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/deadc0dex~toutiao-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-deadc0dex-toutiao-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "operation": {
            "title": "Operation (hot board, news search, keyword research, article full text, comments, user articles, feed…)",
            "enum": [
              "auto",
              "hotBoard",
              "search",
              "keywordResearch",
              "feed",
              "articleDetails",
              "comments",
              "replies",
              "userProfile",
              "userArticles",
              "related",
              "capabilities"
            ],
            "type": "string",
            "description": "auto (default): urls/ids -> articleDetails, users -> userArticles, keywords -> search, channels -> feed, nothing -> hotBoard. hotBoard = 头条热榜 top 50. search = keyword news. keywordResearch = keyword -> top articles + full text + comments + free insights row. feed = channel news. articleDetails = full text. comments / replies. userProfile / userArticles. related. capabilities = free manifest. Use these exact names (Apify rejects other values before the run starts).",
            "default": "auto"
          },
          "keywords": {
            "title": "Toutiao keyword search (news search keywords)",
            "type": "array",
            "description": "Keywords for operation search (头条搜索), one per item. Chinese works best; English names are auto-translated with expandQuery (BYD -> 比亚迪, Xiaomi -> 小米). Each row shows queryUsed. A Toutiao URL placed here is treated as a URL. Example: [\"比亚迪\", \"artificial intelligence\"].",
            "items": {
              "type": "string"
            }
          },
          "urls": {
            "title": "Toutiao article URLs (full text, comments, related)",
            "type": "array",
            "description": "Toutiao article/video/微头条 URLs for articleDetails, comments or related (toutiao.com/article/…, /group/…, /w/…, /video/…, m.toutiao.com/i…/), or author profile URLs (toutiao.com/c/user/<digits>/) for userProfile/userArticles. Invalid ones return an INVALID_URL error row (free). Example: [\"https://www.toutiao.com/article/7694967967913607743/\"].",
            "items": {
              "type": "string"
            }
          },
          "ids": {
            "title": "Toutiao article or comment IDs",
            "type": "array",
            "description": "Numeric ids: article ids (the id field of article rows) for articleDetails/comments/related, or comment ids (commentId of comment rows) for operation replies. Example: [\"7694967967913607743\"].",
            "items": {
              "type": "string"
            }
          },
          "users": {
            "title": "Toutiao user IDs or profile URLs (user articles, followers)",
            "type": "array",
            "description": "Toutiao author ids (authorId of any article row), https://www.toutiao.com/c/user/<digits>/ or /c/user/token/<token>/ profile URLs (resolved automatically), for userProfile (incl. follower count) or userArticles. Example: [\"1755235951852024\"].",
            "items": {
              "type": "string"
            }
          },
          "channels": {
            "title": "Toutiao channel feeds",
            "type": "array",
            "description": "Channel ids for operation feed (latest articles): news_hot=热点, news_tech=科技, news_finance=财经, news_world=国际, news_entertainment=娱乐, news_sports=体育, news_military=军事, __all__=推荐, news_game=游戏, news_health=健康, news_edu=教育, news_house=房产, news_history=历史, news_culture=文化, news_travel=旅游, news_food=美食, news_fashion=时尚, news_baby=育儿, news_regimen=养生, news_essay=美文, news_story=故事, news_agriculture=三农, news_astrology=星座, news_comic=动漫. Names like tech/科技 also work. Example: [\"news_tech\"].",
            "items": {
              "type": "string",
              "enum": [
                "news_hot",
                "news_tech",
                "news_finance",
                "news_world",
                "news_entertainment",
                "news_sports",
                "news_military",
                "__all__",
                "news_game",
                "news_health",
                "news_edu",
                "news_house",
                "news_history",
                "news_culture",
                "news_travel",
                "news_food",
                "news_fashion",
                "news_baby",
                "news_regimen",
                "news_essay",
                "news_story",
                "news_agriculture",
                "news_astrology",
                "news_comic"
              ],
              "enumTitles": [
                "Hot (热点)",
                "Tech (科技)",
                "Finance (财经)",
                "International (国际)",
                "Entertainment (娱乐)",
                "Sports (体育)",
                "Military (军事)",
                "Recommended (推荐)",
                "Games (游戏)",
                "Health (健康)",
                "Education (教育)",
                "Real estate (房产)",
                "History (历史)",
                "Culture (文化)",
                "Travel (旅游)",
                "Food (美食)",
                "Fashion (时尚)",
                "Parenting (育儿)",
                "Wellness (养生)",
                "Essays (美文)",
                "Stories (故事)",
                "Agriculture (三农)",
                "Astrology (星座)",
                "Anime & comics (动漫)"
              ]
            }
          },
          "maxItems": {
            "title": "Max billable rows (total)",
            "type": "integer",
            "description": "Maximum billable rows for the whole run (articles, topics, profiles, comments, replies all count). Default 20; keywordResearch default = keywords x maxArticles x (1 + maxCommentsPerArticle). Range 1-10000. Free rows (error, summary, plan, insights) never count."
          },
          "maxItemsPerInput": {
            "title": "Max rows per input",
            "type": "integer",
            "description": "Cap per keyword, channel, article (comments) or user. Default: maxItems split evenly between inputs. Max 1000."
          },
          "maxArticles": {
            "title": "Keyword research: articles per keyword",
            "type": "integer",
            "description": "keywordResearch: how many top articles per keyword (after filters and sortBy) are opened for full text and comments. Default 10, range 1-100 (larger values are capped)."
          },
          "maxCommentsPerArticle": {
            "title": "Keyword research: comments per article",
            "type": "integer",
            "description": "keywordResearch: comments returned per article (Toutiao hot order), billed per comment. Default 20, range 0-500; 0 = articles only. Replies: repliesPerComment. Articles with fewer comments return what exists."
          },
          "include": {
            "title": "Include: full text, images, video URLs, author, comments",
            "type": "array",
            "description": "Extra data per article row. fullText = open each article: full text, images, exact time, all counts (same price). images = all image URLs. video = MP4 URL (expires ~1 h). author = nested profile (free). comments = nested top comments (billed per comment). insights = free heuristic analysis row. metrics / trust = add engagement metrics / trust fields in lean mode. Example: [\"fullText\"].",
            "items": {
              "type": "string",
              "enum": [
                "fullText",
                "images",
                "author",
                "comments",
                "video",
                "insights",
                "metrics",
                "trust"
              ],
              "enumTitles": [
                "Full article text",
                "All image URLs",
                "Author profile (nested)",
                "Top comments (nested)",
                "Video stream URLs (MP4)",
                "Insights row (free)",
                "Lean: engagement metrics",
                "Lean: trust fields"
              ]
            }
          },
          "fields": {
            "title": "Return only these fields",
            "type": "array",
            "description": "Projection: keep only these output fields per data row (type is always kept). Empty = the default set of the outputMode. Names: id, url, title, abstract, text, source, authorName, authorId, publishedAt, readCount, likeCount, commentCount, shareCount, videoPlayCount, hotValue, searchQuery, commentId, replyCount, name, … (full list: operation capabilities). Example: [\"title\",\"url\",\"publishedAt\",\"readCount\"].",
            "items": {
              "type": "string"
            }
          },
          "outputMode": {
            "title": "Output mode",
            "enum": [
              "compact",
              "lean",
              "full"
            ],
            "type": "string",
            "description": "compact (default) = flat core fields, null when unknown. lean = token-efficient for LLM agents: only type, id and the most useful fields, no null/empty/false keys, operation/input/fetchedAt only once in the summary row, dates as 2026-10-10T10:02Z (UTC), text cut to maxTextChars (300). full = every field plus v0.x names (mode, query, groupId, scrapedAt).",
            "default": "compact"
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "relevance",
              "newest",
              "mostRead",
              "mostLiked",
              "mostCommented"
            ],
            "type": "string",
            "description": "Order within each input. relevance = Toutiao's order (default). newest = publish time. mostRead / mostLiked / mostCommented = by count. Non-default sorting scans up to 3x more candidates first.",
            "default": "relevance"
          },
          "dateFrom": {
            "title": "Published from",
            "type": "string",
            "description": "Keep only items published on/after this time. Formats: 2026-10-01 (Beijing time), ISO date-time, unix seconds, or relative 24h / 7d / 4w. Applied before billing. Example: \"7d\"."
          },
          "dateTo": {
            "title": "Published until",
            "type": "string",
            "description": "Keep only items published on/before this time. Same formats as dateFrom."
          },
          "minReads": {
            "title": "Min reads",
            "type": "integer",
            "description": "Keep only items with at least this many reads (readCount). Feed items without a read count need include [\"fullText\"]. Applied before billing."
          },
          "maxCostUsd": {
            "title": "Max cost (USD)",
            "type": "number",
            "description": "Stop before the run's charges would exceed this amount (e.g. 0.05). The run then ends SUCCEEDED with the rows so far and a COST_LIMIT note. Works together with Apify's max cost per run."
          },
          "dryRun": {
            "title": "Dry run (free plan)",
            "type": "boolean",
            "description": "true = fetch nothing and bill nothing: returns one free plan row per input (detected operation, queryUsed, estimated rows, cost and seconds) plus a summary. Use it to check an input before paying.",
            "default": false
          },
          "matchTerms": {
            "title": "Match terms (comments)",
            "type": "array",
            "description": "Keep only comments/replies whose text contains any of these words (case-insensitive); insights counts them per word. Applied after each page is fetched: lowers charges, not requests. Works for keywordResearch, comments, replies. Filter articles with textContains. Example: [\"电池\",\"续航\"].",
            "items": {
              "type": "string"
            }
          },
          "expandQuery": {
            "title": "Translate English keywords",
            "type": "boolean",
            "description": "Latin-script keywords are mapped to Chinese with a curated dictionary of ~950 brands, companies, people, products and news topics (BYD -> 比亚迪, Elon Musk -> 马斯克, Federal Reserve -> 美联储); unknown words stay as typed. Rows show queryUsed. false = search exactly as typed.",
            "default": true
          },
          "trackMetrics": {
            "title": "Snapshot mode: track metric changes",
            "type": "boolean",
            "description": "true = compare with the previous run that used the same deltaKey: rows get snapshotAt, previousSnapshotAt, isNewSinceLastSnapshot and deltas (readsDelta, likesDelta, commentsDelta, sharesDelta, engagementRateDelta; hot topics hotValueDelta, rankDelta). Compact metrics only, kept 30 days in your account.",
            "default": false
          },
          "deltaKey": {
            "title": "Snapshot key (trackMetrics)",
            "type": "string",
            "description": "Runs with the same deltaKey share one metrics snapshot (trackMetrics). One key per tracker, e.g. \"hot-board\" or \"byd-news\". Letters, digits, dashes. Default \"default\"."
          },
          "insights": {
            "title": "Insights row (free, heuristic)",
            "type": "boolean",
            "description": "true = add one free type=insights row: top terms, lexicon sentiment (labelled heuristic), engagement medians, top articles/comments, sources, commenter IP regions. Default: on for keywordResearch, off otherwise (false turns it off). No LLM."
          },
          "repliesPerComment": {
            "title": "Replies per comment",
            "type": "integer",
            "description": "Operations comments and keywordResearch: also return up to this many replies per comment as type=reply rows (billed as comment events). Default 0, max 100.",
            "default": 0
          },
          "minLikes": {
            "title": "Min likes",
            "type": "integer",
            "description": "Keep only items/comments with at least this many likes (likeCount). Applied before billing."
          },
          "minComments": {
            "title": "Min comments",
            "type": "integer",
            "description": "Keep only items with at least this many comments (commentCount; for comments: replyCount). Applied before billing."
          },
          "textContains": {
            "title": "Text contains (any)",
            "type": "array",
            "description": "Keep only rows whose title, abstract or text contains at least one of these words (case-insensitive), checked before billing. Works for search, feed, userArticles, related, comments (comment text) and hotBoard (title). Example: [\"比亚迪\",\"BYD\"].",
            "items": {
              "type": "string"
            }
          },
          "commentsPerItem": {
            "title": "Comments per article (include comments)",
            "type": "integer",
            "description": "With include [\"comments\"]: top comments nested in each article row. Default 5, max 100. Each comment is billed as a comment event.",
            "default": 5
          },
          "leanFormat": {
            "title": "Lean format",
            "enum": [
              "rows",
              "table"
            ],
            "type": "string",
            "description": "Only with outputMode lean. rows (default) = normal dataset rows. table = also write key-value record LEAN_TABLE: one tab-separated table per row type with the header once (fewest tokens), copied into the summary row when under 20 KB. Rows are still pushed and billed the same; the table is a free extra.",
            "default": "rows"
          },
          "maxTextChars": {
            "title": "Max text characters",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Cut text, abstract, description and comment text to this many characters (ends with …, row gets truncated: true). Default 300 in lean mode, no cut in compact/full. 0 = never cut; range 0–100000. Example: 1000."
          },
          "contentType": {
            "title": "Content type",
            "enum": [
              "any",
              "article",
              "video",
              "micro-post"
            ],
            "type": "string",
            "description": "List operations: keep only one kind. any (default), article, video, micro-post (微头条). Videos come from feed, userArticles and related; keyword search returns articles only.",
            "default": "any"
          },
          "profileTab": {
            "title": "Author tab (userArticles)",
            "enum": [
              "articles",
              "posts",
              "all"
            ],
            "type": "string",
            "description": "Which part of an author's page userArticles reads. articles (default) = 头条号 articles, newest first, reads as rounded numbers. posts = micro-posts (微头条) with exact time, reads, likes, comments. all = both merged.",
            "default": "articles"
          },
          "searchType": {
            "title": "Search tab",
            "enum": [
              "news",
              "all"
            ],
            "type": "string",
            "description": "search only. news (default) = News (资讯) tab, continuing in the All tab when it runs out. all = All (综合) tab only.",
            "default": "news"
          },
          "includePinned": {
            "title": "Include pinned hot-board item",
            "type": "boolean",
            "description": "hotBoard only: also return the pinned official item above the ranked list (rank 0).",
            "default": false
          },
          "includeHtml": {
            "title": "Include article HTML",
            "type": "boolean",
            "description": "articleDetails / include fullText: add raw article HTML as contentHtml.",
            "default": false
          },
          "dedupe": {
            "title": "De-duplicate",
            "type": "boolean",
            "description": "Drop rows already returned earlier in the run (same type + id), e.g. when two keywords find the same article.",
            "default": true
          },
          "onlyNew": {
            "title": "Only new rows (monitoring)",
            "type": "boolean",
            "description": "true = skip (and do not bill) rows already returned by earlier runs that used the same memoryName, e.g. a scheduled Hot Board or feed run every hour returns only new topics/articles. Seen ids are kept 30 days in named key-value store toutiao-seen-<memoryName> in your account.",
            "default": false
          },
          "memoryName": {
            "title": "Memory name (onlyNew)",
            "type": "string",
            "description": "Runs with the same memoryName share one memory of seen rows (onlyNew). Use one name per monitor, e.g. \"tech-feed\" or \"hot-board\". Letters, digits and dashes.",
            "default": "default"
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify Proxy (default, recommended): sessions rotate automatically on rate limits or search captchas.",
            "default": {
              "useApifyProxy": true
            }
          },
          "maxRequestRetries": {
            "title": "Max retries per request",
            "type": "integer",
            "description": "Retries with a fresh session/IP on rate limits, captchas or server errors (0-10).",
            "default": 4
          },
          "requestDelayMs": {
            "title": "Delay between requests (ms)",
            "type": "integer",
            "description": "Minimum delay between request starts to the same Toutiao host, to stay polite (0-10000). Default 100.",
            "default": 100
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}