Turn any YouTube, TikTok, Instagram, X (Twitter) or Facebook video into a clean Markdown file: title, creator, stats, description and a timestamped transcript with clickable YouTube timestamps.
Drop the file into Claude, ChatGPT or your notes app and ask questions about the video, without watching it or copy-pasting captions by hand.
Built on the Supadata API with its official Python SDK.
git clone https://github.com/YOUR-USERNAME/video2md.git
cd video2md
pip install -r requirements.txtGet a free API key at dash.supadata.ai (100 free credits a month, no card), then either set it in your shell:
# macOS / Linux export SUPADATA_API_KEY=your_key_here # Windows PowerShell $env:SUPADATA_API_KEY="your_key_here"
or copy .env.example to .env and paste your key in there.
python video2md.py "https://www.youtube.com/watch?v=jNQXAC9IVRw" # Saved me-at-the-zoo.md (93 words)
| Flag | What it does |
|---|---|
-o FILE |
Choose the output file (default: the video title, e.g. me-at-the-zoo.md) |
--lang en |
Preferred transcript language (ISO 639-1). Falls back to the first available one |
--every 60 |
Start a new timestamped paragraph every N seconds |
--plain |
One block of text with no timestamps |
--ai |
Video has no captions? Transcribe it with AI instead (2 credits per minute) |
--no-meta |
Skip the title/stats lookup to save a credit |
--stdout |
Print the Markdown instead of saving it |
| Run | Credits |
|---|---|
| Default run (metadata + existing captions) | 2 |
--no-meta |
1 |
--ai on a video with no captions |
1 + 2 per minute of video |
Videos longer than about 20 minutes are processed as a background job; video2md waits for it automatically (status checks are free).
From python video2md.py "https://www.youtube.com/watch?v=jNQXAC9IVRw" --every 5 (full file in examples/):
# Me at the zoo - **Link:** https://www.youtube.com/watch?v=jNQXAC9IVRw - **Creator:** jawed - **Platform:** youtube · **Length:** 00:19 · **Published:** 2005-04-23 - **Views:** 447,495,728 · **Likes:** 20,125,774 - **Transcript language:** en (available: en, de) ## Transcript **[00:01](https://www.youtube.com/watch?v=jNQXAC9IVRw&t=1s)** All right, so here we are, in front of the elephants the cool thing about these guys is that they have really... **[00:07](https://www.youtube.com/watch?v=jNQXAC9IVRw&t=7s)** really really long trunks and that's cool **[00:14](https://www.youtube.com/watch?v=jNQXAC9IVRw&t=14s)** (baaaaaaaaaaahhh!!) and that's pretty much all there is to say
The tests run offline against real recorded API responses, so no key is needed:
python -m unittest -v
- Only public videos work. Private, members-only and age-restricted videos will fail.
- Auto-generated captions can mishear names and numbers.
--langmatters: without it, some videos return a non-English track first.
MIT. Use it, fork it, ship it.