{
  "openapi": "3.0.1",
  "info": {
    "title": "Toutiao Scraper: News, 微头条 Posts, Comments & Hot Board",
    "description": "Scrape Toutiao (今日头条) without login: keyword search of news and 微头条 posts with date ranges, full article text, reads, likes, comments and shares, comment threads and the hot board (热榜). Articles $2 per 1,000, posts $4 per 1,000.",
    "version": "0.1",
    "x-build-id": "OwB53Uii729DZEK2g"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/smoldesk~toutiao-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-smoldesk-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/smoldesk~toutiao-scraper/runs": {
      "post": {
        "operationId": "runs-sync-smoldesk-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/smoldesk~toutiao-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-smoldesk-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": {
          "searchQueries": {
            "title": "Search keywords",
            "type": "array",
            "description": "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.",
            "items": {
              "type": "string"
            }
          },
          "searchType": {
            "title": "Search in",
            "enum": [
              "news",
              "posts",
              "both"
            ],
            "type": "string",
            "description": "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.",
            "default": "news"
          },
          "maxResultsPerSearch": {
            "title": "Max results per search",
            "minimum": 1,
            "maximum": 120,
            "type": "integer",
            "description": "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.",
            "default": 20
          },
          "postedAfter": {
            "title": "Posted after",
            "type": "string",
            "description": "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": {
            "title": "Posted before",
            "type": "string",
            "description": "Only results up to this date, for example 2026-10-31."
          },
          "trending": {
            "title": "Hot board (热榜)",
            "type": "boolean",
            "description": "Add what is trending on Toutiao right now: up to 50 hot topics with rank, heat score, label, image and link.",
            "default": false
          },
          "maxTrending": {
            "title": "Max hot topics",
            "minimum": 1,
            "maximum": 60,
            "type": "integer",
            "description": "How many hot-board topics to save.",
            "default": 50
          },
          "includePinned": {
            "title": "Include pinned topics",
            "type": "boolean",
            "description": "Also save the topics Toutiao pins above the ranking (usually official news). They get rank 0.",
            "default": false
          },
          "includeFullText": {
            "title": "Full article text (add-on)",
            "type": "boolean",
            "description": "Get the complete article body as plain text and Markdown (with headings and image links), the character count, the original-content flag and the author's follower count, for search results and article links. $2 per 1,000 articles, charged only when the text was found. Videos have no body; 微头条 posts already come in full.",
            "default": false
          },
          "articleUrls": {
            "title": "Article, video or post URLs",
            "type": "array",
            "description": "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. Choose below whether to save each link's details and full text, its comments, or both.",
            "items": {
              "type": "string"
            }
          },
          "articleDetails": {
            "title": "Save article details for these links",
            "type": "boolean",
            "description": "One row per article or video link: title, author and followers, likes, comments, shares, publish time and label (charged like a search result). Turn on full text below to also get the article body.",
            "default": false
          },
          "articleComments": {
            "title": "Save comments for these links",
            "type": "boolean",
            "description": "Comments and replies under each link (charged per comment). Uses the comment settings below.",
            "default": true
          },
          "includeComments": {
            "title": "Include comments for search results",
            "type": "boolean",
            "description": "Also save comments for every search result that has any (extra charge per comment).",
            "default": false
          },
          "maxCommentsPerArticle": {
            "title": "Max comments per article or post",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Top-level comments to save per article, video or post, hottest first.",
            "default": 20
          },
          "maxRepliesPerComment": {
            "title": "Max replies per comment",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "Replies to save under each comment. 0 = comments only.",
            "default": 0
          },
          "onlyNewResults": {
            "title": "Only new results (monitor mode)",
            "type": "boolean",
            "description": "Remember results from earlier runs and skip them, so a scheduled run returns and charges only new articles or posts per keyword.",
            "default": false
          },
          "maxConcurrency": {
            "title": "Parallel requests",
            "minimum": 1,
            "maximum": 6,
            "type": "integer",
            "description": "Requests in flight at once. Lower it if the log reports bot checks.",
            "default": 3
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Optional. Toutiao works from Apify servers without a proxy. Residential proxies are not needed."
          },
          "compact": {
            "title": "Compact output (for AI agents)",
            "type": "boolean",
            "description": "Return smaller rows: only the main fields from the dataset views, without image links or empty values. Good for AI agents, MCP tools and LLM pipelines with limited context.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}