Douyin Downloader API
This Deno API resolves Douyin share links into direct media resources. It supports video posts,
image posts, music links, short links, long links, and bare aweme_id values.
What It Does
- Resolves
v.douyin.comshort links to a canonicalaweme_id. - Fetches Douyin's server-rendered share page with an anonymous
ttwid. - Extracts
window._ROUTER_DATAfrom the SSR HTML. - Returns video variants, image URLs, and music MP3 URLs when present.
- Redirects clients to the selected video, image, or music URL through
/download.
Supported Inputs
| Input type | Example |
|---|---|
| Short link | https://v.douyin.com/2LjM6XJNEXQ/ |
| Long video link | https://www.douyin.com/video/7647847471770569984 |
| Share page link | https://www.iesdouyin.com/share/video/7647847471770569984/ |
| Bare aweme ID | 7647847471770569984 |
| Shared text | 复制打开抖音 ... https://v.douyin.com/2LjM6XJNEXQ/ ... |
Response Types
The /resolve endpoint returns one of two post types.
Video Post
{
"type": "video",
"awemeId": "7647847471770569984",
"title": "Example title",
"author": "Example author",
"musicUrl": "https://example.com/music.mp3",
"variants": [
{
"ratio": "1080p",
"size": 5564720,
"mimeType": "video/mp4",
"finalUrl": "https://example-cdn/video.mp4"
}
]
}
Image Post
{
"type": "image",
"awemeId": "7531313150915824930",
"title": "Example title",
"author": "Example author",
"musicUrl": "https://sf6-cdn-tos.douyinstatic.com/obj/ies-music/example.mp3",
"images": [
{
"index": 1,
"width": 1440,
"height": 2160,
"url": "https://p26-sign.douyinpic.com/example.webp",
"urls": ["https://p26-sign.douyinpic.com/example.webp"],
"downloadUrls": ["https://p26-sign.douyinpic.com/example-watermarked.webp"]
}
]
}
Server Base URL
When the documentation and API are served from the same domain, use the current site origin as the API base URL.
Current API base
Detecting the current page origin...Open the Playground to test the API from this documentation site. The playground fills the API base URL from the current page domain.