# Get a YouTube Shorts transcript and read its hook

> Get a YouTube Short's transcript from its link, in the playground or one API call, read the first line as the hook, and get on-screen text.

Updated 2026-10-06. HTML: /blog/youtube-shorts-transcript

To get the transcript of a YouTube Short, paste its link into the [playground](/playground) or send it in one request. You get the full text, and its first line is the hook.

```bash
curl -G https://api.cleanscript.ai/v1/transcript \
  -H "Authorization: Bearer $CLEANSCRIPT_API_KEY" \
  --data-urlencode "url=https://www.youtube.com/shorts/VgSFtZ7UGCE"
```

```python
# pip install cleanscript-ai
from cleanscript_ai import CleanScript

client = CleanScript()
result = client.transcript("https://www.youtube.com/shorts/VgSFtZ7UGCE")
print(result.text)
```

Every form of the link works: `youtube.com/shorts/VgSFtZ7UGCE`, `youtu.be/VgSFtZ7UGCE`, `youtube.com/watch?v=VgSFtZ7UGCE`, or just `VgSFtZ7UGCE`.

## An example

NASA's [#PassThePhone with NASA and CSA's Artemis II Lunar Flyby Astronauts](https://www.youtube.com/watch?v=VgSFtZ7UGCE) runs 38 seconds. NASA wrote its own captions, so they come back as written (`source: "creator"`). The text starts:

> I'm passing the phone to someone with an infectious smile, who has done four spacewalks. I'm passing the phone to someone who is a great surfer. I'm passing the phone to a great friend and Mr. Cool, Calm, and Collected Canadian astronaut.

The hook is the first sentence, and the whole Short repeats its pattern: "I'm passing the phone to". Seeing that structure without watching again is what a transcript is for.

Many Shorts have only automatic captions. This one's automatic track reads `and Mr cool calm and collected Canadian`; that is what CleanScript corrects when there is nothing better (`source: "auto"`). See [how auto captions get cleaned](/blog/clean-youtube-auto-captions).

## What's different about a Short

**The opening is most of it.** Read the first line as the hook. For its exact times, add `include=["lines"]` and look at the first line's `start` and `end`. A Short usually comes back as one section.

**It can run longer than you think.** YouTube allows Shorts [up to three minutes](https://support.google.com/youtube/answer/15424877). `post.duration` has the length.

**On-screen text isn't in the captions.** Many Shorts print the hook over the first frames. When a Short has no speech, the text on screen comes back in `on_screen_text` automatically. When it has speech, add `include=["on_screen_text"]` to get both; that adds 1 credit.

**No captions isn't an error.** Without usable captions, we transcribe the audio (`source: "transcribed"`). A Short with only music returns empty `text` and a `no_speech` warning.

## Go further

- Break a Short down as an ad: [hook, offer and call to action](/blog/video-ad-breakdown-hook-offer-cta).
- Get the hook's exact times: [YouTube transcript as JSON with timestamps](/blog/youtube-transcript-json-timestamps).
- Short videos elsewhere: [TikTok transcripts](/blog/tiktok-transcript-api) and [Instagram Reels](/blog/instagram-reels-transcript).
