Baidu Tieba replies API

Based on the 2026-11-21 specification

Quick answer

POST /tieba/pushs/task with a thread URL (/p/{thread id} on tieba.baidu.com or m.tieba.baidu.com) collects every floor of the thread from the second floor on, and with crawl_second_layer (default true) the in-floor replies under each floor. max_pages limits the pages of floors (0 to 500; 0 or omitted means 100, 30 floors per page). Poll GET /tieba/pushs/task/{task_id}; once DONE it returns task, total_count and data, up to 1000 records per page. Each record has post_id (the thread's document ID), push_type (comment for a floor, reply for an in-floor reply), the replier, text, time, a sentiment label and, for floors, the IP location. Data is collected by web crawlers from content publicly published on Baidu Tieba.

What teams use it for

  • Read the whole discussion in a busy Tieba thread about a product or event.
  • Measure how the tone of replies changes from the early floors to the later ones.
  • Combine with thread search to follow the threads that draw the most replies.

Endpoints

Base URL: https://api.infominer.io/api/v2. Send your API key in the auth-header request header.

MethodPathWhat it does
POST /tieba/pushs/task Create a reply task from a thread URL: floors from the second on, optionally with in-floor replies.
GET /tieba/pushs/task/{task_id} Poll the reply task; once DONE it returns the floors and replies, up to 1000 per page.

Request parameters

POST /tieba/pushs/task

ParameterInTypeRequiredDefault / allowedDescription
post_url body string Yes Tieba thread URL, https://tieba.baidu.com/p/{thread id} (m.tieba.baidu.com is also accepted).
crawl_second_layer body boolean No true Also collect the in-floor replies under each floor.
max_pages body integer No 100 (max 500) Maximum pages of floors, 30 floors per page; 0 or omitted uses the default.
rerun body boolean No Accepted for consistency with other platforms; every POST creates a new task.

GET /tieba/pushs/task/{task_id}

ParameterInTypeRequiredDefault / allowedDescription
task_id path string Yes Task ID returned when the task was created.
page query integer No 1 Page number, starting at 1.
pageSize query integer No 1000 Floors and replies per page, max 1000.

Response fields

DataFieldsEndpoint
Floors and in-floor replies (data) id, post_id, author_id, author, push_type, region, content, tm, tm_crawler, sentiment GET /tieba/pushs/task/{task_id}
Task (task) task: id, post_url, status, crawl_second_layer, created_at, total, completed, pages_crawled, reported_total, partial, timed_out, failed_pages, failed_batches, tid, title, forum GET /tieba/pushs/task/{task_id}

Code examples

curl: create the task

curl -X POST https://api.infominer.io/api/v2/tieba/pushs/task \
  -H "auth-header: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"post_url": "https://tieba.baidu.com/p/10000000001", "crawl_second_layer": true, "max_pages": 2}'

curl: poll the task by ID

curl "https://api.infominer.io/api/v2/tieba/pushs/task/$TASK_ID?page=1&pageSize=1000" \
  -H "auth-header: YOUR_API_KEY"

Python (requests): create, poll, read

import time
import requests

BASE_URL = "https://api.infominer.io/api/v2"
HEADERS = {"auth-header": "YOUR_API_KEY"}

# 1. Create the task
resp = requests.post(
    f"{BASE_URL}/tieba/pushs/task",
    headers=HEADERS,
    json={
        "post_url": "https://tieba.baidu.com/p/10000000001",
        "crawl_second_layer": True,
        "max_pages": 2,
    },
    timeout=30,
)
resp.raise_for_status()
task = resp.json()

# 2. Poll until the task leaves INIT / RUNNING
for _ in range(120):
    resp = requests.get(
        f"{BASE_URL}/tieba/pushs/task/{task['id']}",
        headers=HEADERS,
        params={
            "page": 1,
            "pageSize": 1000,
        },
        timeout=30,
    )
    resp.raise_for_status()
    result = resp.json()
    status = result.get("status") or result.get("task", {}).get("status")
    if status not in ("INIT", "RUNNING"):
        break
    time.sleep(15)
else:
    raise SystemExit("task still running; poll it again later")

task = result.get("task", result)
if status != "DONE" or task.get("partial") or task.get("timed_out"):
    raise SystemExit(f"task ended with status {status}; no complete result")

# 3. Read the records (use page / pageSize to fetch further pages)
for row in result.get("data", []):
    print(row.get("push_type"), row.get("author"), (row.get("content") or "")[:60])

Sample response

Illustrative data written by hand: accounts are sample_user_n and IDs are obviously fake. Fields follow the 2026-11-21 specification; the sample shows a subset of the fields.

Poll response once the task is DONE (illustrative data)

{
  "task": {
    "id": "00000000-0000-4000-8000-000000000001",
    "post_url": "https://tieba.baidu.com/p/10000000001",
    "status": "DONE",
    "crawl_second_layer": true,
    "created_at": 1780880400,
    "total": 3,
    "completed": 3,
    "pages_crawled": 1,
    "reported_total": 3,
    "timed_out": false,
    "partial": false,
    "failed_pages": 0,
    "failed_batches": 0,
    "tid": "10000000001",
    "title": "入门公路车预算五千,大家帮忙看看这两款",
    "forum": "骑行"
  },
  "total_count": 3,
  "data": [
    {
      "id": "00000000-0000-4000-8000-000000000003",
      "post_id": "00000000-0000-4000-8000-000000000001",
      "author_id": "0000000003",
      "author": "sample_user_3",
      "tm": 1780745400,
      "tm_crawler": 1780880403,
      "push_type": "comment",
      "region": "广东",
      "content": "通勤为主的话选第二款,变速更好调",
      "sentiment": "Positive"
    },
    {
      "id": "00000000-0000-4000-8000-000000000004",
      "post_id": "00000000-0000-4000-8000-000000000001",
      "author_id": "0000000004",
      "author": "sample_user_4",
      "tm": 1780743600,
      "tm_crawler": 1780880406,
      "push_type": "reply",
      "region": "",
      "content": "同意,我骑了一年没出过问题",
      "sentiment": "Positive"
    },
    {
      "id": "00000000-0000-4000-8000-000000000005",
      "post_id": "00000000-0000-4000-8000-000000000001",
      "author_id": "0000000005",
      "author": "sample_user_5",
      "tm": 1780741800,
      "tm_crawler": 1780880409,
      "push_type": "comment",
      "region": "湖北",
      "content": "先去店里试骑再决定吧",
      "sentiment": "Neutral"
    }
  ],
  "page": 1,
  "pageSize": 1000
}

Limits and notes

  • The first floor (the thread itself) is not in data; its full text is the content returned by thread search.
  • In-floor replies are capped at 600 per floor (20 pages of 30).
  • region (IP location) is always empty for in-floor replies; floors carry it.
  • A thread with thousands of floors can take several minutes or more; set max_pages for large threads.
  • Only a DONE poll carries data; PARTIAL, TIMED_OUT and FAILED return the task object alone. Treat a task as fully successful when status is DONE and partial and timed_out are both false.
  • data holds every collected reply of the thread, including earlier tasks' replies, so total_count can differ from task.completed. Counts are as of collection.
Collection: web crawlers collect content publicly published on each platform. Whether this suits your use depends on the purpose and jurisdiction and is for the buyer's legal team to assess; we can provide a description of sources and collection methods.

More Baidu Tieba API pages

Request a trial

In the form below, mention Baidu Tieba and tell us the keywords, forums or threads you want to follow, whether you need floors and in-floor replies, and the expected volume. We will confirm the scope and arrange a trial and an API key.

Fill in the form to request a trial. We confirm the scope and reply with trial and integration arrangements.

Fill in the request form

FAQ

Why is the first floor missing?
The first floor is the thread itself; its text is the content of the thread returned by the search task. The reply task returns the floors from the second on and their in-floor replies.
How many in-floor replies are collected per floor?
At most 600 per floor, in 20 pages of 30.
What does reported_total tell me?
The reply count Tieba shows for the thread. Compare it with task.completed to see how much was collected.
How is the data collected? Is this the official Baidu Tieba API?
By web crawlers, from content publicly published on Baidu Tieba. LargitData is not affiliated with Baidu Tieba and this is not Baidu Tieba's own API. Whether this suits your use depends on the purpose and jurisdiction and is for your legal team to assess; we can provide a description of sources and collection methods.