Get YouTube video transcripts as Markdown
A YouTube transcript API call is the same Markdown request you use for web pages: point it at a video URL and the caption transcript comes back as Markdown. Talks, tutorials, podcasts and interviews carry knowledge that never reaches a search index because it is spoken, not written. As text, it is ready for summaries, embeddings, show notes and study guides.
YouTube videos are opaque to text pipelines
A summarizer or a RAG index cannot read a video. The knowledge in a conference talk or a product walkthrough stays out of reach of search, of your support bot and of the model you want to ask about it.
Turning a YouTube video to text yourself means downloading the media and running speech recognition: minutes of compute per video, a model to host and transcripts that stumble over names and technical terms. The captions that already exist on YouTube would be better, but they sit behind a player and behind bot protection.
Microlink recognizes YouTube watch, youtu.be, shorts and embed URLs and returns the video’s caption transcript as the Markdown body, with the title, author, image and date resolved from the video metadata. YouTube blocks automated access, so the request goes through the built-in proxy, a Pro capability.
How to get a YouTube transcript as Markdown
The transcript uses the same Markdown rule as any page, as the URL to Markdown guide shows. Add proxy so the request reaches YouTube, and keep the metadata when you want the title and author alongside.
import createClient from 'microlink.io'
const microlink = createClient({
apiKey: process.env.MICROLINK_API_KEY
})
const transcript = await microlink.markdown(
'https://www.youtube.com/watch?v=tY2M2g-tG1Q',
{ proxy: true }
)The call resolves to a string: the caption transcript of the video as Markdown. proxy: true routes the request through automatic proxy resolution so it reaches YouTube.
import createClient from 'microlink.io'
const microlink = createClient({
apiKey: process.env.MICROLINK_API_KEY
})
const { title, author, date, transcript } = await microlink.metadata(
'https://youtu.be/tY2M2g-tG1Q',
{
proxy: true,
data: { transcript: { attr: 'markdown' } }
}
)Name the rule transcript and it rides along with the normalized video fields, so one request gives you the text plus the title, channel and publication date to cite it with.
curl 'https://pro.microlink.io/?url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DtY2M2g-tG1Q&data.transcript.attr=markdown&meta=false&proxy=true' \
-H 'x-api-key: $MICROLINK_API_KEY'The URL form targets the pro endpoint because proxy is a Pro option. Read the transcript from data.transcript in the JSON response, or add embed=transcript to receive it directly as the response body.
- data data.transcript.attr=markdown asks for the caption transcript as the Markdown body.
- proxy Required for YouTube, which blocks automated access. Pro plans.
- meta true keeps the video title, author, image and date. false returns the transcript alone. Default true.
- embed Return the transcript field directly as the response body instead of JSON.
- ttl Transcripts rarely change, so cache them for up to 31 days. Pro plans.
The transcript is in the video’s own caption language: manual subtitles when the creator provided them, otherwise the auto-generated ones. Videos without captions, live streams and private videos return the standard metadata without a transcript body, so check the field before you index it.
Why YouTube captions beat speech recognition for transcripts
The transcript already exists. Reusing it is faster and cheaper than transcribing the audio again, and it is often more accurate.
The request shape is the same as any other Markdown API conversion. Only the URL is a video, so a transcript drops straight into LLM context built from a URL.
Keep the metadata when your pipeline routes documents by author or date. Markdown with metadata frontmatter shows how to attach it to the file itself.
When not to: videos without captions, live streams and private videos return metadata only. For those, a speech-to-text step is still required.
FAQ
How do I get the transcript of a YouTube video as Markdown?
Which YouTube URLs return a Markdown transcript?
Why does my YouTube Markdown request fail with EPROXYNEEDED?
What language is the YouTube Markdown transcript in?
What does the Markdown request return for a video with no captions?
Solve the next problem with the same API
Markdown from bot-protected pages
LLM context from any URL
Markdown with metadata frontmatter
PDF and office documents to Markdown
Bulk Markdown conversion with caching
Screenshot blocked websites
Ready to read videos as text?
Transcripts as Markdown from any YouTube URL, with the title and author attached. Get a Pro key and index your first talk today.