[Integrations](https://spiral.ai/integrations) › [Gemini CLI](https://spiral.ai/integrations/gemini-cli) › [YouTube Playlist](https://spiral.ai/integrations/gemini-cli/youtube-playlist)

# How to Use YouTube Playlist in Gemini CLI

Fetch videos inside a YouTube playlist, including titles, links, thumbnails, durations, and channels, plus playlist metadata. Use it to inventory a course or curated collection and calculate watch time across the returned videos.

|  |  |
| --- | --- |
| Model | YouTube Playlist |
| Available through | ScrapeCreators |
| Category | Social Media |
| Price | Up to $0.0013 per run. |
| Returns | json |
| Runs | In the background |
| Setup | About 2 minutes, no API key |

## Prompts to try with YouTube Playlist in Gemini CLI

- Use YouTube playlist videos for 3Blue1Brown's Essence of linear algebra, playlist PLZHQObOWTQDPD3MizzM2xVFitgF8hE_ab. Add a lesson index to this project's documentation with titles, URLs, and durations.
- Use YouTube playlist videos for 3Blue1Brown's Neural networks playlist, PLZHQObOWTQDMXMi3bUMThGdYqos36X_lA. Create a JSON data file containing the returned titles, links, thumbnails, and durations.
- Use YouTube playlist videos for PLZHQObOWTQDPD3MizzM2xVFitgF8hE_ab. Build a watch-time calculator in this project from the returned durations and display how many lessons the calculation covers.
- Use YouTube playlist videos for PLZHQObOWTQDMXMi3bUMThGdYqos36X_lA. Compare the returned video URLs and titles with our saved course inventory and produce a reviewable update.
- Use YouTube playlist videos for PLZHQObOWTQDPD3MizzM2xVFitgF8hE_ab and PLZHQObOWTQDMXMi3bUMThGdYqos36X_lA. Add a course comparison table to the project with returned lesson counts and combined durations.

## How to set up YouTube Playlist in Gemini CLI

Pick the way that suits you. Each takes about two minutes.

### Use Spiral's MCP server

1. **Add the server**: Or add it to `~/.gemini/settings.json` yourself:

```bash
gemini mcp add --scope user --transport http spiral https://api.spiral.ai/mcp
```

2. **Sign in**: Start `gemini` and run:

```text
/mcp auth spiral
```

3. **Check it**: In Gemini CLI, run `/mcp`. From your shell:

```bash
gemini mcp list
```

### Use the Spiral skill

1. **Send Gemini CLI this message**: Your agent reads Spiral's skill and sets itself up.

```
set up https://spiral.ai/SKILL.md
```

2. **Sign in or paste a key**: Approve Spiral in the browser, or give the agent a key from the console.

### Use the Spiral CLI

1. **Install and sign in**: Installs the Spiral CLI, signs you in and adds its skill to your coding agents.

```bash
npx -y spiral-cli@latest init
```

### Call the Spiral API

1. **Create an API key**: In the console, under API keys.

2. **Run YouTube Playlist**: One request; the result comes back by polling or a webhook.

```bash
curl https://api.spiral.ai/v1/runs \
  -H "Authorization: Bearer $SPIRAL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "provider": "scrapecreators",
    "model": "scrapecreators/youtube-playlist",
    "input": {
      "playlist_id": "PLP32wGpgzmIlInfgKVFfCwVsxgGqZNIiS"
    }
  }'
```

Then paste one of the prompts above: Gemini CLI finds YouTube Playlist on Spiral, shows the price and runs it.

Setup guide in the docs: https://spiral.ai/docs/quickstarts/gemini-cli

## YouTube Playlist tools and prices

- [YouTube · Playlist](https://spiral.ai/tools/scrapecreators/scrapecreators/youtube-playlist) (ScrapeCreators): Up to $0.0013 per run.

## Settings you can ask for

| Setting | Allowed values | Default | Description |
| --- | --- | --- | --- |
| continuationToken |  | — | Token from the previous response to get the next page. Omit for the first page. Stop when the returned continuationToken is null. |

## What can you do with YouTube Playlist in Gemini CLI?

Build a lesson directory from YouTube playlist titles, links, thumbnails, and durations. A coding agent can add the returned metadata to project files and flag inventories whose collected count differs from the reported total.

### Build a course inventory

Turn an educational playlist into a lesson table with titles, video links, durations, and channels. Compare the collected row count with the playlist's reported total before calling the inventory complete.

### Estimate study time

Add the durations of returned lessons and divide the watch time into daily study sessions. State how many videos the estimate covers.

### Monitor a public course

Compare successive collections of a public course playlist to identify newly returned videos and changed titles. Flag count mismatches before interpreting missing rows as removals.

### Compare learning resources

Compare two public educational playlists by returned lesson count, total duration, and topics suggested by their titles. Keep title-based topic judgments separate from claims about lesson content.

### Audit a curated resource list

List the channels represented in a public organization or educator's playlist and count their returned videos. Identify whether the collection draws from one publisher or several.

### Refresh a learning directory

Populate a course directory with returned lesson titles, thumbnails, links, and durations. Refresh the metadata when preparing a new directory edition.

### Find overlapping lessons

Compare video URLs across public playlists to find lessons included in more than one collection. Produce a combined watchlist without repeating the same video.

## Overview

- [ScrapeCreators](https://spiral.ai/providers/scrapecreators)
- [All Gemini CLI guides](https://spiral.ai/integrations/gemini-cli)

## YouTube Playlist in other agents

- [Amp](https://spiral.ai/integrations/amp/youtube-playlist)
- [ChatGPT](https://spiral.ai/integrations/chatgpt/youtube-playlist)
- [Claude](https://spiral.ai/integrations/claude-desktop/youtube-playlist)
- [Claude Code](https://spiral.ai/integrations/claude-code/youtube-playlist)
- [Cline](https://spiral.ai/integrations/cline/youtube-playlist)
- [Codex](https://spiral.ai/integrations/codex/youtube-playlist)
- [Cursor](https://spiral.ai/integrations/cursor/youtube-playlist)
- [Devin](https://spiral.ai/integrations/devin/youtube-playlist)
- [dots](https://spiral.ai/integrations/dots/youtube-playlist)
- [Factory Droid](https://spiral.ai/integrations/factory-droid/youtube-playlist)
- [Gemini](https://spiral.ai/integrations/gemini/youtube-playlist)
- [Google Antigravity](https://spiral.ai/integrations/antigravity/youtube-playlist)
- [goose](https://spiral.ai/integrations/goose/youtube-playlist)
- [Grok](https://spiral.ai/integrations/grok/youtube-playlist)
- [Grok Build](https://spiral.ai/integrations/grok-build/youtube-playlist)
- [Hermes](https://spiral.ai/integrations/hermes/youtube-playlist)
- [Instinct](https://spiral.ai/integrations/instinct/youtube-playlist)
- [Manus](https://spiral.ai/integrations/manus/youtube-playlist)
- [Muse](https://spiral.ai/integrations/muse/youtube-playlist)
- [Muse Code](https://spiral.ai/integrations/muse-code/youtube-playlist)
- [n8n](https://spiral.ai/integrations/n8n/youtube-playlist)
- [Notion](https://spiral.ai/integrations/notion/youtube-playlist)
- [OpenClaw](https://spiral.ai/integrations/openclaw/youtube-playlist)
- [opencode](https://spiral.ai/integrations/opencode/youtube-playlist)
- [Perplexity](https://spiral.ai/integrations/perplexity/youtube-playlist)
- [Raycast](https://spiral.ai/integrations/raycast/youtube-playlist)
- [VS Code](https://spiral.ai/integrations/vscode/youtube-playlist)
- [Windsurf](https://spiral.ai/integrations/windsurf/youtube-playlist)
- [Zapier](https://spiral.ai/integrations/zapier/youtube-playlist)

## More Gemini CLI guides

- [YouTube Comments](https://spiral.ai/integrations/gemini-cli/youtube-comments)
- [YouTube Search Typeahead](https://spiral.ai/integrations/gemini-cli/youtube-search-typeahead)
- [YouTube Channel shorts Alexandria](https://spiral.ai/integrations/gemini-cli/youtube-channel-shorts-alexandria)
- [YouTube Shorts search results](https://spiral.ai/integrations/gemini-cli/youtube-shorts-search-results)
- [YouTube Channel Shorts ScrapeCreators](https://spiral.ai/integrations/gemini-cli/youtube-channel-shorts-scrapecreators)
- [YouTube Video comments Alexandria](https://spiral.ai/integrations/gemini-cli/youtube-video-comments-alexandria)

## Questions about YouTube Playlist in Gemini CLI

**Can Gemini CLI use YouTube Playlist?**

Yes. Add Spiral to Gemini CLI as an MCP server, and Gemini CLI can find and run YouTube Playlist like any built-in tool.

**How much does YouTube Playlist cost in Gemini CLI?**

Up to $0.0013 per run. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your Gemini CLI plan is separate.

**Do I need a ScrapeCreators account to use YouTube Playlist in Gemini CLI?**

No. Spiral runs YouTube Playlist on its own ScrapeCreators account. You sign in to Spiral once and never paste a key.

**How long does it take to set up YouTube Playlist in Gemini CLI?**

About two minutes: add the server, then sign in, then check it.

**Does Gemini CLI wait while YouTube Playlist runs?**

YouTube Playlist runs in the background. Gemini CLI starts the run, checks on it and gives you the json when it's ready.

**What does the playlist data include?**

Each returned video includes its title, link, thumbnail, duration, and channel. The response also includes playlist metadata such as its title, owner, and reported total video count.

**Does one response contain the whole playlist?**

The current documentation describes paginated results. Follow the returned continuation token and stop when it is null.

**Can the returned video count differ from YouTube's reported total?**

Yes. ScrapeCreators' October 6, 2026 test returned 79 rows for a playlist reporting 245 videos. That test predates the current pagination documentation, so 79 should not be treated as today's result limit.

**Is the data collected on a fixed update schedule?**

ScrapeCreators describes retrieval as on demand, rather than a daily or weekly data feed. That description does not establish a maximum delay between a YouTube edit and its appearance in a response.

**Are private playlists part of the available public data?**

ScrapeCreators describes its collection as publicly available information. YouTube restricts private playlists to their owner and chosen viewers, so this endpoint should not be treated as access to private collections.

