# 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

## 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](https://xtikapi.com/apis/douyin/comments/list): `GET /v1/douyin/comments/list`, $0.002 a call

```bash
curl "https://xtikapi.com/v1/douyin/comments/list?id=7553178216526073134" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

```python
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")
```

```javascript
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):

```json
{
  "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

| Step | Calls | Price | Subtotal |
| --- | --- | --- | --- |
| Comments, 10 pages of about 20 | 10 | $0.002 | $0.02 |
| Total | 10 | | $0.02 |

## 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.list` with the video `id` and the comment's `id` as `comment_id`.
- Douyin does not publish play counts, so `viewCount` is listed in `meta.unavailable` on video calls.

## Endpoints

- [Douyin comments API](https://xtikapi.com/apis/douyin/comments/list): $0.002 a call

## More about Douyin

- [How to list every video from a Douyin account](https://xtikapi.com/guides/douyin-user-videos)
- [Douyin scraper keeps getting CODE 429: what actually works?](https://xtikapi.com/answers/douyin-crawler-code-429)
- [MediaCrawler errors (Verifytype, Douyin page 1 empty, XHS 406, Kuaishou) & hosted alternatives?](https://xtikapi.com/answers/mediacrawler-errors-and-alternatives)
- [How often should a Douyin scraper change its cookie, and how fast can it request?](https://xtikapi.com/answers/douyin-cookie-rotation-frequency)
- [How do I get replies to Douyin comments (second-level comments)?](https://xtikapi.com/answers/douyin-comment-replies-api)
- [How do I export Douyin video comments to Excel?](https://xtikapi.com/answers/douyin-comments-export-excel)
- [How do I get the video ID from a Douyin share link?](https://xtikapi.com/answers/douyin-share-link-to-video-id)

## 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.

---

XTikAPI: one API key for public social media data, prepaid per call. [HTML version](https://xtikapi.com/guides/douyin-video-comments) · [llms.txt](https://xtikapi.com/llms.txt) · [OpenAPI](https://xtikapi.com/openapi.json)
