Skip to main content

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

NameRequiredDescription
urlYesA Douyin short link, long link, share text, or bare aweme_id.
idAlternativeAlias for url when passing a bare aweme_id.

Examples

Current API baseDetecting 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:

StatusMeaning
400Missing or invalid input.
404Requested ratio, image index, or music URL is unavailable.
502Upstream Douyin response could not be resolved or parsed.