Douyin Search API
API health
- 24h health
- 98%
- 24h average time
- 15.24 s
- Healthy / normal
- Available
- Limited
- Mostly down
Last 24 hours
Last 30 days
Find Douyin videos for a search term, with caption, hashtags, likes, comments, shares, saves, author details and a signed play link. Douyin does not publish play counts, so view_count is usually absent or 0 and never real plays; judge reach by likes, comments and shares.
Douyin Search finds videos by keyword and returns each video's caption, hashtags, like, comment, share and save counts, the author's nickname, Douyin ID and follower count, and the publish time, plus the video length, cover image and a signed play link. Use it to see which videos are spreading around a topic and who made them: trend and topic research, sampling brand mentions, or working back from videos to creators worth following.
Order results with sort (relevance, newest or most liked) and narrow them with publish_time (the last day, week or half year). Judge reach with like_count, comment_count and share_count: Douyin does not publish play counts, so view_count says nothing about real views. author_id can be passed straight on to read the author's profile and videos.
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 Search endpoint (douyin/search).
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 search, and put the parameters inside params.
- Required parameters:
- keyword: Search term for the video search action, passed as a string, for example latte art. It finds videos; it is not an account nickname or a video ID.
- Optional parameters:
- publish_time: Filters video search results by publishing time window. Allowed values are unlimited (default), one_day (last 24 hours), one_week (last 7 days), and half_year (last 6 months). (allowed: half_year / one_day / one_week / unlimited)
- sort: Sorts video search results. Allowed values are relevance (default), newest for the latest publish date, and most_liked for highest likes. (allowed: most_liked / newest / relevance)
- limit: The most rows to return in this call, an integer from 1 to 50. The default applies when you leave it out, and a call can return fewer rows. Larger values return 422 before any charge. (default: 10)
- Returns a list of records. Main fields of each record: 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, author_douyin_id (The author's Douyin ID); 40 fields in total, full list at https://api.everyinfra.com/api/v1/social/catalog?platform=douyin.
- Example request body:
{
"platform": "douyin",
"action": "search",
"params": {
"keyword": "城市骑行"
}
}
- 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 | search | Capability identifier, fixed value. |
keyword | body.params | Not declared | Yes | - | Search term for the video search action, passed as a string, for example latte art. It finds videos; it is not an account nickname or a video ID. |
publish_time | body.params | enum | No | - | Filters video search results by publishing time window. Allowed values are unlimited (default), one_day (last 24 hours), one_week (last 7 days), and half_year (last 6 months).Allowed valueshalf_yearone_dayone_weekunlimited |
sort | body.params | enum | No | - | Sorts video search results. Allowed values are relevance (default), newest for the latest publish date, and most_liked for highest likes. Supports legacy compatibility aliases general (mapped to relevance) and latest (mapped to newest).Allowed valuesmost_likednewestrelevance |
limit | body.params | integer (1–50) | No | 10 | The most rows to return in this call, an integer from 1 to 50. 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": "search",
"params": {
"keyword": "城市骑行"
}
}'[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. id, billing and quota differ on every call, so only their shape is shown.
{
"id": "req_…",
"platform": "douyin",
"action": "search",
"results": [
{
"id": "(已隐去)",
"url": "https://www.douyin.com/video/7635624004494435825",
"text": "一个人的解压方式 夜晚 骑行 听歌 晚风和自由#骑行",
"media_type": "video",
"like_count": 1578935,
"comment_count": 26631,
"share_count": 228957,
"collect_count": 117174,
"view_count": 0,
"author_name": "(已隐去)",
"author_id": "(已隐去)",
"author_douyin_id": "(已隐去)",
"author_follower_count": 9028,
"region": "CN",
"posted_at": "2026-05-03T11:20:52+00:00",
"platform": "douyin",
"duration_sec": 8,
"hashtags": [
"骑行"
]
}
],
"count": 1,
"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 |
|---|---|
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
Why can't I get view counts?
Douyin does not publish play counts, so view_count in these results does not reflect real views and cannot tell you whether anyone watched. Compare videos by like_count, comment_count and share_count, read alongside the publish time.
Can I search only recent videos?
Yes. Set publish_time to one_day, one_week or half_year to keep videos published in that window; the default, unlimited, applies no window. Set sort to newest to list them newest first.
How do I get more videos from an author I found?
The author_id in a result row is the author's secUid. Pass it to the Douyin Posts by user capability to list that account's videos. author_douyin_id is the author's Douyin ID: good for display and manual checks, while author_id is what you pass to read account data.
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).