API Documentation
Integrate DownloadAnything into your applications with our RESTful API.
Overview
The DownloadAnything API is a RESTful JSON API that lets you programmatically extract download links from social media platforms. All responses are in JSON format.
Base URL
https://api.downloadanything.com/api/v1The website is free for everyone. The API is a paid service designed for developers who want to integrate media downloading into their own applications, bots, or workflows.
Authentication
All API requests require a Bearer token in the Authorization header:
Authorization: Bearer YOUR_API_KEYYou can generate and manage API keys from your Dashboard after subscribing to a paid plan. Keep your keys secure and never expose them in client-side code.
Pricing
Free
Website only, no API access
- Unlimited website downloads
- All supported platforms
- No account required
Starter
For hobby projects and prototyping
- 1,000 API requests / month
- 1 API key
- All supported platforms
- Email support
Pro
For production applications
- 10,000 API requests / month
- 5 API keys
- Webhook notifications
- Priority support
Enterprise
For large-scale deployments
- Unlimited API requests
- Custom SLA
- SSO / SAML
- Dedicated support
Endpoints
/api/v1/downloadExtract media download links from a supported platform URL.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
url | string | Yes | Full URL of the content to download |
quality | string | No | Preferred quality: "highest", "lowest", or specific (e.g. "720p") |
format | string | No | Preferred format: "mp4", "mp3", "webm", etc. |
Response
{
"title": "Amazing sunset timelapse 🌅",
"platform": "tiktok",
"author": "naturelover",
"thumbnail": "https://p16-sign.tiktokcdn.com/...",
"media": [
{
"type": "video",
"quality": "1080p",
"format": "mp4",
"url": "https://v16.tiktokcdn.com/...",
"size": "12.4 MB"
},
{
"type": "video",
"quality": "720p",
"format": "mp4",
"url": "https://v16.tiktokcdn.com/...",
"size": "6.8 MB"
},
{
"type": "audio",
"quality": "128kbps",
"format": "mp3",
"url": "https://v16.tiktokcdn.com/...",
"size": "1.2 MB"
}
]
}Rate Limits
| Plan | Monthly Limit | Per Minute |
|---|---|---|
| Starter | 1,000 requests | 10 requests |
| Pro | 10,000 requests | 60 requests |
| Enterprise | Custom | Custom |
Rate Limit Headers
Every API response includes rate limit information in the headers:
| Header | Description |
|---|---|
X-RateLimit-Limit | Your total monthly request limit |
X-RateLimit-Remaining | Remaining requests in the current period |
X-RateLimit-Reset | Unix timestamp when the rate limit resets |
Code Examples
cURL
curl -X POST https://api.downloadanything.com/api/v1/download \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://www.tiktok.com/@user/video/1234567890",
"quality": "highest",
"format": "mp4"
}'Python
import requests
response = requests.post(
"https://api.downloadanything.com/api/v1/download",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
json={
"url": "https://www.tiktok.com/@user/video/1234567890",
"quality": "highest",
"format": "mp4",
},
)
data = response.json()
print(data["title"])
for media in data["media"]:
print(f"{media['type']} — {media['quality']} — {media['url']}")JavaScript
const response = await fetch(
"https://api.downloadanything.com/api/v1/download",
{
method: "POST",
headers: {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
url: "https://www.tiktok.com/@user/video/1234567890",
quality: "highest",
format: "mp4",
}),
}
);
const data = await response.json();
console.log(data.title);
data.media.forEach((media) => {
console.log(`${media.type} — ${media.quality} — ${media.url}`);
});Error Codes
All errors follow a consistent JSON format:
{
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "You have exceeded your monthly API quota.",
"details": {
"limit": 1000,
"used": 1000,
"resets_at": "2025-02-01T00:00:00Z"
}
}
}| Status | Code | Description |
|---|---|---|
| 400 | INVALID_URL | The provided URL is malformed or not from a supported platform |
| 401 | UNAUTHORIZED | Missing or invalid API key |
| 403 | FORBIDDEN | Your API key does not have permission for this action |
| 404 | NOT_FOUND | The requested content was not found or has been removed |
| 429 | RATE_LIMIT_EXCEEDED | You have exceeded your rate limit — check X-RateLimit headers |
| 500 | INTERNAL_ERROR | An unexpected error occurred on our side |
SDKs
Python
pip install downloadanythingJavaScript / TypeScript
npm i downloadanythingGo
go get downloadanything