Formats

YouTube links with MarkItDown

Updated 2026-11-16·Upstream source ↗
Markdown view

Give MarkItDown a YouTube address and it tries to return the video's title, description and transcript. From a cloud runner we got a transcript for one of seven links; the other six printed the text of the YouTube page footer. We did not find out why, so this page reports what happened and cannot tell you what will happen for your link.

Short answer

Install the extra and pass the address:

Command
pip install "markitdown[pdf]"

(Use youtube-transcription instead of pdf, and a YouTube address instead of a file.) Check the output for a ### Transcript section: a result with exit code 0 and no transcript is not an error to MarkItDown.

Tested with markitdown 0.1.9 · Python GitHub-hosted Ubuntu runner (a datacenter address), Python 3.13, markitdown 0.1.9, one run per link (T19). Results from a home connection may differ · 2026-11-16 · evidence: audio-youtube.csv, ubuntu-latest-youtube.json

What we ran

Seven YouTube links, from a GitHub runner on 2026-11-15
LinkRouteResultSecondsOutput size
short-video-with-captionscommand linepage text only2.7754 characters, exit 0
popular-music-videocommand linetranscript2.85084 characters, exit 0
short-urlcommand linepage text only1.8754 characters, exit 0
nonexistent-idcommand linepage text only1.3754 characters, exit 0
playlist-urlcommand linepage text only1.5786 characters, exit 0
shorts-urlcommand linepage text only2.2754 characters, exit 0
language-esPython APIpage text only3.0754 characters, exit 0
Seven YouTube links, from a GitHub runner on 2026-11-15 Source: Test T19 · Ubuntu runner · markitdown 0.1.9 · audio-youtube.csv · Download CSV

The one transcript was for a very popular music video, returned as 5,084 characters under a # YouTube heading. The others, including a classic short video, a short URL, a Shorts URL and a playlist, returned a 754-character page footer; a non-existent video ID did the same, so a missing transcript and a missing video look alike.

The raw test record
{
 "label": "ubuntu-latest",
 "phase": "youtube",
 "no_ffmpeg": false,
 "date": "2026-11-15",
 "python": "3.13.18",
 "platform": "Linux-7.0.0-1019-azure-x86_64-with-glibc2.43",
 "ffmpeg": "/usr/bin/ffmpeg",
 "rows": [
  {
   "file": "short-video-with-captions",
   "exit": 0,
   "seconds": 2.7,
   "chars": 754,
ubuntu-latest-youtube.json · 8,807 bytes · first 14 of 102 lines shown output (.md)

What this means

Exit code 0 does not mean you got a transcript. A script should check for the Transcript heading. We did not test other addresses, other networks, language options, or the dependency versions that the upstream reports blame for some failures (error index).

Error messages seen upstream

Two messages are reported upstream for YouTube links. We did not see either in our runs, so we have no verified fix for them.

Attempt 1 failed: no element found

Not yet tested · fixed in 0.1.8

Attempt 1 failed: no element found: line 1, column 0

An outdated youtube-transcript-api.

Fix

  • Upgrade to markitdown 0.1.8 or newer (requires youtube-transcript-api 1.2.3 or newer).

Affected: before 0.1.8 · Upstream report

'YouTubeTranscriptApi' object has no attribute 'fetch'

Not yet tested · fixed in 0.1.8

'YouTubeTranscriptApi' object has no attribute 'fetch'

An old youtube-transcript-api combined with a newer markitdown.

Fix

  • Upgrade youtube-transcript-api, or install markitdown 0.1.8 or newer in a clean environment.

Affected: mixed versions · Upstream report