YouTube Shorts Downloader API

One authenticated POST turns any YouTube Shorts URL into a saved MP4 — quality selector up to 720p, direct video link, and metadata as clean JSON.

  • One REST Endpoint
  • Every Shorts URL Shape
  • Quality Selector
  • Normalized Metadata
  • Idempotent Billable Writes
  • Predictable Error Codes

Request examples

curl -X POST "https://api.agentbody.io/v1/youtube/video/download" \
  -H "Authorization: Bearer <YOUR_AGENTBODY_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{"quality":"144p","url":"YOUR_URL"}'

Response examples

Documented responses from the OpenAPI specification.

Downloaded YouTube media link and normalized public video metadata.

{
  "duration_seconds": 180,
  "format": "mp4",
  "quality": "720p",
  "size_mb": 15.2,
  "title": "Example Video",
  "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
  "video_content_type": "video/mp4",
  "video_id": "dQw4w9WgXcQ",
  "video_url": "https://api.apify.com/v2/key-value-stores/example/records/dQw4w9WgXcQ.mp4"
}

Features

Use the YouTube Shorts Downloader API for repurposing pipelines, content research, and archiving systems — Shorts URL in, MP4 link out.

One REST Endpoint

Call POST /v1/youtube/video/download with a bearer API key and the Shorts URL. The API saves the MP4 and returns a direct link — no headless browser, no format negotiation, no scraping stack.

Every Shorts URL Shape

youtube.com/shorts/ links, youtu.be links, app share links, and watch URLs pointing at Shorts all resolve. Your integration accepts whatever users paste without a normalization step.

Quality Selector

Pass the quality field with 144p, 240p, 360p, 480p, or 720p. Each request pins the exact output, and the response confirms the quality, format, and size delivered.

Normalized Metadata

Every response pairs the video_url with video_id, title, duration_seconds, format, quality, size_mb, and video_content_type — stable fields your pipeline stores without per-request parsing.

Idempotent Billable Writes

Video saves are metered. Send an Idempotency-Key header on retries so an interrupted response does not double-bill the same Short — repeated identical requests with one key return the original result.

Predictable Error Codes

Documented status codes: 400 invalid request, 401 missing or bad key, 409 idempotency conflict, 502/503/504 temporary upstream issues — each maps to a distinct fix or retry action.

How to use

Follow these steps to call the YouTube Shorts Downloader API: create a key, build the POST request, and process the returned MP4 link.

01

Create An API Key

Create an AgentBody account and generate an API key in the console. Keep the key server-side and send it as a bearer token — never in browser code or client bundles.

02

Build The Request

Send POST /v1/youtube/video/download with the required Shorts url and an optional quality. The generated examples show the exact request in curl, JavaScript, Python, Java, and Go.

03

Add An Idempotency Key

Attach an Idempotency-Key header to every download you might retry. Repeated identical requests with the same key return the original response without re-billing.

04

Keep The Key Server-Side

Call the endpoint from your backend, a serverless function, or a scheduled job. If end users trigger downloads, proxy through your own endpoint so the key and billing stay under your control.

05

Parse The JSON Response

Read the returned video_url, video_id, title, duration_seconds, format, quality, and size_mb. Store the link with its metadata — the fields are stable across requests.

06

Handle Errors Correctly

Fix 400 by correcting the request, 401 by configuring a valid key, and follow the documented Idempotency-Key behavior on 409. Retry 502/503/504 with backoff under the same key.

Frequently asked questions

What is the YouTube Shorts Downloader API?

An authenticated POST endpoint, /v1/youtube/video/download, that saves one public YouTube Short as an MP4 and returns a direct video link with normalized metadata — video_id, title, duration, format, quality, and size — as structured JSON.

Which Shorts URL formats does the API accept?

youtube.com/shorts/VIDEO_ID links, youtu.be short links, app share links, and standard watch URLs pointing at a Short — all resolve through the same request shape.

What's the maximum quality?

720p. The quality field accepts 144p, 240p, 360p, 480p, and 720p — no 1080p or 4K tier exists on this endpoint. The response reports the quality actually delivered.

How does pricing work?

Each video save is a metered operation on your account's credits. Pricing is gateway-governed rather than fixed on this page — check the console, and use idempotency keys so retries never double-bill.

Can it download private or removed Shorts?

No. The endpoint reads public Shorts only — private, members-only, and removed content will not resolve, and no YouTube credentials are requested to work around the limit.

How do I handle API errors?

Correct the request on 400, fix the bearer key on 401, and follow the documented Idempotency-Key behavior on 409. Treat 502, 503, and 504 as temporary upstream failures and retry with backoff under the same key.