Documentation Index
Fetch the complete documentation index at: https://mintlify.com/KevxxAlva/tiktok-bot-downloader/llms.txt
Use this file to discover all available pages before exploring further.
GET /api/download is the primary entry point for all TikTokSaver operations. It accepts a TikTok video URL, forwards it to the TikWM third-party API with HD quality requested, normalizes the response into a stable DownloadResult shape, and returns it as JSON. The returned CDN URLs are then passed to /api/proxy-download or /api/proxy-image for delivery to the browser.
Endpoint
Parameters
The TikTok video URL to fetch, URL-encoded. The following URL formats are all supported:
https://vm.tiktok.com/ZMe7abc123— short share linkhttps://www.tiktok.com/@username/video/7123456789012345678— full canonical URLhttps://m.tiktok.com/v/7123456789012345678.html— mobile URL
encodeURIComponent() (JavaScript) or urllib.parse.quote() (Python) before appending it to the query string.Upstream Behavior
The handler constructs amultipart/form-data POST request to https://www.tikwm.com/api/ with two fields: url (the TikTok URL) and hd set to 1 (requests HD quality). The TikWM response is then normalized:
- For standard videos, up to two
DownloadOptionentries are produced: onenormal(watermark-free, H.264playfield) and onewatermark(wmplayfield). - For slideshows (when TikWM returns an
imagesarray), video download options are skipped entirely because TikWM’s slideshow video render is unreliable. Only themusicoption is added alongside theimagesarray. - A
musicoption is always appended whendata.musicis present.
Success Response
HTTP 200 — returns aDownloadResult JSON object.
Always
"success" on a 200 response.The normalized video metadata object.
DownloadOption Object
Each element ofresult.downloads conforms to the DownloadOption interface.
Identifies the kind of media file:
normal— watermark-free video (H.264, from TikWM’splayfield)watermark— watermarked HD video (from TikWM’swmplayfield)music— audio-only MP3 trackhd— reserved for future high-definition video variants
Human-readable label shown in the UI. Current values produced by the server:
"Sin Marca"— watermark-free video download"Con Marca (HD)"— watermarked HD video download"Audio MP3"— audio track download
Direct TikTok CDN URL for the media file. Do not link this URL directly in browser
<a> tags or <video src> — pass it through /api/proxy-download instead for reliable delivery.File size in bytes, sourced from TikWM’s
size, hd_size, or wm_size fields depending on the download type. null for music type options, as TikWM does not return a size for audio tracks.Error Responses
Returned when the
url query parameter is missing.Returned when TikWM returns data but no watermark-free video option could be constructed and no images were found. This can happen for private or region-locked videos.
Returned when TikWM responds with a non-zero code, when its response cannot be parsed, or when an unexpected runtime error occurs.
Examples
The CDN URLs inside
result.downloads[].url, result.music, result.cover, and result.images are raw TikTok CDN links. Embedding them directly in <a href>, <video src>, or <img src> tags will often result in 403 errors or CORS failures. Always route them through /api/proxy-download (for file downloads) or /api/proxy-image (for image display) for reliable delivery.