Douyin Posts by user API
API health
- 24h health
- 100%
- 24h average time
- 21.71 s
- Healthy / normal
- Available
- Limited
- Mostly down
Last 24 hours
Last 30 days
Track the videos a Douyin account publishes, newest first. Each video has caption, hashtags, length, engagement counts and publish time. Start paging with an empty page_token. Pass back each next_page_token within 24 hours. since sets an earliest publish date.
Send POST https://api.everyinfra.com/api/v1/social with platform set to douyin and action set to user_posts. Price $0.56 per 1,000 requests ($0.000556 per call). Failed calls and empty results are not charged. Synchronous. For slow jobs add "mode": "async" to the body, take the job_id and poll.
Douyin Posts by user lists the videos one account has published, given its user_id. Each row carries the caption, hashtags, length, engagement counts and publish time. Use it to see what an account has been posting and which videos perform, when you evaluate creators, watch competitor accounts or study a posting pattern.
user_id is the account's secUid, which usually starts with MS4w; take it from author_id in search results or from the profile link. Nicknames and short numeric Douyin IDs do not work. A call without page_token returns the latest batch and accepts since; to walk the whole video list, start with an empty page_token and pass each next_page_token back. Ignore view_count when comparing videos, since Douyin does not publish play counts.
AI prompt
#Please help me write a data collection script with the EveryInfra Douyin Posts by user endpoint (douyin/user_posts).
How the endpoint works:
- Request: POST https://api.everyinfra.com/api/v1/social with the header Authorization: Bearer <API key>. Read the key from the EVERYINFRA_API_KEY environment variable and never hard-code it.
- In the request body, set platform to douyin and action to user_posts, and put the parameters inside params.
- Required parameters:
- user_id: The Douyin user's secUid string (typically starting with MS4w), not a nickname or short numerical Douyin ID. Used to identify accounts for profile and user_posts actions.
- Optional parameters:
- page_token: Page token for user_posts: send an empty string page_token="" to start from the newest page, then pass back each response's next_page_token exactly as received, keeping the other parameters unchanged.
- since: Sets a lower bound for video publish dates in profile and user_posts actions using the YYYY-MM-DD format. Filters videos retrieved for the request rather than account creation date.
- limit: The most rows to return in this call, an integer from 1 to 100. The default applies when you leave it out, and a call can return fewer rows. Larger values return 422 before any charge. (default: 20)
- Returns a list of records. Main fields of each record: next_page_token (Page token (search / user_posts / comme…), id, url, text, media_type (Media type: video, or image for image p…), video_url (Video playback URL (signed, expires), like_count, comment_count, share_count, collect_count, view_count (This is not a real play count), author_name; 54 fields in total, full list at https://api.everyinfra.com/api/v1/social/catalog?platform=douyin.
- Example request body:
{
"platform": "douyin",
"action": "user_posts",
"params": {
"user_id": "https://www.douyin.com/user/MS4wLjABAAAAk1tZ-L085zZf2yW_H5dnVFZWyk8Rt8v4RAvf9KhTyPoVdMDxTs7Q_rvgTJGWXezS"
}
}
- Price: $0.56 per 1,000 requests; failed and empty results are not charged.
- For dozens or hundreds of targets, add "mode": "async" to the body: you get a job_id at once and poll GET https://api.everyinfra.com/api/v1/jobs/{job_id} for the result.
- On 422, fix the request using the suggested parameter names and allowed values in the error; on 429 or 503, wait for Retry-After and try again.
Before writing code, ask me which targets I need, how many, which fields, and what output format I want; then confirm the plan and the rough cost with me.Request parameters
#| Name | In | Type | Required | Default | Description |
|---|---|---|---|---|---|
Authorization | header | string | Yes | - | Bearer followed by your API key. Create it in the console; never put it in a URL or a code repository. |
platform | body | string | Yes | douyin | Platform identifier, fixed value. |
action | body | string | Yes | user_posts | Capability identifier, fixed value. |
user_id | body.params | string | Yes | - | The Douyin user's secUid string (typically starting with MS4w), not a nickname or short numerical Douyin ID. Used to identify accounts for profile and user_posts actions; can be obtained from an author_id field in search results or a user profile URL. |
page_token | body.params | string | No | - | Page token for user_posts: send an empty string page_token="" to start from the newest page, then pass back each response's next_page_token exactly as received, keeping the other parameters unchanged. Tokens last 24 hours and only work for the same account and parameters; the last page has no next_page_token. Pages hold up to 100 rows, newest first, and skip the since lower bound; filter by posted_at on your side if you need a date window. Each page is one call. |
since | body.params | date | No | - | Sets a lower bound for video publish dates in profile and user_posts actions using the YYYY-MM-DD format. Filters videos retrieved for the request rather than account creation date. Omitting this parameter removes the date filter. |
limit | body.params | integer (1–100) | No | 20 | The most rows to return in this call, an integer from 1 to 100. The default applies when you leave it out, and a call can return fewer rows. Larger values return 422 before any charge. |
Code samples
#curl -X POST 'https://api.everyinfra.com/api/v1/social' \
-H "Authorization: Bearer $EVERYINFRA_API_KEY" \
-H 'Content-Type: application/json' \
--data-raw '{
"platform": "douyin",
"action": "user_posts",
"params": {
"user_id": "https://www.douyin.com/user/MS4wLjABAAAAk1tZ-L085zZf2yW_H5dnVFZWyk8Rt8v4RAvf9KhTyPoVdMDxTs7Q_rvgTJGWXezS"
}
}'OpenAPI definition (JSON)Samples read the key from the EVERYINFRA_API_KEY environment variable; copied code never contains your key.
Response example
#{ "id": "req_…", "platform": "douyin", "action": "user_posts", "results": [ { "id": "•••", "url": "https://www.douyin.com/video/7534316807973260587", "text": "10个实用技巧,告别说英语时忘词! #英语学习视频 #英语学习分享 #英语听力磨耳朵 #零基础学英语口语", "media_type": "video", "like_count": 7310, "comment_count": 80, "share_count": 1378, "collect_count": 6115, "view_count": 0, "author_name": "•••", "author_id": "MS4wLjABAAAAk1tZ-L085zZf2yW_H5dnVFZWyk8Rt8v4RAvf9KhTyPoVdMDxTs7Q_rvgTJGWXezS", "author_douyin_id": "•••", "author_follower_count": 48341, "region": "河北", "posted_at": "2025-08-04T00:10:00+00:00", "platform": "douyin", "duration_sec": 244, "hashtags": [ "英语学习视频", "英语学习分享", "英语听力磨耳朵" ] }, { "id": "•••", "url": "https://www.douyin.com/video/7524662531407793447", "text": "英语磨耳朵:春节中国最重要的传统节日 #英语学习视频 #英语听力训练 #四六级翻译 #英语短文", "media_type": "video", "like_count": 602, "comment_count": 19, "share_count": 206, "collect_count": 474, "view_count": 0, "author_name": "•••", "author_id": "MS4wLjABAAAAk1tZ-L085zZf2yW_H5dnVFZWyk8Rt8v4RAvf9KhTyPoVdMDxTs7Q_rvgTJGWXezS", "author_douyin_id": "•••", "author_follower_count": 48341, "region": "河北", "posted_at": "2025-07-09T00:12:00+00:00", "platform": "douyin", "duration_sec": 40, "hashtags": [ "英语学习视频", "英语听力训练", "四六级翻译" ] } ], "next_page_token": …, "pagination": { … }, "count": 20, "billing": { "charged": …, "charged_usd": …, "balance_after_usd": …, … }, "quota": { … }}
Response fields
#Business data is in results. The table lists the fields a record can contain; values the platform does not show are never made up.
| Field | Meaning |
|---|---|
next_page_token | Page token (search / user_posts / comments / comment_replies / billboard_video_hot / billboard_low_fan_explosion / billboard_high_completion / billboard_account_search / music_search): pass it back unchanged as page_token to fetch the next page, keeping the other parameters the same; valid for 24 hours. Every row of a page carries the same value, which also appears at the top level of the response. Absent on the last page. Comment pages walk all top-level comments page by page. |
id | The record's unique ID on the platform. Unique only within one platform; IDs can repeat across platforms. |
url | Link to the record on the platform. |
text | Body text with HTML removed, returned in full and never cut short (on a few platforms the list results themselves carry only an excerpt; the platform's field notes say so). |
media_type | Media type: video, or image for image posts. |
video_url | Video playback URL (signed, expires; download promptly if you need to keep it). Null for image posts or when the source omits it. |
like_count | Likes. null means the platform or this capability does not disclose it; it is not 0. |
comment_count | Comments. null means not disclosed, not 0. |
share_count | Shares. null means not disclosed, not 0. |
collect_count | Saves or favorites. null means not disclosed, not 0. |
view_count | This is not a real play count. Douyin does not publish video play counts; most results omit this field and some show 0, and neither reflects real plays. Judge reach by like_count, comment_count, share_count and collect_count. |
author_name | Author's display name. |
author_id | Author's unique ID on the platform. |
author_douyin_id | The author's Douyin ID. |
author_uid | Numeric user ID of the author (on comments, of the commenter). author_id is the secUid; both identify the same person. |
author_bio | The author's profile bio (search / user_posts / video rows). |
author_avatar_url | Author avatar image URL: the creator on search, user_posts and video rows, the commenter on comments rows. |
author_follower_count | Author's follower count. null means not disclosed. |
cover_image_url | Video or image-post cover thumbnail URL (search / user_posts rows). |
video_width | Video frame width in pixels. |
video_height | Video frame height in pixels. |
duration_seconds | Duration in seconds. null for content that is not video or audio. |
region | Region. |
hashtags | Hashtags in the text, in order of appearance; absent when there are none. |
posted_at | Publish time in ISO 8601, UTC (for example 2026-08-07T12:34:56+00:00). Non-standard strings from the platform are passed through as is, so parse defensively. null means the platform does not disclose it. |
platform | Source platform identifier, the same as platform in the request (for example xiaohongshu, tiktok). |
image_urls | Array of image links in the platform's display order; absent when there are no images. |
duration_sec | Video length in seconds. |
hashtag_ids | Keeps the platform's own meaning |
search_rank | Keeps the platform's own meaning |
author_is_verified | Whether the author is verified (search / user_posts / video rows). |
author_following_count | How many accounts the author follows (search / user_posts / video rows). |
author_like_count | Total likes the author's profile has received (search / user_posts / video / transcript). |
author_video_count | Total number of posts on the author's profile (search / user_posts / video rows). |
author_ip_location | The author's IP location, which Douyin displays on every profile. |
title | Title. null when the platform has no titles (for example text-only posts). |
music | Background track: id, title, author, is_original (original sound or not), duration_sec, cover_url and play_url (audio link, may expire). Absent when there is no music information. |
download_count | How many times the post was downloaded. |
forward_count | How many times the post was forwarded. |
is_pinned | Whether the item is pinned (post rows: pinned on the author's profile; trending: pinned on the board). |
is_ad | Whether the post is an ad. |
video_tags | Content category tags Douyin assigned to the post (for example food or store visit). |
video_resolution | Video quality tier as Douyin labels it (for example 720p). |
animated_cover_url | Animated cover link. |
city | City name in the platform's language, not normalized. |
city_code | Keeps the platform's own meaning |
location | Location description passed through as is; the format varies by platform. |
text_language | Keeps the platform's own meaning |
video_bitrates | Keeps the platform's own meaning |
download_url | Keeps the platform's own meaning |
has_watermark | Keeps the platform's own meaning |
video_url_expires_at | Keeps the platform's own meaning |
permissions | Keeps the platform's own meaning |
author_gender | Keeps the platform's own meaning |
author_age | Keeps the platform's own meaning |
FAQ
#Where do I find the secUid?
#Open the account's Douyin profile: the long string after /user/ that starts with MS4w is the secUid. author_id in search and video results is the same value, so you can pass it straight to user_id. Nicknames and short numeric Douyin IDs do not identify an account.
How do I page through every video of an account?
#Send page_token as an empty string for the first page, then pass each response's next_page_token back unchanged with the other parameters the same. Pages hold up to 100 videos, newest first, and the last page has no next_page_token. Tokens last 24 hours, and paging ignores since, so filter by posted_at yourself if you need a date window.
How do I fetch only new videos?
#On a call without page_token, pass since as a YYYY-MM-DD date to get videos published on or after that day. On a schedule, use the latest publish date from your previous run as the next since to sync incrementally.
Errors and billing
#- 401
- Missing or invalid key.
- 402
- Insufficient balance. Top up first.
- 422
- Invalid parameter name or value. Fix it using the suggestions in the error. No charge.
- 429
- Per-minute request limit reached. Wait for Retry-After, then try again.
- 503
- Could not complete. The held charge is returned to your balance. If the outcome is unknown, verify it before you retry.
- 200 empty
- No data. No charge.
Official references
#Used only to check objects and terms. They do not imply authorization or endorsement of EveryInfra by the platform.
- Douyin Open Platform: Open ID and Union ID ↗
Douyin Open Platform defines Open ID as the user identifier within a single app, whereas Union ID operates across the developer account scope. For this page, user_id expects a secUid per the instructions above; do not supply Open Platform identifiers directly as equivalent inputs.
Checked 2026-09-04