Douyin Posts by user API
API health
- 24h health
- Normal
- 24h average time
- —
- Healthy / normal
- Available
- Limited
- Mostly down
Last 24 hours
Last 30 days
Track the videos a Douyin account publishes, newest first, with caption, hashtags, length, engagement counts and publish time. Start paging with an empty page_token and pass back each next_page_token within 24 hours; since sets an earliest publish date.
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.
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.
AI prompt
Paste this into your AI assistant. It already holds this endpoint's parameters, response fields and an example request, so the assistant can ask what you need and then write the scraper.
Please help me write a data collection script with the EveryInfra Douyin Posts by user endpoint (douyin/user_posts).
Endpoint contract:
- 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 (user_posts / comments): pas…), 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, author_name, author_id; 41 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 | Not declared | 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 | Not declared | 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 | Not declared | 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
Captured September 26, 2026 at 08:56 (UTC) by calling this API with the parameters in the code sample above. results and count are that call's real response with personal information (names, handles, avatars, profile links, contact details) removed; the list keeps the first 2. id, billing and quota differ on every call, so only their shape is shown.
{
"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 (user_posts / comments): 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. |
author_name | Author's display name. |
author_id | Author's unique ID on the platform. |
author_douyin_id | The author's Douyin ID. |
author_avatar_url | Author avatar image URL: the creator on search, user_posts and video rows, the commenter on comments rows. |
cover_image_url | Video or image-post cover thumbnail URL (search / user_posts rows). |
author_follower_count | Author's follower count. null means not disclosed. |
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). |
duration_sec | Video length in seconds. |
duration_seconds | Duration in seconds. null for content that is not video or audio. |
hashtags | Hashtags in the text, in order of appearance; absent when there are none. |
view_count | Play count. Douyin does not publish play counts, so this field never carries real plays; judge reach by like_count, comment_count and share_count. |
region | Region. |
author_uid | Numeric user ID of the author (on comments, of the commenter). author_id is the secUid; both identify the same person. |
author_is_verified | Whether the author is verified (search / user_posts / video rows). |
author_bio | The author's profile bio (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_width | Video frame width in pixels. |
video_height | Video frame height in pixels. |
video_resolution | Video quality tier as Douyin labels it (for example 720p). |
animated_cover_url | Animated cover link. |
image_urls | Array of image links in the platform's display order; absent when there are no images. |
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. Authentication runs before parameter checks, so unauthenticated requests never see the parameter schema.
- 422
- Wrong parameter name or value. The error lists the parameters and allowed values this capability accepts and the closest match; it happens before any charge.
- 402
- Insufficient balance. Top up first.
- 429
- The account's per-minute request limit was reached (all of its API keys count together; a key's own lower limit applies first). Wait for Retry-After and try again; a rate package in the console raises the limit.
- 503
- Could not complete right now. Any charge for the call goes back to your balance automatically, and the billing receipt in the response states the actual outcome, including when it is not yet known. Do not resend blindly.
- 200 empty
- The request completed without data and is not charged (billing.reason = empty_result_refunded).
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