Quickstart Guide
Get started with FetchMedia in under 5 minutes by making your first API call to fetch and process a video from a social media link.
Overview
The FetchMedia Fetch API allows you to programmatically fetch media from supported public URLs (for example, video platforms, social networks) and make the resulting files available for download or further processing.
This API is optimized for:
-
Pulling remote media into FetchMedia without manual downloads
-
Inspecting media metadata before fetching
-
Asynchronous processing with webhook notifications
-
Secure, time-limited downloads
All requests require API key authentication via the X-API-KEY header.
Fetch media files CANNOT be used in FetchMedia commands; use files instead.
Prerequisites
Before starting, ensure you have:
-
A FetchMedia account (free tier available)
-
An HTTP client like cURL, Postman, or a programming language with HTTP support
-
A social media video URL (TikTok, Instagram, etc.)
Create Account
Visit https://app.fetchmedia.io and sign up with your email.
Verify Email
Check your inbox and click the verification link.
Generate API Key
Navigate to the API Keys section in your dashboard. Click "Create New Key" and copy the generated key (format: fm_1234567890abcdef).
Fetch a Video
Use this example to fetch and process a TikTok video.
const response = await fetch('https://api.fetchmedia.io/v1/fetch', {
method: 'POST',
headers: {
'X-API-KEY': 'YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
url: 'https://www.tiktok.com/@user/video/123456789'
})
});
const data = await response.json();
console.log(data.fetch_id);
curl -X POST https://api.fetchmedia.io/v1/fetch \
-H "X-API-KEY: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://www.tiktok.com/@user/video/123456789"
}'
import requests
response = requests.post(
'https://api.fetchmedia.io/v1/fetch',
headers={
'X-API-KEY': 'YOUR_API_KEY',
'Content-Type': 'application/json'
},
json={
'url': 'https://www.tiktok.com/@user/video/123456789'
}
)
print(response.json()['fetch_id'])
Poll for Results and Download
The initial response provides a processing ID and status URL. Poll the status endpoint until status is completed, then download from download_url.
// Poll example
const pollStatus = async (id) => {
const status = await fetch(`https://api.fetchmedia.io/v1/fetch/${id}`, {
headers: { 'X-API-KEY': 'YOUR_API_KEY' }
});
const data = await status.json();
if (data.status === 'success') {
console.log('Download:', data.download_url);
}
};
Download Processed Video
Call the download_url and download the file to your desired location.
Congratulations! You've fetched and processed your first video. Check your dashboard at https://app.fetchmedia.io for usage stats.
Last updated Jan 23, 2026
Built with Documentation.AI