API Documentation

All-in-One Social Media Downloader API

Version 1.0.0 | Last Updated: September 13, 2025

Introduction

The All-in-One Social Media Downloader API is a robust solution for extracting media content from multiple social media platforms through a single, unified API. This service allows developers to easily implement media downloading capabilities into their applications without the need to handle individual platform integrations.

Key Features:
  • Single API for multiple platforms (YouTube, TikTok, Instagram, Twitter, Facebook, etc.)
  • Automatic platform detection from URLs
  • Multiple quality options (HD, SD, and audio-only)
  • Fast and reliable response times
  • Well-documented and easy to implement

Authentication

All API requests require authentication using an API key. Your API key should be included with every request to the API endpoints.

Obtaining an API Key

To obtain an API key, please contact our administrator via Telegram: @Alifur Rahman Jonayed. API keys are provided based on your usage requirements.

Using Your API Key

Include your API key as a query parameter in your requests:

https://aioapi.online/down?key=YOUR_API_KEY&url=MEDIA_URL
Security Notice: Keep your API key confidential. Do not expose it in client-side code. Always make API requests from your server to protect your key.

API Endpoints

The API provides a single endpoint that handles all platforms through automatic detection.

GET /down
Media Download Endpoint

This endpoint automatically detects the platform from the provided URL and returns downloadable links.

Base URL:
https://aioapi.online
Full Endpoint:
https://aioapi.online/down?key=YOUR_API_KEY&url=MEDIA_URL

Parameters

The API accepts the following query parameters:

Parameter Type Required Description
key string Required Your API key for authentication
url string Required The URL of the media you want to download

Response Format

All API responses are returned in JSON format. Successful responses have the following structure:

{ "success": true, "version": "1.0.0", "timestamp": 1694648293, "developer": { "name": "Alifur Rahman Jonayed", "email": "contact@example.com", "website": "https://example.com", "social": { "telegram": "@Alifur Rahman Jonayed", "twitter": "@Alifur Rahman Jonayed", "instagram": "@Alifur Rahman Jonayed" } }, "platform": "youtube", "data": { "title": "Video Title", "thumb": "https://example.com/thumbnail.jpg", "video": "https://example.com/video_sd.mp4", "video_hd": "https://example.com/video_hd.mp4", "audio": "https://example.com/audio.m4a", "quality": "360p/720p", "channel": "Channel Name" } }

Response Properties

success

Boolean

Indicates whether the request was successful or not.

version

String

The current version of the API.

timestamp

Integer

Unix timestamp of when the response was generated.

developer

Object

Information about the API developer.

platform

String

The detected platform from the URL (e.g., "youtube", "tiktok", etc.).

data

Object

Platform-specific data containing the downloadable media links and metadata.

Platform-Specific Response Fields

The data object contains different properties depending on the platform:

Platform Available Fields
YouTube title, thumb, video, video_hd, audio, quality, channel
TikTok title, thumb, video, video_no_watermark, audio, author
Instagram title, thumb, media (array), author
Twitter title, thumb, video, video_hd, author
Facebook title, thumb, video, video_hd, author
Terabox title, size, file, type
Likee title, thumb, video, video_no_watermark, author

Error Handling

When an error occurs, the API will return a JSON response with success: false and details about the error:

{ "success": false, "version": "1.0.0", "timestamp": 1694648293, "error": { "code": "INVALID_KEY", "message": "Invalid API key provided", "status": 403 } }

HTTP Status Codes

The API uses standard HTTP status codes to indicate the success or failure of a request:

HTTP Code Error Code Description
200 - Success - The request was successful
400 MISSING_PARAMS Missing required parameters (key or url)
400 INVALID_URL The provided URL is invalid or not supported
403 INVALID_KEY The API key is invalid or not found
403 KEY_EXPIRED The API key has expired
429 RATE_LIMIT Rate limit exceeded for this API key
500 SERVER_ERROR Internal server error
502 PLATFORM_ERROR Error fetching data from the target platform
Tip: Always handle errors in your application to provide a better user experience. Check for the success property in the response to determine if the request was successful.

Rate Limits

To ensure fair usage and service stability, API requests are subject to rate limiting. Rate limits vary based on your API key tier:

Tier Requests per Minute Requests per Hour Requests per Day
Basic 30 300 1,000
Premium 60 1,000 10,000
Enterprise 200 5,000 100,000

If you exceed your rate limit, the API will return a 429 Too Many Requests status code. For applications requiring higher limits, please contact us for custom plans.

Best Practice: Implement caching mechanisms in your application to reduce redundant API calls for the same media URLs.

Code Examples

Below are examples of how to integrate the API in different programming languages:

// PHP Example $apiKey = 'YOUR_API_KEY'; $mediaUrl = 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'; $apiUrl = "https://aioapi.online/down?key={$apiKey}&url=" . urlencode($mediaUrl); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $apiUrl); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); $response = curl_exec($ch); curl_close($ch); $data = json_decode($response, true); if ($data && $data['success']) { echo "Title: " . $data['data']['title'] . "\n"; echo "Video URL: " . $data['data']['video'] . "\n"; } else { echo "Error: " . ($data['error']['message'] ?? 'Unknown error'); }
// JavaScript (Browser) Example const apiKey = 'YOUR_API_KEY'; const mediaUrl = 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'; const apiUrl = `https://aioapi.online/down?key=${apiKey}&url=${encodeURIComponent(mediaUrl)}`; fetch(apiUrl) .then(response => response.json()) .then(data => { if (data && data.success) { console.log('Title:', data.data.title); console.log('Video URL:', data.data.video); } else { console.error('Error:', data.error?.message || 'Unknown error'); } }) .catch(error => { console.error('Fetch error:', error); }); // Node.js Example (using node-fetch) const fetch = require('node-fetch'); const apiKey = 'YOUR_API_KEY'; const mediaUrl = 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'; const apiUrl = `https://aioapi.online/down?key=${apiKey}&url=${encodeURIComponent(mediaUrl)}`; fetch(apiUrl) .then(response => response.json()) .then(data => { if (data && data.success) { console.log('Title:', data.data.title); console.log('Video URL:', data.data.video); } else { console.error('Error:', data.error?.message || 'Unknown error'); } }) .catch(error => { console.error('Fetch error:', error); });
# Python Example import requests api_key = 'YOUR_API_KEY' media_url = 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' api_url = f'https://aioapi.online/down?key={api_key}&url={requests.utils.quote(media_url)}' response = requests.get(api_url) data = response.json() if data and data.get('success'): print(f"Title: {data['data']['title']}") print(f"Video URL: {data['data']['video']}") else: error_message = data.get('error', {}).get('message', 'Unknown error') print(f"Error: {error_message}")
# cURL Example curl -X GET "https://aioapi.online/down?key=YOUR_API_KEY&url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DdQw4w9WgXcQ"

Supported Platforms

The API currently supports the following platforms:

YouTube

Supports videos, shorts, and playlists. Returns multiple quality options and audio extraction.

Example URL:
https://youtube.com/watch?v=dQw4w9WgXcQ
TikTok

Supports videos with and without watermark. Returns video and audio streams.

Example URL:
https://www.tiktok.com/@username/video/1234567890123456789
Instagram

Supports posts, reels, and stories. Returns all available media from carousel posts.

Example URLs:
https://www.instagram.com/p/ABC123/ https://www.instagram.com/reel/ABC123/
Twitter/X

Supports tweets with videos and GIFs. Returns HD and SD quality options.

Example URL:
https://twitter.com/username/status/1234567890123456789
Facebook

Supports videos from posts, reels, and stories. Returns HD and SD quality options.

Example URLs:
https://www.facebook.com/username/videos/1234567890123456 https://fb.watch/abcd1234/
Terabox

Supports file downloads from Terabox cloud storage.

Example URL:
https://terabox.com/s/1abcdefghijklm
Likee

Supports videos with and without watermark.

Example URL:
https://likee.video/@username/video/1234567890123456

Frequently Asked Questions

Always check the success property in the API response. If it's false, the error object will contain details about what went wrong. Implement proper error handling in your application to provide meaningful feedback to your users.

No, the API can only download publicly available content. Private, age-restricted, or geographically restricted content cannot be accessed by the API.

Implement a caching mechanism in your application to store API responses for previously requested URLs. Consider using Redis, Memcached, or even a simple database to store responses. Set an appropriate TTL (time-to-live) for cache entries (e.g., 24 hours) to ensure your users get fresh content when needed.

If you receive a 429 error, implement an exponential backoff strategy before retrying. If you consistently hit rate limits, consider upgrading your API plan or optimizing your application to reduce unnecessary calls.

Download URLs provided by the API are typically valid for 24-48 hours, depending on the platform. For optimal user experience, we recommend downloading the media as soon as possible after receiving the API response or implementing a system to refresh URLs if needed.