How to list every video from a Douyin account
Pass the account's sec_uid and page with data.next, about 20 videos a page. Five pages are 5 calls and $0.01, newest first, with likes, comments and shares for each video.
Updated 2026-11-22·This page as Markdown
List the videos
id is the sec_uid: the string starting with MS4wLjABAAAA after /user/ in a douyin.com profile link. From a share link, get it with douyin.accounts.id_from_url. The next page's cursor is a timestamp in data.next.
Douyin video list API·GET /v1/douyin/videos/list·$0.002 a call
curl "https://xtikapi.com/v1/douyin/videos/list?id=MS4wLjABAAAAz1lOStxwzCZF5cJ3h8Sa2FPQ_8_l_vQdpdKEm1oEF_k" \
-H "Authorization: Bearer YOUR_API_KEY"import requests
URL = "https://xtikapi.com/v1/douyin/videos/list"
HEADERS = {"Authorization": "Bearer YOUR_API_KEY"}
params = {"id": "MS4wLjABAAAAz1lOStxwzCZF5cJ3h8Sa2FPQ_8_l_vQdpdKEm1oEF_k"}
items = []
for _ in range(5): # 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/videos/list";
const HEADERS = { Authorization: "Bearer YOUR_API_KEY" };
let params = {"id":"MS4wLjABAAAAz1lOStxwzCZF5cJ3h8Sa2FPQ_8_l_vQdpdKEm1oEF_k"};
const items = [];
for (let page = 0; page < 5; 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": "0604894503360517458",
"url": "https://example.com/link",
"text": "Example text",
"author": {
"id": "xx1xxxxxxxxxx5xxxxxxxxxx6xx5x4xx9xxx_0_x_xxxxxxxx7xxx_x",
"username": "example_user",
"name": "Example name",
"avatar": "https://example.com/image.jpg",
"description": "Example text"
},
"createdAt": "2026-04-21T10:00:00.000Z",
"likeCount": 516408,
"commentCount": 13743,
"shareCount": 349221,
"cover": "https://example.com/image.jpg"
},
{
"id": "0686305644401440046",
"url": "https://example.com/link",
"text": "Example text",
"author": {
"id": "xx1xxxxxxxxxx5xxxxxxxxxx6xx5x4xx9xxx_0_x_xxxxxxxx7xxx_x",
"username": "example_user",
"name": "Example name",
"avatar": "https://example.com/image.jpg",
"description": "Example text"
},
"createdAt": "2026-03-01T10:00:02.000Z",
"likeCount": 246763,
"commentCount": 6947,
"shareCount": 126169,
"cover": "https://example.com/image.jpg"
}
],
"has_more": true,
"next": {
"cursor": 1791280800000
}
},
"meta": {
"request_id": "example",
"endpoint": "douyin.videos.list",
"normalized": true,
"unavailable": [
"viewCount"
],
"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
- In our test on 2026-11-22 the first page held 23 videos and the second 20, with no overlap.
- Douyin does not publish play counts, so
viewCountis listed inmeta.unavailable. - Each video's
idis the aweme_id thatdouyin.comments.listtakes.
Endpoints
- Douyin video list API · $0.002 a call
More about Douyin
- How to get all comments on a Douyin video
- Douyin scraper keeps getting CODE 429: what actually works?
- What does "failed to get user data, get a new ttwid from the web" mean for Douyin?
- f2 Douyin download fails with Client error '403 Forbidden': how to fix it?
- How often should a Douyin scraper change its cookie, and how fast can it request?
- Douyin_TikTok_Download_API works locally but returns no video after Docker deploy: why?
- Douyin user homepage videos API (fetch_user_post_videos) returns 400: why?
Questions
How much does this cost with XTikAPI?
The example here is 5 calls, $0.01 in total. Failed calls and timeouts are free, and a new account with a verified email gets $0.50 of trial balance.
Can I use the numeric Douyin ID instead of sec_uid?
The list call takes sec_uid. Convert a numeric uid with douyin.accounts.uid_to_sec_uid, or a profile link with douyin.accounts.id_from_url.