Getting Started with the FastSaver API
The FastSaver API turns a public social media link into a file URL. One GET, one flat JSON response, six platforms: TikTok, Instagram, YouTube, Facebook, X and Pinterest. It is the same engine behind fastsaver.io and @fastsaver_bot.
auth
Get a key at api.fastsaver.io. Send it on every request as a header:
X-Api-Key: YOUR_KEY
Keep the key on your server. A browser bundle or mobile app leaks it in one network tab. Proxy through your own backend, and load the key from an environment variable. One key works for every endpoint, including the two YouTube calls. A missing header is the most common first-request bug.
the call
Every platform except YouTube uses the same endpoint. It is a GET with the post link in the url parameter. Encode the link. Short links such as vm.tiktok.com or pin.it work as pasted; the API follows the redirect.
curl "https://api.fastsaver.io/v1/fetch?url=https%3A%2F%2Fwww.tiktok.com%2F%40nba%2Fvideo%2F7302394762168954158" \
-H "X-Api-Key: YOUR_KEY"
javascript
const link = 'https://www.instagram.com/reel/DRVO0TKkWPD/';
const res = await fetch(
'https://api.fastsaver.io/v1/fetch?url=' + encodeURIComponent(link),
{ headers: { 'X-Api-Key': process.env.FASTSAVER_KEY } }
);
const data = await res.json();
if (!data.ok) throw new Error(data.detail);
console.log(data.type, data.download_url);
python
import os, requests
r = requests.get(
'https://api.fastsaver.io/v1/fetch',
params={'url': 'https://www.instagram.com/reel/DRVO0TKkWPD/'},
headers={'X-Api-Key': os.environ['FASTSAVER_KEY']},
timeout=30,
)
data = r.json()
if data['ok']:
print(data['type'], data['download_url'])
else:
print(r.status_code, data['detail'])
the response
{
"ok": true,
"id": "7302394762168954158",
"source": "tiktok",
"type": "video",
"download_url": "https://…/video.mp4",
"thumbnail_url": "https://…/cover.jpg",
"width": 1080,
"height": 1920,
"duration": 27,
"caption": "this transition took 3 hours",
"music_url": "https://…/sound.mp3"
}
- type is video, image or album.
- download_url is the file. Fetch it promptly. Do not store the link for next week.
- items[] appears on albums: one entry per slide, each with type, download_url, thumbnail_url, width and height.
- music_url is TikTok only: the sound as mp3.
- caption, duration (seconds), width, height and thumbnail_url feed your preview card.
- source names the platform, and id is the post id. Handy for dedupe keys.
Every field is top-level. There is no nested media list to walk unless type is album. Hand download_url to your user, or stream it through your server and save it under your own filename.
YouTube has formats, so it is two calls: list them, then request one. The YouTube API guide shows both. Albums are covered in the Instagram guide, the sound field in the TikTok guide.
errors
{ "ok": false, "detail": "fetch.failed" }
- 401: missing or wrong key. Check the header before anything else.
- 400: bad url, or no credits left. Read detail.
- 429: too many requests this minute. Wait a bit, then retry.
- fetch.failed: the post is private, removed or blocked. Not retryable. Tell the user.
Branch on ok. Show detail to humans, or map it to your own copy. Log source next to every failure. A spike on one platform usually means an upstream change, not a bug on your side.
credits and pricing
Every new key starts with 1,000 free credits. Paid plans start at $9/month; see pricing. To make credits last: dedupe repeated links for a minute and fetch only when a user acts. Never retry fetch.failed.
Wondering what to ship? Here are six things developers build on a download API.
frequently asked questions
- Can I call /v1/fetch from browser JavaScript?
- No. Your key would be visible to anyone who opens devtools. Call it from your backend and expose your own thin endpoint to the browser.
- What does fetch.failed mean?
- The post could not be fetched: private account, removed post, or the platform refused. Retrying will not help. Show the user a clear message.
- Which errors are safe to retry?
- 429 after a short wait. Nothing else. 401 and 400 mean the request itself is wrong, and fetch.failed means the post is unreachable.
- Do I need different code per platform?
- No. Same GET, same fields, for TikTok, Instagram, Facebook, X and Pinterest. Only YouTube adds a second call to pick a format.