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

opencode · Social Media

How to Use YouTube related videos in opencode

Returns recommendations associated with a video, including titles, channels, durations, and displayed view counts. Use it to explore adjacent content; the list typically contains 20–30 videos and has no pagination.

Prompts to try with YouTube related videos in opencode

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

Use YouTube related videos to look this up and give me the result as a table. Save the result in ./assets.

YouTube related videosopencode
Try asking
  • Pull the latest numbers from YouTube related videos and tell me what changed since last week.

  • Check YouTube related videos and summarize what you find in three bullet points.

  • Pull the newest data from YouTube related videos and give me the result as a table.

  • Check YouTube related videos every morning and tell me only when something changed.

How to set up YouTube related videos 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 related videos

    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": "tikhub",
        "model": "tikhub/youtube-web-v2-get-related-videos",
        "input": {
          "video_id": "dQw4w9WgXcQ"
        }
      }'

Then paste one of the prompts above: opencode finds YouTube related videos on Spiral, shows the price and runs it.

YouTube related videos providers and prices

Spiral runs YouTube related videos through TikHub. Open a card for today's price, with every fee included.

TikHubSocial Media
YouTube Web V2 · Get related videos
tikhub/youtube-web-v2-get-related-videos

Settings you can ask for

Ask opencode for any of these in your prompt.

SettingAllowed valuesDefaultDescription
Need formaton or offon

Whether to format data. true: return formatted structured data, false: return raw API structure

Every API field of YouTube Web V2 · Get related videos is on its tool page: open its card above.

What can you do with YouTube related videos in opencode?

Build a YouTube research view that turns retrieved text, content links, and public engagement data into reviewable records. A coding agent can adapt the project's parser and presentation to the specific YouTube data you choose.

Plan a tutorial from audience questions

Combine autocomplete phrases, Shorts examples, community announcements, related videos, and comment discussions to choose a tutorial topic and outline the questions it should answer.

Review a public product launch

Compare a brand's community announcement, launch-video captions, audience questions, Shorts coverage, related videos, and autocomplete phrases. Separate what the brand announced from what viewers asked about.

Build a course viewing list

Find lesson candidates through Shorts searches, autocomplete, and related videos. Review available captions and educators' community posts to write a viewing list with a clear purpose for each selection.

Test playback across an owned video series

Review related-video results for links to your organization's videos, then obtain signed playback links for the selected formats. Use the selected videos as a playback regression checklist.

Questions about YouTube related videos in opencode

Can opencode use YouTube related videos?

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

How much does YouTube related videos cost in opencode?

$0.0013 per request. 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 TikHub account to use YouTube related videos in opencode?

No. Spiral runs YouTube related videos on its own TikHub account. You sign in to Spiral once and never paste a key.

How long does it take to set up YouTube related videos in opencode?

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

Does opencode wait while YouTube related videos runs?

YouTube related videos runs in the background. opencode starts the run, checks on it and gives you the json when it's ready.

Can public YouTube search reveal private videos?

Private videos do not appear in YouTube search results. Unlisted videos generally stay out of search, with an exception when someone adds one to a public playlist.

How fresh are YouTube engagement counts?

YouTube says metrics may take time to appear during the first few hours after publication. Counts can also slow down, freeze, or change while YouTube verifies engagement.

Why can YouTube recommendations differ between viewers?

YouTube uses viewing habits and other signals to personalize recommendations. For Up Next, the video currently being watched is the main recommendation signal.

Does language or region affect YouTube's suggested search terms?

Yes. TikHub documents different autocomplete suggestions by language and region, typically returning 10–20 phrases for a query.

Are YouTube's automatic captions accurate enough to quote?

YouTube warns that automatic captions can misrepresent speech because of accents, mispronunciations, dialects, or background noise. Check the relevant passage before using it as a direct quote.

Get started

Start using YouTube related videos 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