Skip to content
Markdown API · Use case

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.

The problem

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 it works

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.

1 · Transcript with the SDK
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.

2 · Transcript plus video metadata
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.

3 · The same request as a URL
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.

Parameters used
  • 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 it works

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.

01 · No media pipeline
No download, no audio model, no GPU.
Speech-to-text needs the media file, a model and minutes of compute per video. The caption track is text that YouTube already serves, and Microlink fetches it and formats it as Markdown in one request.

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.

02 · Creator captions when available
Manual subtitles are used before auto-generated ones.
When the creator uploaded subtitles, the transcript uses them, which usually means correct names, terms and punctuation. Auto-generated captions are the fallback, so a video without manual subtitles can still return a transcript.

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.

03 · Same shape as articles
A talk becomes a document like any other.
The transcript arrives as Markdown with the video title, author and date, so the same chunker, embedder and summarizer handle videos and articles alike. Cached transcripts do not count against your quota when you read them again.

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?

Send the video URL with a Markdown rule, for example data.transcript.attr=markdown, and proxy=true on a Pro plan. Microlink resolves the video and returns its caption transcript as Markdown, with the title, author, image and date when meta is on.

Which YouTube URLs return a Markdown transcript?

Standard watch URLs, youtu.be share links, shorts and embed URLs. All of them resolve to the same video, so the transcript is identical whichever form your users paste.

Why does my YouTube Markdown request fail with EPROXYNEEDED?

YouTube uses antibot protection, so the request needs the built-in proxy. Add proxy: true on a Pro plan. The free endpoint surfaces the signal but cannot route through the proxy, the same behavior described in Markdown from bot-protected pages.

What language is the YouTube Markdown transcript in?

The video’s own caption language: manual subtitles when the creator provided them, otherwise the auto-generated captions. The transcript is not translated, so a Spanish talk returns Spanish text.

What does the Markdown request return for a video with no captions?

The request succeeds and returns the standard video metadata, but there is no transcript body. Live streams and private videos behave the same way, so check the field before passing it to a summarizer. For a playlist or a channel, run the URLs through bulk Markdown conversion.
Related use cases

Solve the next problem with the same API

Markdown from bot-protected pages

Convert pages behind Cloudflare, DataDome or Akamai: one option routes the request through the built-in proxy.

LLM context from any URL

Compose Markdown, links, emails, metadata and tech stack from one URL into a context object for your agent.

Markdown with metadata frontmatter

Get each page as Markdown with a YAML frontmatter block: title, author, date, word count and reading time.

PDF and office documents to Markdown

Convert PDF, DOCX, XLSX and PPTX URLs to readable Markdown with the same request you use for web pages.

Bulk Markdown conversion with caching

Convert thousands of URLs in parallel, cached per URL and refreshed in the background for cheap re-indexing.

Screenshot blocked websites

When a site blocks headless browsers, one option routes the capture through a managed, rotating proxy pool.

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.