🔌 API Documentation
Overview
The TikTok Downloader API runs on Cloudflare Workers and exposes a simple GET endpoint to retrieve TikTok content data and direct download links, with built‑in caching and rate limiting.
Base URL
https://clipx.zamdev.workers.dev
Authentication
No API key is required. Per‑IP rate limits are enforced at the edge. For unlimited access, contact support to obtain a token and send it in the X-ClipX-Unlimited header.
Rate Limits
- Requests per minute (per IP): 10
- Daily cap (per IP): 100
- Timeout: default 30000 ms, max 60000 ms
Need higher limits? Email clipx@zamdev.dev.
Endpoint
Download TikTok content
GET /
Downloads TikTok videos or images with metadata.
Query Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
url | string | âś… | - | TikTok URL to download |
format | boolean | ❌ | false | Format numbers (K/M/B) and time (H:M:S) |
quality | enum | ❌ | best | Video quality preference: best, hd, sd |
audio | boolean | ❌ | true | Include audio information |
cover | boolean | ❌ | true | Include cover/thumbnail URLs |
metadata | boolean | ❌ | true | Include processing metadata inside data.metadata |
meta | boolean | ❌ | true | Include top‑level meta object (examples below omit it) |
lang | string | ❌ | en | Language preference (e.g. en, es, fr) |
timeout | number | ❌ | 30000 | Request timeout in milliseconds (max 60000) |
help | boolean | ❌ | false | Show help information instead of downloading |
stats | boolean | ❌ | false | Show cache statistics |
rate_limit | boolean | ❌ | false | Include rate limit info in result; or when used alone, returns rate limit status |
cache | boolean | ❌ | true | Include cache info in response |
trace | boolean | ❌ | true | Include trace information in response |
processing_time | boolean | ❌ | true | Include processing time in response |
contact | boolean | ❌ | true | Include contact information in response |
Responses
Success (200)
{
"success": true,
"data": {
"id": "string",
"region": "string",
"title": "string",
"duration": "string | number",
"create_time": "string | number",
"cover": "string",
"ai_dynamic_cover": "string",
"origin_cover": "string",
"author": {
"id": "string",
"username": "string",
"nickname": "string",
"profile": "string"
},
"stats": {
"views": "string | number",
"play_count": "string | number",
"digg_count": "string | number",
"comment_count": "string | number",
"share_count": "string | number",
"favourite_count": "string | number",
"forward_count": "string | number",
"collect_count": "string | number",
"download_count": "string | number"
},
"audio": {
"id": "string",
"title": "string",
"cover": "string",
"play": "string",
"author": "string",
"original": false,
"duration": "string | number",
"album": "string"
},
"video": {
"standard_mp4": "string",
"wmplay": "string",
"hd_mp4": "string",
"standard_mp4_size": "string | number",
"wmplay_size": "string | number",
"hd_mp4_size": "string | number"
}
// or `images`: ["string", ...] when the post is an image set
},
"cache": { "hit": false, "expiresIn": "300s" }
}
Error (4xx/5xx)
{
"success": false,
"error": "string",
"status_code": 400
}
When the rate limit is exceeded (429), the response includes rate_limit:
{
"success": false,
"error": "Rate limit exceeded",
"status_code": 429,
"rate_limit": {
"remaining": 0,
"reset_time": 1730000000000,
"limit": 10,
"window_ms": 60000,
"daily_remaining": 0,
"daily_reset_time": 1730000000000,
"daily_limit": 100,
"daily_window_ms": 86400000
}
}
Note: Example responses above intentionally omit the top‑level meta object per this documentation’s guideline.
Supported URL Formats
The API supports various TikTok URL formats:
https://www.tiktok.com/@username/video/1234567890https://vm.tiktok.com/ZMxxxxxhttps://vt.tiktok.com/ZSxxxxxhttps://tiktok.com/@username/photo/1234567890
Examples
Basic download
curl 'https://clipx.zamdev.workers.dev?url=https://www.tiktok.com/@user/video/123'
Formatted numbers and time
curl 'https://clipx.zamdev.workers.dev?url=https://www.tiktok.com/@user/video/123&format=true'
HD only (no audio)
curl 'https://clipx.zamdev.workers.dev?url=https://www.tiktok.com/@user/video/123&quality=hd&audio=false'
Minimal response (no cover, no metadata)
curl 'https://clipx.zamdev.workers.dev?url=https://www.tiktok.com/@user/video/123&cover=false&metadata=false'
Include rate limit information
curl 'https://clipx.zamdev.workers.dev?url=https://www.tiktok.com/@user/video/123&rate_limit=true'
No cache/trace/contact info and hide processing time
curl 'https://clipx.zamdev.workers.dev?url=https://www.tiktok.com/@user/video/123&cache=false&trace=false&processing_time=false&contact=false'
Cache statistics
curl 'https://clipx.zamdev.workers.dev?stats=true'
Rate limit status only (no URL)
curl 'https://clipx.zamdev.workers.dev?rate_limit=true'
JavaScript example
const res = await fetch('https://clipx.zamdev.workers.dev?url=https://www.tiktok.com/@user/video/123&quality=best&format=true');
const data = await res.json();
if (!data.success) throw new Error(`${data.status_code}: ${data.error}`);
console.log('Video:', data.data.video?.hd_mp4 || data.data.video?.standard_mp4);
Features
- Built‑in in‑memory caching for faster responses
- Automatic per‑IP rate limiting
- Error responses are not cached
- Optional trace timing breakdown and processing time
Troubleshooting
Common Issues
Invalid URL Error
- Ensure the URL is a valid TikTok link
- Check for typos in the URL
- Verify the content is publicly accessible
Rate Limit Exceeded
- Implement request queuing
- Add delays between requests
- Consider caching responses
Timeout Errors
- Increase timeout value for large files
- Check network connectivity
- Retry with exponential backoff
Empty Response
- Verify the TikTok content exists
- Check if the content is region-restricted
- Ensure the URL format is supported
Support
For API support and questions:
- Check the FAQ for common questions
- Review the Troubleshooting Guide
- Contact support through the Contact Page