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/v1

The 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:

http
Authorization: Bearer YOUR_API_KEY

You 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

$0/mo
  • Unlimited website downloads
  • All supported platforms
  • No account required

Starter

For hobby projects and prototyping

$9/mo
  • 1,000 API requests / month
  • 1 API key
  • All supported platforms
  • Email support
Most Popular

Pro

For production applications

$29/mo
  • 10,000 API requests / month
  • 5 API keys
  • Webhook notifications
  • Priority support

Enterprise

For large-scale deployments

Custom
  • Unlimited API requests
  • Custom SLA
  • SSO / SAML
  • Dedicated support

Endpoints

POST/api/v1/download

Extract media download links from a supported platform URL.

Request Body

ParameterTypeRequiredDescription
urlstringYesFull URL of the content to download
qualitystringNoPreferred quality: "highest", "lowest", or specific (e.g. "720p")
formatstringNoPreferred format: "mp4", "mp3", "webm", etc.

Response

json
{
  "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

PlanMonthly LimitPer Minute
Starter1,000 requests10 requests
Pro10,000 requests60 requests
EnterpriseCustomCustom

Rate Limit Headers

Every API response includes rate limit information in the headers:

HeaderDescription
X-RateLimit-LimitYour total monthly request limit
X-RateLimit-RemainingRemaining requests in the current period
X-RateLimit-ResetUnix timestamp when the rate limit resets

Code Examples

cURL

bash
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

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

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:

json
{
  "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"
    }
  }
}
StatusCodeDescription
400INVALID_URLThe provided URL is malformed or not from a supported platform
401UNAUTHORIZEDMissing or invalid API key
403FORBIDDENYour API key does not have permission for this action
404NOT_FOUNDThe requested content was not found or has been removed
429RATE_LIMIT_EXCEEDEDYou have exceeded your rate limit — check X-RateLimit headers
500INTERNAL_ERRORAn unexpected error occurred on our side

SDKs

Coming Soon

Python

pip install downloadanything
Coming Soon

JavaScript / TypeScript

npm i downloadanything
Coming Soon

Go

go get downloadanything