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.
curl -X POST https://api.example.com/v1/videos/process \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://www.tiktok.com/@charlidamelio/video/7341234567890123456",
"ffmpeg": "-vf "scale=1280:720" -c:a copy output.mp4"
}'
const response = await fetch('https://api.example.com/v1/videos/process', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
url: 'https://www.tiktok.com/@charlidamelio/video/7341234567890123456',
ffmpeg: '-vf "scale=1280:720" -c:a copy output.mp4'
})
});
const data = await response.json();
console.log(data);
import requests
response = requests.post(
'https://api.example.com/v1/videos/process',
headers={
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
json={
'url': 'https://www.tiktok.com/@charlidamelio/video/7341234567890123456',
'ffmpeg': '-vf "scale=1280:720" -c:a copy output.mp4'
}
)
print(response.json())
{
"id": "proc_abc123def456",
"status": "processing",
"url": "https://api.example.com/v1/videos/proc_abc123def456/status",
"output_url": null
}
{
"error": "Invalid URL or unsupported platform"
}
curl -X POST https://api.example.com/v1/videos/process \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://www.instagram.com/reel/C1234567890/",
"ffmpeg": "-ss 00:00:10 -t 30 -vf scale=1080:1920 output.mp4"
}'
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.)
Sign Up and Get Your API Key
Create your FetchMedia account and obtain an API key to authenticate requests.
Create Account
Visit https://dashboard.example.com 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).
Store your API key securely. Use environment variables in production: FETCHMEDIA_API_KEY.
Fetch and Process Your First Video
Send a POST request to https://api.example.com/v1/videos/process with the social media URL and optional FFmpeg processing commands.
Use the examples below for TikTok or Instagram. Replace YOUR_API_KEY and the video URL.
Bearer token: Bearer YOUR_API_KEY
Full social media video URL (TikTok, Instagram, YouTube, etc.).
FFmpeg command string for processing (e.g., trimming, scaling, overlays).
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 output_url.
// Poll example
const pollStatus = async (id) => {
const status = await fetch(`https://api.example.com/v1/videos/${id}/status`, {
headers: { 'Authorization': 'Bearer YOUR_API_KEY' }
});
const data = await status.json();
if (data.status === 'completed') {
console.log('Download:', data.output_url);
}
};
Next Steps
Authentication
Advanced auth methods and webhooks.
FFmpeg Guide
Powerful video editing commands.
Integrations
Connect with n8n, Make, and more.
Congratulations! You've fetched and processed your first video. Check your dashboard at https://dashboard.example.com for usage stats.
Last updated today