Introducing the Instagram APIRead more →

YouTube Download API. Send a video link or ID.

MP4 and audio files of shorts and videos. We handle the proxies, blocks and platform changes.

In your agent: YouTube MCP server →

YouTube Download API at a glance

Returns direct download links for a public YouTube short, video or live replay, from its link or video ID. You get an MP4 with sound, the sharpest video stream and the audio streams, each with its size, resolution, codec and link expiry. The title, channel and publish time come too, and every link is checked to download whole.

GET /v1/youtube/download

Read the API reference
  • 1 credit per request, $0.75–$1.97 per 1,000 requests
  • 14 typed fields null when unknown
  • url is all it needs, e.g. https://www.youtube.com/shorts/3cWm9B_0_kI
  • 100 credits free when you sign up, no card, so you can build before you spend

Send one request. Get 14 fields back.

Copy the request in your language, or hand it to your agent. Sign up for an API key and your first 100 credits are free.

$ npm install socialtap
url = https://www.youtube.com/shorts/3cWm9B_0_kI
GET /v1/youtube/downloadTry in
// Node 18+: save this as app.mjs (an ES module) and run: node app.mjs
const params = new URLSearchParams({
  url: "https://youtube.com/shorts/3cWm9B_0_kI?feature=share",
});
const res = await fetch(`https://socialtap.dev/v1/youtube/download?${params}`, {
  headers: { "x-api-key": process.env.SOCIALTAP_API_KEY ?? "" },
});
const body = await res.json();
if (!res.ok) throw new Error(`${body.error.code}: ${body.error.message}`);
const { data, meta } = body;
console.log(data, meta.credits_charged);
200 OK · GET https://socialtap.dev/v1/youtube/downloadLong arrays and strings are shortened here. Real responses are complete.Docs

One schema on 2 platforms.

The response reference lists every field, its type and when it is null. See the full schema.

  • Null means unknown

    A field YouTube doesn't show is null, never zero or an empty string, so a real zero always means zero.

  • What it accepts

    A YouTube video, short or live link (youtube.com/watch?v=<id>, youtu.be/<id>, /shorts/<id>, /live/<id>, /embed/<id>, /v/<id>, /e/<id>, an attribution_link; m., music., gaming. or youtube-nocookie.com hosts) or an 11-character video ID.

  • Write one parser

    YouTube and TikTok answer in these fields, so the code that reads one reads them all.

platformstring
Platform ID (tiktok, instagram, …).
In the example "youtube"
idstring
Platform-native ID of the post (equals post.id).
In the example "3cWm9B_0_kI"
urlstring
Canonical URL of the post.
In the example "https://www.youtube.com/shorts/3cWm9B_0_kI"
typestring
The post's content shape, as post.type. New values may be added; treat unknown values as other.
In the example "video"
platform_typestring
The platform's own product label, lowercase (reel, short, story, …), as post.platform_type.
In the example "short"
titlestring
Headline (Reddit title, Facebook video title); null on caption-only platforms.
In the example "How Many People To Stop Ronaldo?"
textstring
Caption or body as plain text.
In the example null
authorobject
The posting account.
In the example display_name: "MrBeast", id: "UCX6OQ3DkcsbYNE6H8uQQuVA", url: "https://www.youtube.com/@MrBeast", …

What teams build with the YouTube Download API.

  • Save Shorts as MP4 files

    Send each short's link and download files[0], an MP4 with sound, before its expires_at, along with the title, channel and publish time.

  • Feed clips to vision and speech models

    Pass the audio file's url to your speech-to-text model, or the video stream whose width and height suit your vision model, straight from your server.

  • Archive videos in the best quality

    Download the largest video stream and the audio stream, both marked by is_video_only and type, and join them with ffmpeg into one file.

Good to know before you build.

  • Longer videos usually come as the MP4 with sound only: YouTube serves their separate video and audio streams only in part to logged-out apps, so those have a null url.
  • files[0] is the MP4 with sound when YouTube has one; the larger video streams have no sound, which is the audio file beside them.
  • Links stop working at their expires_at, within hours, and some redirect to another YouTube server: follow redirects when you download.
  • Age-restricted, members-only and paid videos return private_or_unavailable, and a stream still live returns no_media.

1 credit per request. Failed requests are free.

Buy credits once and spend them on any endpoint, on any platform.

SourcePrice per successful requestPer 1,000 requests
Platform API api1 credit$0.75–$1.97
  • Cache hits are free.
  • Credits from packs and top-ups never expire.
  • A monthly plan's credits are spent first, and what is left of them ends at each renewal.
  • Prices exclude tax: sales tax is added at checkout where it applies.
  • Outside the US, plans and packs are sold to businesses: checkout asks for your VAT, GST or other business tax ID.

Questions about the YouTube Download API.

More in the API reference.

Can I download YouTube Shorts with an API?
Yes. Send the short's link and you get an MP4 with sound plus the full-quality video and audio streams, each link checked to download whole.
Do the download links work from my server?
Yes. The links need no cookie or header and work from any IP until their expires_at.
Why is the url of some files null?
YouTube serves the separate video and audio streams of media longer than about a minute only in part to logged-out apps. Those files keep their size and resolution with a null url, and the MP4 with sound still downloads.
How much does the YouTube Download API cost?
A request costs 1 credit. SocialTap credits cost $0.75–$1.97 per 1,000, depending on the plan or pack.

Try it on a link you already have.

Paste it in the playground, or copy the request into your code.

100free credits
  • No credit card
  • Failed requests are free
  • Works on all 310 endpoints
Start for free Read the docs