Douyin comments API

Based on the 2026-10-25 specification snapshot

Quick answer

POST /douyin/pushs/task with a video URL starts an asynchronous task that collects the video's comments: 50 by default, any cap you set with max_items (0 or negative means no item cap), or no default cap with get_all=true. Poll GET /douyin/pushs/task/{task_id}; once the task completes it returns the stored comments of the video, which can include earlier crawls, up to 1000 per page. order_type=hot or time on the poll sets the read order. Each comment links back to its video through post_id. Second-layer replies are not available. Data is collected by web crawlers from content publicly published on Douyin.

What teams use it for

  • Read how viewers responded to a product video, advert or creator collaboration.
  • Collect viewer questions and objections about a product category.
  • Compare comment sentiment across the top videos of a keyword search.

Endpoints

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

MethodPathWhat it does
POST /douyin/pushs/task Creates a comment task from a video URL; 50 comments by default, adjustable with max_items or get_all.
GET /douyin/pushs/task/{task_id} Returns the stored comments of the video, up to 1000 per page, sorted hot or by time.

Request parameters

POST /douyin/pushs/task

ParameterInTypeRequiredDefault / allowedDescription
post_url body string Yes Douyin video URL.
crawl_second_layer body boolean No false Only false is supported; second-layer replies are not available.
get_all body boolean No false Remove the default 50-comment cap. An explicit max_items takes precedence.
max_items body integer No 50 Maximum comments to collect; 0 or negative means no item cap.
order_type body string No default hot; allowed hot Only hot is accepted: stored comments are ranked by like count when you read them. It does not change what is collected.

GET /douyin/pushs/task/{task_id}

ParameterInTypeRequiredDefault / allowedDescription
task_id path string Yes Task ID returned when the task was created.
order_type query string No allowed hot | time Optional read-time sort: hot (like count, highest first) or time (newest first). Omit to keep the order saved at creation.
page query integer No 1 Page number, starting at 1.
pageSize query integer No 1000 Comments per page, max 1000.

Response fields

DataFieldsEndpoint
Comments id, post_id, author, author_id, content, push_type, sentiment, tm, tm_crawler, region GET /douyin/pushs/task/{task_id}

Code examples

curl: create the task

curl -X POST https://api.infominer.io/api/v2/douyin/pushs/task \
  -H "auth-header: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"post_url": "https://www.douyin.com/video/0000000000000001", "max_items": 500}'

curl: poll the task by ID

curl "https://api.infominer.io/api/v2/douyin/pushs/task/$TASK_ID?page=1&pageSize=1000&order_type=time" \
  -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}/douyin/pushs/task",
    headers=HEADERS,
    json={
        "post_url": "https://www.douyin.com/video/0000000000000001",
        "max_items": 500,
    },
    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}/douyin/pushs/task/{task['id']}",
        headers=HEADERS,
        params={
            "page": 1,
            "pageSize": 1000,
            "order_type": "time",
        },
        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")

if status == "FAILED":
    raise SystemExit("task failed")
if status != "DONE":
    print("task ended with status", status, "- results may be incomplete")

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

Sample response

Illustrative data written by hand: accounts are sample_user_n and IDs are obviously fake. Fields follow the 2026-10-25 specification snapshot; the sample shows a subset, and the full list is in the table above.

Poll response once the task is DONE (illustrative data)

{
  "task": {
    "id": "00000000-0000-4000-8000-000000000001",
    "status": "DONE"
  },
  "total_count": 2,
  "data": [
    {
      "id": "0000000000000101",
      "post_id": "0000000000000001",
      "author": "sample_user_3",
      "author_id": "0000000000000003",
      "tm": 1781065800,
      "tm_crawler": 1781150400,
      "content": "这个做法简单,明天就试",
      "sentiment": "Positive"
    },
    {
      "id": "0000000000000102",
      "post_id": "0000000000000001",
      "author": "sample_user_4",
      "author_id": "0000000000000004",
      "tm": 1781067600,
      "tm_crawler": 1781150400,
      "content": "视频里用的是什么锅?",
      "sentiment": "Neutral"
    }
  ]
}

Limits and notes

  • Comments default to 50 per video. An explicit max_items takes precedence, and get_all=true removes the default cap, but collection still stops at page safety limits and source availability; incomplete crawls are marked partial=true.
  • order_type=hot sorts stored comments by like count, highest first, at read time. It does not guarantee that the collected comments are the most-liked on the platform.
  • total_count can include comments from earlier crawls of the same video.
  • crawl_second_layer only accepts false: second-layer replies are not available.
  • Comments are read up to 1000 per page.
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 Douyin API pages

Request a trial

In the request form below, mention Douyin and tell us the keywords or accounts, how many comments you need per video, and whether you need video download URLs. We confirm the scope and reply with the arrangements for the trial and 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

How many comments per Douyin video can I collect?
50 by default. Set max_items for a different cap, or get_all=true to remove the default cap; page safety limits and source availability still apply.
Are replies to Douyin comments available?
Not at present: crawl_second_layer only accepts false.
Which URL format does post_url take?
The full video URL, for example https://www.douyin.com/video/{id}, as in the specification example. Video URL resolution (POST /douyin/videos) does not accept v.douyin.com short links.
How is the data collected? Is this the official Douyin API?
By web crawlers, from content publicly published on Douyin. LargitData is not affiliated with Douyin and this is not Douyin'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.