Spiral gives your agent every tool with one account. Browse the tools →

opencode · Social Media

How to Use YouTube Playlist in opencode

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.

Prompts to try with YouTube Playlist in opencode

Copy an example into opencode, or ask in your own words.

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.

YouTube Playlistopencode
Try asking
  • 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 opencode

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

Use Spiral's MCP server

  1. Add the server

    Leave out --global to add Spiral to the current project only. No header and no client ID or secret: opencode registers itself with Spiral.

    opencode mcp add spiral --global --url https://api.spiral.ai/mcp
  2. Sign in

    Your browser opens. Sign in to Spiral, pick the organization and click Authorize, then return to the terminal. No API key. Inside opencode, /mcps starts the same sign-in.

    opencode mcp auth spiral
  3. Check it

    Spiral shows as connected.

    opencode mcp list

Use the Spiral skill

  1. Send opencode 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.

    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.

    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: opencode finds YouTube Playlist on Spiral, shows the price and runs it.

YouTube Playlist providers and prices

Spiral runs YouTube Playlist through ScrapeCreators. Open a card for today's price, with every fee included.

ScrapeCreatorsSocial Media
YouTube · Playlist
scrapecreators/youtube-playlist

What can you do with YouTube Playlist in opencode?

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.

Questions about YouTube Playlist in opencode

Can opencode use YouTube Playlist?

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

How much does YouTube Playlist cost in opencode?

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 opencode plan is separate.

Do I need a ScrapeCreators account to use YouTube Playlist in opencode?

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 opencode?

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

Does opencode wait while YouTube Playlist runs?

YouTube Playlist runs in the background. opencode 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.

Get started

Start using YouTube Playlist in opencode

One Spiral account for every tool your agent needs. No subscription; you pay per run.

Paste this into opencode:

Set up opencode

set up https://spiral.ai/SKILL.md
Are you an AI agent? See setup options