How to get all comments on a Douyin video
Pass the video's aweme_id and page through comments 20 at a time with data.next. Ten pages are 10 calls and $0.02, with no Douyin login, cookie or a_bogus signature on your side.
Updated 2026-11-22·This page as Markdown
Page through the comments
The id is the aweme_id: the long number after /video/ in a douyin.com link. A v.douyin.com short link has to be opened once to see it, or use douyin.videos.id_from_url. The loop adds data.next until it is null.
Douyin comments API·GET /v1/douyin/comments/list·$0.002 a call
curl "https://xtikapi.com/v1/douyin/comments/list?id=7553178216526073134" \
-H "Authorization: Bearer YOUR_API_KEY"import requests
URL = "https://xtikapi.com/v1/douyin/comments/list"
HEADERS = {"Authorization": "Bearer YOUR_API_KEY"}
params = {"id": "7553178216526073134"}
items = []
for _ in range(10): # one call per page
for attempt in range(3): # 5xx errors are not charged: retry
response = requests.get(URL, params=params, headers=HEADERS, timeout=60)
if response.status_code < 500:
break
response.raise_for_status()
data = response.json()["data"]
items += data["items"]
if not data.get("next"): # null on the last page
break
params.update(data["next"])
print(len(items), "items")const URL = "https://xtikapi.com/v1/douyin/comments/list";
const HEADERS = { Authorization: "Bearer YOUR_API_KEY" };
let params = {"id":"7553178216526073134"};
const items = [];
for (let page = 0; page < 10; page++) {
let response;
for (let attempt = 0; attempt < 3; attempt++) {
// 5xx errors are not charged: retry
response = await fetch(`${URL}?${new URLSearchParams(params)}`, { headers: HEADERS });
if (response.status < 500) break;
}
if (!response.ok) throw new Error(`HTTP ${response.status}`);
const { data } = await response.json();
items.push(...data.items);
if (!data.next) break; // null on the last page
params = { ...params, ...data.next };
}
console.log(items.length, "items");Recorded response (lists keep the first two items)
{
"data": {
"items": [
{
"id": "0619016826427378324",
"text": "Example text",
"author": {
"id": "xx1xxxxxxxxxxxxxxxxxxxx4xx9xxxx8xxxxxxx_xxxxxxxxxx5xxx1",
"username": "example_user",
"name": "Example name",
"avatar": "https://example.com/image.jpg"
},
"createdAt": "2026-05-31T05:59:43.000Z",
"likeCount": 131,
"replyCount": 7
},
{
"id": "0527354275490991931",
"text": "Example text",
"author": {
"id": "xx1xxxxxxxxxxxx_5xxxxxxx7xxxxx3xxxxx0xxxxxx2622xxxxxxxx",
"username": "example_user",
"name": "Example name",
"avatar": "https://example.com/image.jpg"
},
"createdAt": "2025-09-23T13:40:33.000Z",
"likeCount": 1,
"replyCount": 6
}
],
"has_more": true,
"next": {
"cursor": 20
}
},
"meta": {
"request_id": "example",
"endpoint": "douyin.comments.list",
"normalized": true,
"unavailable": [],
"billing": {
"charged": true,
"amount": 0.002,
"balance": 4.98
}
}
}What the example costs
Failed calls and timeouts are not charged. A new account with a verified email gets $0.50 of trial balance, enough to run this example.
Good to know
- A page held 20 comments in our test on 2026-11-22.
- Pages overlap: in our test 12 of the 20 comments on page two had already appeared on page one, because Douyin ranks comments by heat and the order shifts between calls. Dedupe by
id. - Replies are separate:
douyin.comment_replies.listwith the videoidand the comment'sidascomment_id. - Douyin does not publish play counts, so
viewCountis listed inmeta.unavailableon video calls.
Endpoints
- Douyin comments API · $0.002 a call
More about Douyin
- How to list every video from a Douyin account
- Douyin scraper keeps getting CODE 429: what actually works?
- MediaCrawler errors (Verifytype, Douyin page 1 empty, XHS 406, Kuaishou) & hosted alternatives?
- How often should a Douyin scraper change its cookie, and how fast can it request?
- How do I get replies to Douyin comments (second-level comments)?
- How do I export Douyin video comments to Excel?
- How do I get the video ID from a Douyin share link?
Questions
How much does this cost with XTikAPI?
The example here is 10 calls, $0.02 in total. Failed calls and timeouts are free, and a new account with a verified email gets $0.50 of trial balance.
Why do I see the same comment twice?
Douyin re-ranks comments by heat between calls, so a comment can move from page one to page two. Keep a set of comment IDs and skip the ones you already have.