Download TikTok, Instagram & YouTube Video API

Returns direct media URLs for a tracked post, the video file, or slideshow images with positions. Accepts a public post URL or an internal post id. When media is not stored yet it queues an on-demand fetch and returns a jobRef to poll (typically ready within ~90 seconds); call again once complete. Platform CDN URLs can expire, so download promptly. YouTube currently returns the thumbnail image. You are responsible for using downloaded media in line with the platforms' terms and applicable law.

Get the raw media behind any tracked post (the video file for TikTok Reels/Shorts, or the ordered image URLs for a slideshow carousel) through a single API call, with no proxies, headless browsers, or fragile scraping code on your side. Built for AI agents and automations that need the source footage to transcribe, remix, archive, or repurpose it.

3 credits ($0.03) per callAsynchronous (poll job)

How to call it

POST /api/v1/posts/media. Authenticate with your API key. Same call in three languages:

cURL

curl -X POST "https://viraloutliers.com/api/v1/posts/media" \
  -H "Authorization: Bearer so_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"example","postId":"example"}'

Python (requests)

import requests

r = requests.post(
"https://viraloutliers.com/api/v1/posts/media",
    headers={"Authorization": "Bearer so_live_YOUR_KEY"},
    json={"url":"example","postId":"example"},
)
print(r.json())

JavaScript (fetch)

const res = await fetch("https://viraloutliers.com/api/v1/posts/media", {
  method: "POST",
  headers: { "Authorization": "Bearer so_live_YOUR_KEY", "Content-Type": "application/json" },
  body: JSON.stringify({"url":"example","postId":"example"}),
});
const data = await res.json();
console.log(data);

Parameters

NameTypeDescription
urlstringPublic post URL. The easy path when you have a link.
postIdstringInternal post id. Provide this or url.

What it returns

For a video post you get a direct, downloadable media URL to the source file. For a slideshow (TikTok photo carousel / Instagram carousel) you get the image URLs in order, each with its position, so you can rebuild the sequence. YouTube posts return the thumbnail image.

When the media is already stored the call returns it immediately. When it is not, the endpoint queues an on-demand fetch and returns a job reference: poll it and call again once complete (typically within ~90 seconds). Platform CDN URLs are signed and expire, so download the file promptly after you receive it.

How it works

Every tracked post is addressable by an internal id, or by its public URL via resolve_post_url. On a cache miss the service fetches the media through the same provider infrastructure that powers the rest of the platform, stores it, and hands you the link, so a second request for the same post is instant and costs nothing extra. You never manage proxies, rotate user agents, or parse HTML; you make one authenticated request and get a URL.

Common use cases

Content-repurposing agents download the source video to run their own editing, subtitling, or format conversion. Research tools archive the raw footage of viral outliers before it is deleted. Transcription pipelines pull the media to feed a speech-to-text model (or just use request_transcript, which does this for you). Slideshow tools grab the ordered images to rebuild or remix a carousel.

vs. building your own downloader

Rolling your own TikTok/Instagram media downloader means running rotating proxies, defeating bot detection, keeping up with signature changes on the CDN, and handling HEIC/animated-cover quirks, a maintenance treadmill that breaks every time a platform ships a change. This endpoint absorbs all of that: you pay a flat, predictable credit price per fetch, cached results are free, and there is nothing to maintain. Compared with generic scraper marketplaces, the media here is already tied to a rich analytics record (views, outlier score, transcript, profile) so you can filter and act on it in the same system.

You are responsible for using downloaded media in line with the platforms’ terms of service and applicable law.

Pricing

3 credits ($0.03) per call in prepaid credits (1 credit = $0.01). For example, 33 calls per dollar. Subscriptions include monthly credits; top-up packs start at $15. Failed asynchronous jobs are refunded automatically, and calls stop at a zero balance, never a surprise bill. See the full pricing table.

Agent workflows

  • Repurposing pipeline: resolve URL → download media → run your own editing/rendering over the source video.
  • Archival: search outliers in a niche → download the media of the top performers before they are deleted.

Frequently asked questions

How can an AI agent download a TikTok video or Instagram slideshow?

Call download_post_media with the post id (resolve_post_url first if you only have a link). Stored media returns immediately; otherwise a fetch is queued and usually ready within ~90 seconds. Slideshows come back as ordered image URLs.

Why did my media URL stop working?

Platform CDN links are signed and expire. Download the file promptly after fetching; if a link has expired, call download_post_media again for a fresh fetch.

Is there a free TikTok video download API?

The download itself costs a small prepaid credit amount per fetch (cached re-fetches are free), and every subscription includes monthly credits. There is no signup required beyond an API key, and calls stop at a zero balance so you never get a surprise bill.