Media files object
9 endpoints on 8 platforms return the Media files object with the same 29 fields, so code written for one platform reads the others unchanged. A call costs $0.0020 to $0.0200.
Fields
A field the platform cannot give is left out of the item and named in meta.unavailable. It is never filled with a guess or a zero.
ID of the post the files belong to: the same as the detail endpoint's id
Content format: video, or image (a picture post or photo set): video image
Title; the caption where the platform has no separate title
Author
Author's account ID
Author's display name
Length of the video, in seconds; a picture post has none
Every file, one entry each: the video in each quality, the audio, the cover, each picture, the subtitles
What the file is: video, audio (the background music, or a sound track served apart from the picture), cover, image (a picture of the post), subtitle: video audio cover image subtitle
Place of a picture in the post, from 1; null for other files
Quality, as the platform names it or by the short side in pixels, such as 720p or 1080p; null where there is none
Width, in pixels
Height, in pixels
Codec, such as h264, h265, h266, av1 or aac; ByteDance's own BVC2 (Douyin, TikTok) is bytevc2, which many players cannot play, so pick an h264 or h265 file for a common format; null where the platform does not say: h264 h265 h266 av1 aac bytevc2
Bit rate, in bits a second
File size, in bytes
File format: mp4, m4s (Bilibili's separate picture and sound streams), mp3, m4a, jpeg, png, webp, heic, gif, kvif (Kuaishou's image format) or srt; null where the address does not say: mp4 m4s mp3 m4a jpeg png webp heic gif kvif srt
Length of an audio or video file, in seconds
Name of the background music; null for other files
Language code of the subtitles, such as zh-CN or en-US
Whether the file carries the platform's watermark
Address of the file
Other addresses of the same file, for when the main one fails
When the address expires, as its signature says; null where the signature does not say. Once it has, call again for new addresses
Request headers the address has to be fetched with, keyed by the header's name in lower case; absent on platforms whose addresses need none
The Referer to send
The platform's play address, which redirects to the file's address of the moment and lasts longer than url; null where there is none
The video of a live photo; null for a picture that is not one
Address of the live photo's video
Length of the live photo's video, in seconds
How to decrypt the files, where they are encrypted; null where they are not
The method. isaac64_xor_head: seed ISAAC64 with key, take each 64-bit output as 8 big-endian bytes for a key stream as long as bytes says, and XOR it over the start of the file; the rest is left as it is: isaac64_xor_head
The key, good only for the addresses of the same answer
How many bytes at the start of the file are encrypted
What a platform cannot give
A platform stands against a field when none of its endpoints gives it.
titleBilibiliauthor.idBilibiliauthor.nameBilibilifiles[].indexWeChat ChannelsBilibilifiles[].qualityInstagramfiles[].codecInstagramWeChat ChannelsKuaishoufiles[].bitrateInstagramWeChat Channelsfiles[].sizeInstagramBilibilifiles[].durationBilibilifiles[].titleInstagramXiaohongshu (RedNote)WeChat ChannelsBilibiliWeiboKuaishoufiles[].langTikTokInstagramDouyinWeChat ChannelsBilibiliWeiboKuaishoufiles[].watermarkInstagramWeChat ChannelsBilibiliKuaishoufiles[].backup_urlsInstagramWeChat ChannelsWeibofiles[].expires_atXiaohongshu (RedNote)WeChat ChannelsKuaishoufiles[].headers.refererTikTokInstagramDouyinXiaohongshu (RedNote)WeChat ChannelsWeiboKuaishoufiles[].stable_urlTikTokInstagramXiaohongshu (RedNote)WeChat ChannelsBilibiliWeiboKuaishoufiles[].live.urlTikTokInstagramWeChat ChannelsBilibiliWeiboKuaishoufiles[].live.durationTikTokInstagramWeChat ChannelsBilibiliWeiboKuaishoudecrypt.methodTikTokInstagramDouyinXiaohongshu (RedNote)BilibiliWeiboKuaishoudecrypt.keyTikTokInstagramDouyinXiaohongshu (RedNote)BilibiliWeiboKuaishoudecrypt.bytesTikTokInstagramDouyinXiaohongshu (RedNote)BilibiliWeiboKuaishoumeta.unavailable.Endpoints that return Media files
The number beside each platform is how many of its endpoints return it.
Example
One item from tiktok.videos.media.get, as recorded 2026-10-12 18:45 UTC. Names, text, IDs and links are examples; the figures are as recorded.
{
"post_id": "7576723593279365074",
"type": "video",
"title": "I tried weekend hiking for 30 days. Here is what happened",
"author": { "id": "6797150316661954559", "name": "Hannah Weiss" },
"duration": 89.373,
"files": [
{
"kind": "video",
"index": null,
"quality": "720p",
"width": 720,
"height": 1280,
"codec": "h265",
"bitrate": 334473,
"size": 3736653,
"format": "mp4",
"duration": 89.373,
"title": null,
"watermark": false,
"url": "https://www.tiktok.com/@northside_coffee/video/7390042224677822398",
"backup_urls": [
"https://www.tiktok.com/@hannah.w.photo/video/7449784160616781997"
],
"expires_at": "2026-10-13T00:47:02.000Z"
},
{
"kind": "video",
"index": null,
"quality": "540p",
"width": 576,
"height": 1024,
"codec": "h265",
"bitrate": 254642,
"size": 2844805,
"format": "mp4",
"duration": 89.373,
"title": null,
"watermark": false,
"url": "https://www.tiktok.com/@maya.makes/video/7540639198878317897",
"backup_urls": [
"https://www.tiktok.com/@fieldnotes_studio/video/7210306615796042888"
],
"expires_at": "2026-10-13T00:47:02.000Z"
},
// … 2 more
]
}