# Turn a YouTube playlist into research notes

A buying decision, a course or a conference often lives in a playlist. vid2context expands the playlist into its videos, fetches every transcript with timestamps, and gives your agent one document (or a set of tools) to research across all of them, citing the episode and the moment for each claim.

The example here is "G-Wagon Buyer's Guide", a 9-video series on choosing a Mercedes G-Wagon.

## See what is in the playlist

These commands use the published CLI through `npx`, so you only need Node.js 22 or newer.

```sh
npx -y vid2context list "https://www.youtube.com/playlist?list=PLHeawKfarQSPKIjpe86at3Ttc2sz7uD_b"
```

The YouTube source lists these videos (replayed from a recorded response when this site was built):

```text
https://www.youtube.com/watch?v=PzJL3aBRas8
https://www.youtube.com/watch?v=1Xx1fmHIsiA
https://www.youtube.com/watch?v=AS6LYBzFtEU
https://www.youtube.com/watch?v=EO1PYUnXHiM
https://www.youtube.com/watch?v=U7Dmgpp5W-Q
https://www.youtube.com/watch?v=q6dzm-O1i2o
https://www.youtube.com/watch?v=O78KB1HZXXE
https://www.youtube.com/watch?v=ovIkN7UgbgE
https://www.youtube.com/watch?v=cCPsdFdlshc
```

## One file for your agent

`pack` expands the playlist, fetches each transcript and writes one Markdown context pack sized to a token budget:

```sh
npx -y vid2context pack "https://www.youtube.com/playlist?list=PLHeawKfarQSPKIjpe86at3Ttc2sz7uD_b" --max-tokens 150000 > g-wagon.md
```

Upload `g-wagon.md` to a Claude or ChatGPT Project and ask:

> Which G-Wagon model year should I buy for reliability, and what mileage is too high? Cite the episode and timestamp for every claim.

Every paragraph in the pack starts with its timestamp, and the pack's citation rule tells the model to cite `[Title @ m:ss](https://github.com/nirholas/vid2context/blob/main/link)`. To get every format per video instead, use `bundle` with `-o g-wagon.zip`.

## Let the agent do the research

With the [MCP server](https://vid2context.com/docs/how-to/youtube-transcript-mcp-server.md) connected, the agent can work on the playlist itself:

- `list_items` expands the playlist into its videos.
- `research_videos` searches up to 10 videos for a question and returns only the relevant excerpts, each with its timestamp link.
- `export_context_pack` writes the same pack as the CLI.
- `build_brief` writes a cited brief across the videos with a free LLM.
- `create_collection` and `add_to_collection` keep the playlist as a collection you can search later with `search_transcript`.

Collections live in the library, so they need a storage backend that persists (SQLite by default on Node); without one they last only for the process.

## What a transcript looks like

The last video in the playlist is "Best & Worst G-Wagon Years: Reliability, Interiors & Engines Ranked!" (18:04, 521 caption lines). These are its first lines as the agent receives them, from a recorded run:

```text
Title: Best & Worst G-Wagon Years: Reliability, Interiors & Engines Ranked!
Channel: Alliance Motorworks
URL: https://www.youtube.com/watch?v=cCPsdFdlshc
Duration: 18:04
Transcript: auto-captions, en (youtube-captions)

[0:00] so you're going to buy G wagon which
[0:02] year is best for you well in this video
[0:03] we're going to do a year-by-year
[0:04] breakdown of the legendary
[0:08] w463 platform so you can check out the
[0:10] model year ranges the engine options and
[0:13] the interior because if you buy the
[0:16] wrong one I don't want you getting
[0:18] buyers remorse or ending up with a bad
[0:21] specimen my name is Adam welcome to the
[0:23] U uh gwh and YouTube channel I do
[0:25] everything here for the love of G I'm
```

The captions are YouTube's automatic ones, so they are lowercase and unpunctuated, but each line carries its time, which is what makes citations possible.

## Keep it current

A collection can follow the playlist: `npx -y vid2context collection create "G-Wagon" --source "https://www.youtube.com/playlist?list=PLHeawKfarQSPKIjpe86at3Ttc2sz7uD_b"`, then `collection refresh <id>` fetches only the videos added since the last run.
