API Reference
All endpoints are plain HTTP GET endpoints and return JSON or redirects. The API enables CORS with
Access-Control-Allow-Origin: *, so browser-based tools can call it directly.
Health Check
GET /health
Response:
{
"ok": true
}
Resolve Post
GET /resolve?url=<douyin-url-or-aweme-id>
Query Parameters
| Name | Required | Description |
|---|---|---|
url | Yes | A Douyin short link, long link, share text, or bare aweme_id. |
id | Alternative | Alias for url when passing a bare aweme_id. |
Examples
Current API base
Detecting the current page origin...Download Redirect
GET /download?url=<douyin-url-or-aweme-id>
The endpoint returns 302 and redirects to the selected media URL.
Video Download
By default, video posts redirect to the first discovered variant, usually the highest tested ratio.
GET /download?url=<douyin-url-or-aweme-id>
Choose a specific probed ratio:
GET /download?url=<douyin-url-or-aweme-id>&ratio=720p
Supported ratio probes are 1080p, 720p, 540p, and 360p. Douyin may return fewer distinct
files for a post.
Image Download
Image posts redirect to the first image by default:
GET /download?url=<douyin-url-or-aweme-id>
Choose an image by one-based index:
GET /download?url=<douyin-url-or-aweme-id>&index=2
Music Download
Redirect to the post's music MP3 when the share payload exposes one:
GET /download?url=<douyin-url-or-aweme-id>&media=music
Errors
Errors are JSON responses:
{
"error": "Input must be a Douyin URL or a bare aweme_id."
}
Common status codes:
| Status | Meaning |
|---|---|
400 | Missing or invalid input. |
404 | Requested ratio, image index, or music URL is unavailable. |
502 | Upstream Douyin response could not be resolved or parsed. |