Douyin Media download links API

Get the video download links of several Douyin posts at once with urls, plus the covers and the request_headers to send when you download. Each item in urls is one call, at $0.56 per 1,000 calls.

  • Links are signed and expire; read the expiry time in expires_at.
  • With fresh set to true, the cache is skipped and the links are fetched again on the spot.
  • Failed calls and empty results are not charged.

API health

24h health
Normal
  • Healthy / normal
  • Available
  • Limited
  • Mostly down
Normal

Last 24 hours

Last 30 days

  1. 1Request

    POST /api/v1/social
    {
      "platform": "douyin",
      "action": "media_links",
      "params": {
        "urls": [
          "https://www.douyin.com/video/<VIDEO_ID_A>"
        ]
      }
    }
  2. 2JSON response

    {
      "results": [
        {
          "media_type": string,
          "video_url": string,
          "video_url_expires_at": string,
          "video_width": number
        },
        …
      ]
    }
  3. 3Rows

    media_typevideo_urlvideo_url_expires_atvideo_width
    stringstringstringnumber
  4. 4CSV

    douyin-media_links-sample.csv id,url,media_type,video_url,video_url_expires_at,video_width,video_height,video_size_bytes,has_watermark,best_stream,stream_count,cover_image_url,covers,image_urls,audio_url,request_headers,expires_at,fetched_at,platform,input

A request with urls goes in, and one row per post comes back with video_url, best_stream and request_headers, listed as a field table and a CSV file.

What data you get

This endpoint has no public real sample yet. The table lists the fields, types and meanings that each row returns, with no values.

FieldTypeMeaning
idstringThe record's unique ID on the platform. Unique only within one platform; IDs can repeat across platforms.
urlstringLink to the record on the platform.
media_typestringMedia type: video, or image for image posts.
video_urlstringVideo playback URL (signed, expires; download promptly if you need to keep it). Null for image posts or when the source omits it.
video_url_expires_atstringKeeps the platform's own meaning
video_widthnumberVideo frame width in pixels.
video_heightnumberVideo frame height in pixels.
video_size_bytes—Size of the video file in bytes (media_links).
has_watermarkbooleanKeeps the platform's own meaning
best_stream—The highest-bitrate video stream (media_links): {url, bitrate (bps), width, height, size_bytes, expires_at}.
stream_count—How many video streams of different quality the video has (media_links).
cover_image_urlstringCover image URL: the cover of a video or image post on search, user_posts, posts_batch, related_posts, mix_posts, music_posts and media_links rows; the music cover on music_search and music_detail; the topic image on billboard_topic_hot; the collection cover on user_mixes; the room cover on live_room. Signed links expire.
covers—Cover images (media_links): [{url, width, height, expires_at}]; the first is the same as cover_image_url.
image_urls—Array of image links in the platform's display order; absent when there are no images.
audio_urlstringAudio link: the video's audio track on transcript (mp3), the track's play link on music_search and music_detail, the video's background music on media_links; may expire.
request_headers—Headers to send when you download the links (media_links), for example {"Referer": "https://www.douyin.com/"}. Without them the download may be refused.
expires_at—When the earliest-expiring link in the row stops working (media_links, ISO 8601, UTC). After that, fetch the links again with fresh=true.
fetched_at—When the links were fetched (media_links, ISO 8601, UTC); without fresh they may come from a cache.
platformstringSource platform identifier, the same as platform in the request (for example xiaohongshu, tiktok).
input—The entry from urls that this row answers, returned exactly as you passed it (posts_batch, profiles_batch, media_links). Use it to match rows to your entries.

Use cases

  • Get download addresses in bulk

    Put a set of video IDs or video links into urls and read video_url on each row to download.

  • Pick the highest-bitrate stream

    Read best_stream; it holds the address, bitrate, size in pixels and file size of the stream with the highest bitrate.

  • Send the right headers when you download

    Send the headers in request_headers unchanged (for example Referer); a download without them may be refused.

  • Fetch again after links expire

    When expires_at has passed, request again with fresh set to true to get a new set of links.

Douyin Open Platform vs EveryInfra

Here is how the Douyin Open Platform overall authorization guide and EveryInfra media_links compare on access.

ComparedDouyin Open PlatformEveryInfra
Authorization channelsThe documentation says the Douyin Open Platform offers authorization through four channels: WEB, Android, iOS and JS.You add no Douyin authorization SDK or JSSDK. Send a plain HTTPS request with your EveryInfra API key in the header, and put the posts in urls.

The Douyin Open Platform documentation is in Chinese; the table shows a translation, checked against its overall authorization guide on 2026-11-22. The page shows no update date. The documentation has no description of download links for posts, so only access is compared here. Official sources: Overall authorization guide

Limits and gotchas

  • urls is an array; the parameter reference says how many items one call takes; the same item can appear only once.
  • Each item must be a numeric video ID, or a video link that contains that ID; short links and share texts are not accepted.
  • Billing is per item, one call each; items that could not be read are not charged and are listed in missed in the response.
  • Links are signed and expire; expires_at is the time of the earliest-expiring link on the row.
  • has_watermark is true when the video file has a watermark.
  • Without fresh, links may come from the cache; the time they were fetched is in fetched_at.
  • Synchronous calls only.

Pricing

Each item in urls counts as one call at $0.000556, so you pay by the number of items and not per field; items that could not be read are not charged. Failed calls and empty results are not charged.

CallsCost
10,000$5.56
100,000$55.56
1,000,000$555.56

Totals use the list price per call.

Code samples

#
bash
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": "media_links",
  "params": {
    "urls": [
      "https://www.douyin.com/video/<VIDEO_ID_A>"
    ]
  }
}'

OpenAPI definition (JSON)Samples read the key from the EVERYINFRA_API_KEY environment variable; copied code never contains your key.

API reference

See the parameters, response fields, errors and billing for media_links, and copy the page or open it as Markdown for an AI assistant.

POST

AI prompt

#
Please help me write a data collection script with the EveryInfra Douyin Media download links endpoint (douyin/media_links).

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 media_links, and put the parameters inside params.
- Required parameters:
  - urls: The videos to get download links for, as an array of up to 20 entries; each entry can appear only once. Each entry is a numeric video ID or a https://www.douyin.com/video/<video_id> link.
- Optional parameters:
  - fresh: For media_links: true skips cached links and fetches them again; default false. The links are signed and expire, and expires_at shows when.
  - limit: The most rows to return in this call, an integer of 1 or more. The default applies when you leave it out, and a call can return fewer rows.
- Returns a list of records. Main fields of each record: id, url, media_type (Media type: video, or image for image p…), video_url (Video playback URL (signed, expires), video_url_expires_at, video_width (Video frame width in pixels), video_height (Video frame height in pixels), video_size_bytes (Size of the video file in bytes (media_…), has_watermark, best_stream (The highest-bitrate video stream (media…), stream_count (How many video streams of different qua…), cover_image_url (Cover image URL: the cover of a video o…); 19 fields in total, full list at https://api.everyinfra.com/api/v1/social/catalog?platform=douyin.
- Example request body:
{
  "platform": "douyin",
  "action": "media_links",
  "params": {
    "urls": [
      "https://www.douyin.com/video/<VIDEO_ID_A>"
    ]
  }
}
- Price: $0.56 per 1,000 requests; failed and empty results are not charged.
- This endpoint runs synchronously only; do not add "mode": "async" to the body.
- 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

#
NameInTypeRequiredDefaultDescription
AuthorizationheaderstringYes-Bearer followed by your API key. Create it in the console; never put it in a URL or a code repository.
platformbodystringYesdouyinPlatform identifier, fixed value.
actionbodystringYesmedia_linksCapability identifier, fixed value.
urlsbody.paramsarrayYes-The videos to get download links for, as an array of up to 20 entries; each entry can appear only once. Each entry is a numeric video ID or a https://www.douyin.com/video/<video_id> link; short links and share texts are not accepted. Billed per video; videos not found are not charged. Rows carry input, the entry you passed.
freshbody.paramsbooleanNo-For media_links: true skips cached links and fetches them again; default false. The links are signed and expire, and expires_at shows when.
limitbody.paramsinteger (1–)No-The most rows to return in this call, an integer of 1 or more. The default applies when you leave it out, and a call can return fewer rows.

Response example

#
No sample response is available for these parameters yet. This preview shows the response shape and fields from the API definition, with … as placeholders; it is not the result of a live call.
json
{  "id": "req_…",  "platform": "douyin",  "action": "media_links",  "results": [    {      "id": …,      "url": …,      "media_type": …,      "video_url": …,      "video_url_expires_at": …,      "video_width": …,      "video_height": …,      "video_size_bytes": …,      "has_watermark": …,      "best_stream": …,      "stream_count": …,      "cover_image_url": …,      "covers": …,      "image_urls": …,      "audio_url": …,      "request_headers": …,      "expires_at": …,      "fetched_at": …,      "platform": …,      "input": …    }  ],  "count": …,  "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.

FieldMeaning
idThe record's unique ID on the platform. Unique only within one platform; IDs can repeat across platforms.
urlLink to the record on the platform.
media_typeMedia type: video, or image for image posts.
video_urlVideo playback URL (signed, expires; download promptly if you need to keep it). Null for image posts or when the source omits it.
video_url_expires_atKeeps the platform's own meaning
video_widthVideo frame width in pixels.
video_heightVideo frame height in pixels.
video_size_bytesSize of the video file in bytes (media_links).
has_watermarkKeeps the platform's own meaning
best_streamThe highest-bitrate video stream (media_links): {url, bitrate (bps), width, height, size_bytes, expires_at}.
stream_countHow many video streams of different quality the video has (media_links).
cover_image_urlCover image URL: the cover of a video or image post on search, user_posts, posts_batch, related_posts, mix_posts, music_posts and media_links rows; the music cover on music_search and music_detail; the topic image on billboard_topic_hot; the collection cover on user_mixes; the room cover on live_room. Signed links expire.
coversCover images (media_links): [{url, width, height, expires_at}]; the first is the same as cover_image_url.
image_urlsArray of image links in the platform's display order; absent when there are no images.
audio_urlAudio link: the video's audio track on transcript (mp3), the track's play link on music_search and music_detail, the video's background music on media_links; may expire.
request_headersHeaders to send when you download the links (media_links), for example {"Referer": "https://www.douyin.com/"}. Without them the download may be refused.
expires_atWhen the earliest-expiring link in the row stops working (media_links, ISO 8601, UTC). After that, fetch the links again with fresh=true.
fetched_atWhen the links were fetched (media_links, ISO 8601, UTC); without fresh they may come from a cache.
platformSource platform identifier, the same as platform in the request (for example xiaohongshu, tiktok).
inputThe entry from urls that this row answers, returned exactly as you passed it (posts_batch, profiles_batch, media_links). Use it to match rows to your entries.

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.

Errors

FAQ

What does the Douyin download links API return?

One row for each post that was read: id, url, media_type, video_url, video_size_bytes, has_watermark, best_stream, stream_count, cover_image_url, covers, audio_url, request_headers, expires_at and fetched_at, plus input.

What do I do when a link expires?

Check expires_at. After that time, request again with fresh set to true; the call fetches new links on the spot.

What if the download is refused?

Send the request_headers of that row, for example Referer. A download without them may be refused.

Can I pass a v.douyin.com short link?

No. It takes only a numeric video ID or a video link that contains that ID. For a short link or a share text, pass it to posts_batch first (it accepts both) and use the id on the returned row.

How are download links billed?

Each item in urls is one call at $0.000556, or $0.56 per 1,000 calls. Failed calls and empty results are not charged.

You can call the other Douyin endpoints with the same EveryInfra API key.

Google Analytics needs consent. Privacy