Douyin API: video search, comments and video URL resolution

Based on the 2026-10-25 specification snapshot

Quick answer

The Douyin API offers three asynchronous task types (keyword video search, the comments of one video, and public account timelines) plus a synchronous POST /douyin/videos that resolves an already collected Douyin post to a download URL. That URL only redirects to Douyin's current public playback address; we do not host or store videos. Comment tasks collect 50 comments per video by default, adjustable with max_items or get_all. Data is collected by web crawlers from content publicly published on Douyin.

Data you get

Fields follow the 2026-10-25 specification snapshot. The snapshot does not enumerate search-result post fields, so rows marked "illustrative sample" are taken from the sample data below; confirm the production fields against your trial data. The snapshot also does not mark linking fields such as post_id and parent_id as required, so confirm their presence with trial data.

DataFieldsEndpoint
Keyword search video posts (illustrative sample) url, post_id, author, content, tm, date, metadata_tags, like_count, comment_count, share_count, video_length GET /douyin/search/task/{task_id}
Video comments id, post_id, author, author_id, content, push_type, sentiment, tm, tm_crawler, region GET /douyin/pushs/task/{task_id}
Public account timeline profile, timelines, task, error_message GET /douyin/users/task/{task_id}
Video download URL (redirect) post_id, download_url POST /douyin/videos

Endpoints

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

MethodPathWhat it doesMain parameters
POST /douyin/search/task Creates a video keyword search task with an optional date range and page limit. keyword* end_date max_pages start_date
GET /douyin/search/task/{task_id} Polls a video search task; once DONE it returns video posts and total_count, up to 100 per page. task_id* page pageSize
POST /douyin/pushs/task Creates a comment task from a video URL; 50 comments by default, adjustable with max_items or get_all. post_url* crawl_second_layer get_all max_items order_type
GET /douyin/pushs/task/{task_id} Returns the stored comments of the video, up to 1000 per page, sorted hot or by time. task_id* page pageSize order_type
POST /douyin/users/task Creates a public account timeline task for an account ID and date range, with optional max_items. author_id* endDate* startDate* max_items
GET /douyin/users/task/{task_id} Polls a timeline task; once DONE it returns the profile and the post timeline. task_id*
POST /douyin/videos Synchronously resolves a collected video post to a download URL; redirect only, no hosting. post_url*

How to get the data

  1. POST /douyin/search/task with keyword and optional start_date, end_date and max_pages to get a task id.
  2. Poll GET /douyin/search/task/{task_id}: keep waiting at INIT or RUNNING; at DONE the same response carries the video posts and total_count (pageSize up to 100); at FAILED, stop and handle the failure.
  3. Create a comment task with POST /douyin/pushs/task and the video URL. Without other settings it collects up to 50 comments; max_items sets a cap (0 or negative means no item cap), and get_all=true removes the default 50-comment limit.
  4. Read comments with GET /douyin/pushs/task/{task_id}. Once the task completes (including partial or timed-out tasks that have successful records) it returns the stored comments for the video (possibly including earlier crawls), read page by page with page and pageSize (up to 1000); order_type=hot or time sets the read order.
  5. When you need the video file, call POST /douyin/videos with a full douyin.com /video/{id} or /note/{id} URL to get post_id and download_url; the client receives the MP4 only after following the redirect.

curl examples

Create a keyword search task

curl -X POST https://api.infominer.io/api/v2/douyin/search/task \
  -H "auth-header: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"keyword": "亲子露营", "start_date": "2026-06-01", "end_date": "2026-06-30", "max_pages": 3}'

Poll the task by ID

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

Resolve a collected video to a download URL

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

Sample JSON

Illustrative data written by hand: accounts are sample_user_n and IDs are obviously fake. These are not real posts.

Task creation response (Illustrative data)

{
  "id": "00000000-0000-4000-8000-000000000001",
  "keyword": "亲子露营",
  "status": "INIT"
}

Poll response once the task is DONE (Illustrative data)

{
  "keyword": "亲子露营",
  "status": "DONE",
  "total_count": 2,
  "task": {
    "id": "00000000-0000-4000-8000-000000000001",
    "status": "DONE"
  },
  "data": [
    {
      "source": "douyin.search",
      "platform": "douyin",
      "url": "https://www.douyin.com/video/0000000000000001",
      "post_id": "0000000000000001",
      "content": "第一次带孩子露营,帐篷搭建与行李清单整理给大家 #亲子露营",
      "author": "sample_user_1",
      "tm": 1781056800,
      "date": "2026-06-10",
      "metadata_tags": [
        "亲子露营",
        "露营新手"
      ],
      "like_count": 230,
      "comment_count": 18,
      "share_count": 9,
      "video_length": 95
    },
    {
      "source": "douyin.search",
      "platform": "douyin",
      "url": "https://www.douyin.com/video/0000000000000002",
      "post_id": "0000000000000002",
      "content": "露营区的早餐怎么准备比较轻松,三个小技巧",
      "author": "sample_user_2",
      "tm": 1781060400,
      "date": "2026-06-10",
      "metadata_tags": [
        "露营",
        "早餐"
      ],
      "like_count": 77,
      "comment_count": 6,
      "share_count": 3,
      "video_length": 48
    }
  ]
}

How posts and comments link

Comment tasks are created from the video URL (post_url), and comment records link back to their video through the post_id field. order_type=hot sorts stored comments by like count, highest first, then by publication time, newest first. It is a read-time sort and does not guarantee that the collected comments are the most-liked on the platform. total_count can include comments from earlier crawls. Second-layer replies are not available: crawl_second_layer only accepts false.

History and limits

  • Comments default to 50 per video. An explicit max_items takes precedence, and get_all=true removes the item cap, but collection still stops at page safety limits and source availability; incomplete crawls are marked partial=true.
  • Public account timelines: max_items defaults to 50 with a ceiling of 1000; 0 means no item cap, bounded only by the crawl page ceiling. If the secondary timeline backend is temporarily unreachable, the task is still returned as completed with an error_message.
  • Video URL resolution accepts only full douyin.com /video/{id} and /note/{id} URLs; v.douyin.com short URLs are not supported. It works only for posts already collected, does not create a crawl task or trigger collection, and returns a download URL rather than an MP4 file.
  • The download URL answers with a 302 redirect to Douyin's current public HTTPS playback URL, which the client must follow. We only redirect: we do not host, proxy or store the video, and the redirect target is visible to the client. Availability is best effort: deletion, geographic or IP restrictions, and changes on Douyin's playback side can make a video unavailable.
  • How far back keyword search can go and refresh frequency are confirmed per project scope.
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.

Delivery format

Search, comment and timeline endpoints return JSON, with a DONE task carrying its data in the poll response; if the secondary timeline backend is temporarily unreachable, a timeline response explains it in error_message. Video resolution returns download_url in JSON; the video file itself is served by Douyin's playback URL. Batch files or other delivery methods are confirmed per project scope.

Request a trial

Tick Douyin in the form below 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.

We use the details you provide only to reply to this inquiry. See our privacy policy. Or email us at [email protected]

FAQ

Can the Douyin API download videos?
POST /douyin/videos resolves a collected post to a download URL; following the redirect gets Douyin's current playback file. We only redirect and do not host or store videos; deleted videos or geographic and IP restrictions can make a video unavailable.
Can I use v.douyin.com short URLs?
No. Video URL resolution accepts only full douyin.com /video/{id} or /note/{id} URLs.
How many comments per 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 second-layer replies available for Douyin comments?
Not at present: crawl_second_layer only accepts false.
How is the Douyin data collected?
By web crawlers, from content publicly published on Douyin. 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.