# YouTube links with MarkItDown

> We gave MarkItDown 0.1.9 seven YouTube links from a cloud runner: one returned a transcript, six returned only page text. What we saw and what to try instead.

Source: https://markitdown.dev/formats/youtube/ · Updated 2026-11-16·Upstream source ↗

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:
> 
> ```bash
> 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](https://markitdown.dev/data/audio-youtube.csv), [ubuntu-latest-youtube.json](https://markitdown.dev/evidence/T19/ubuntu-latest-youtube.json)

## What we ran

Seven YouTube links, from a GitHub runner on 2026-11-15
| Link | Route | Result | Seconds | Output size |
| --- | --- | --- | --- | --- |
| short-video-with-captions | command line | page text only | 2.7 | 754 characters, exit 0 |
| popular-music-video | command line | transcript | 2.8 | 5084 characters, exit 0 |
| short-url | command line | page text only | 1.8 | 754 characters, exit 0 |
| nonexistent-id | command line | page text only | 1.3 | 754 characters, exit 0 |
| playlist-url | command line | page text only | 1.5 | 786 characters, exit 0 |
| shorts-url | command line | page text only | 2.2 | 754 characters, exit 0 |
| language-es | Python API | page text only | 3.0 | 754 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.

````markdown
{
 "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*

## 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](https://markitdown.dev/errors/)).

## 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](https://github.com/microsoft/markitdown/issues/1383)

### '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](https://github.com/microsoft/markitdown/issues/1232)

## Related

- [Audio and video](https://markitdown.dev/formats/audio/): Audio files.
- [Error reference](https://markitdown.dev/errors/): Error messages, including the YouTube ones.
- [Extras and install size](https://markitdown.dev/install/extras/): The youtube-transcription extra.
- [Supported formats](https://markitdown.dev/formats/): Every format.

---
Independent guide to the open-source MarkItDown library. Not affiliated with or endorsed by Microsoft. Official source: https://github.com/microsoft/markitdown
