BlogCore API

YouTube Shorts Transcript API: Get the Text From a Shorts Link

Shorts links trip up watch-link parsers, many have only auto-generated captions and some have none. Get a timestamped transcript from any Shorts link in one call.

On this page6 sections

Trend trackers, UGC and creator tools, repurposing apps and AI note-takers all end up with a pile of youtube.com/shorts/… links and want the words in each one. Shorts look simple, but they trip up the usual transcript code:

  • The link isn't a watch link. A lot of code only parses watch?v= or youtu.be links and rejects /shorts/ URLs, or builds the wrong request from them.
  • Many Shorts have no uploaded captions. Most have auto-generated ones, some have none at all (music, sound effects, very new uploads), and code that only reads captions comes back empty.
  • It breaks on the server. Transcript code that works from your laptop gets blocked or asked to sign in from AWS, Fly, a Vercel function or an agent sandbox.

Doing it yourself

A Short's ID is a normal YouTube video ID: youtube.com/shorts/<id> and youtube.com/watch?v=<id> are the same video. So the free route is to pull the ID out of the path and pass it to a transcript library such as youtube-transcript-api (Python) or one of the Node ports. For a script on your own machine that's the right answer, and it costs nothing. It needs a fallback for Shorts with no captions, and it's the same code that stops working once it runs on a cloud server.

One call with Importly

Send the Shorts link as your user pasted it, with "mode": "auto". If the Short has captions, uploaded or auto-generated, you get them; if it has none, speech-to-text runs in the same request. "wait": true returns the finished transcript in the response:

bash
curl -X POST https://api.importly.io/transcribe \
  -H "Authorization: Bearer $IMPORTLY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://www.youtube.com/shorts/<id>",
    "mode": "auto",
    "wait": true,
    "maxCostDollars": 0.1
  }'

You get the full text plus timestamped segments:

json
{
  "text": "...",
  "source": "platform_captions",
  "captionKind": "auto",
  "language": "en",
  "duration": 39,
  "data": {
    "segments": [
      { "start": 0.0, "end": 2.4, "text": "..." }
    ]
  },
  "costInDollars": 0.003
}

captionKind tells you whether the captions were uploaded (manual) or generated by YouTube (auto), which is worth knowing if you quote them. When there were no captions, source is importly and the text came from speech-to-text. The shape is the same either way. Details are in the transcripts docs.

A few things worth knowing:

  • Any YouTube link shape works. /shorts/, watch?v=, youtu.be and m.youtube.com links all go to the same place, so you don't need to normalize them first.
  • Private and removed Shorts fail with a clear code, so you can tell the user instead of retrying. Failed transcriptions are refunded.
  • Other languages: pass language, such as es, to pick a caption track or tell speech-to-text what it's hearing. Built-in speech-to-text assumes English unless you set it.
  • Many Shorts at once: send one request per link with a webhookUrl instead of wait, and collect each transcript as it finishes.

What it costs

  • From captions, uploaded or auto-generated: $0.003 per Short.
  • Speech-to-text, when a Short has no captions: $0.01 per started minute, fetching included, with a $0.01 minimum. Most Shorts are under a minute, so that's $0.01.
  • maxCostDollars caps a request, so a link that turns out to be a long video fails instead of running over.

It's free to try, no card required. See pricing.

The video too

If your app keeps the clip, POST /import with "includeTranscript": true returns the MP4 and the transcript in one job, or puts the file straight into your own S3, R2 or B2 bucket. See the downloads docs.

Have your AI agent build it in

Connect https://mcp.importly.io/mcp to Claude Code, Cursor or another coding agent and ask it to add Shorts transcripts to your app. It gets working code for your stack, writes the integration and tests real calls with your API key, and your backend uses the same key. The steps are in Have your agent build Importly into your app.

FAQ

Can I get a transcript from a YouTube Short?

Yes. A Short is a regular YouTube video with its own ID, so it has the same caption tracks a normal video would. Send the /shorts/ link to Importly, or pass the ID to a transcript library if you're running locally.

Do YouTube Shorts have captions?

Many have auto-generated captions, some have uploaded ones, and some have none, often music-only clips or very new uploads. With "mode": "auto", Shorts without captions go to speech-to-text in the same request.

Can I check a Short before paying?

Yes. POST /metadata/basic returns the title and duration for $0.003. See the video metadata API post.

Why does my transcript script work locally but fail on my server?

YouTube blocks or challenges a lot of datacenter traffic, so the same code that works at home fails from cloud servers and sandboxes. Importly works the same from a server as from your laptop.

Related: Best YouTube transcript API, TikTok transcript API, Instagram reel transcript API.

Keep reading

Put video and audio links to work in your app

One API for files, transcripts and metadata. Free to try, no card required.

Try free →