[Integrations](https://spiral.ai/integrations) › [Claude Code](https://spiral.ai/integrations/claude-code) › [YouTube structured search results](https://spiral.ai/integrations/claude-code/youtube-structured-search-results)

# How to Use YouTube structured search results in Claude Code

Returns cleaned search results for YouTube videos, Shorts, channels, and playlists. Use it for research tables and content discovery when you want organized results without parsing YouTube’s original structure.

|  |  |
| --- | --- |
| Model | YouTube structured search results |
| Available through | TikHub |
| Category | Social Media |
| Price | $0.0026 per request. |
| Returns | json |
| Runs | In the background |
| Setup | About 2 minutes, no API key |

## Prompts to try with YouTube structured search results in Claude Code

- Use YouTube structured search results for 'Python tutorial' and build a research table from the returned videos, channels, and playlists.
- Use YouTube structured search results to look this up and give me the result as a table. Save the result in ./assets.
- Pull the latest numbers from YouTube structured search results and tell me what changed since last week.
- Check YouTube structured search results and summarize what you find in three bullet points.
- Pull the newest data from YouTube structured search results and give me the result as a table.

## How to set up YouTube structured search results in Claude Code

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

### Use Spiral's MCP server

1. **Add the hosted server**: This adds Spiral to the current project. Add `--scope user` to use it in every project.

```bash
claude mcp add --transport http spiral https://api.spiral.ai/mcp
```

2. **Sign in**: Start `claude`, type `/mcp`, choose spiral and Authenticate. Sign in to Spiral in the browser and click Authorize. No API key.

### Use the Spiral skill

1. **Send Claude Code 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 structured search results**: 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": "tikhub",
    "model": "tikhub/youtube-web-v2-get-general-search-v2",
    "input": {
      "type": "video"
    }
  }'
```

Then paste one of the prompts above: Claude Code finds YouTube structured search results on Spiral, shows the price and runs it.

Setup guide in the docs: https://spiral.ai/docs/quickstarts/claude-code

## YouTube structured search results tools and prices

- [YouTube Web V2 · General search V2](https://spiral.ai/tools/tikhub/tikhub/youtube-web-v2-get-general-search-v2) (TikHub): $0.0026 per request.

## Settings you can ask for

| Setting | Allowed values | Default | Description |
| --- | --- | --- | --- |
| type | video, channel, playlist, movie | — | Type filter |
| keyword |  | — | Search keyword (required for first request) |
| sort_by | relevance, upload_date, view_count, rating | — | Sort by |
| duration | short, medium, long | — | Duration filter: short (<4min), medium (4-20min), long (>20min) |
| features |  | — | Feature filter (comma separated): live, 4k, hd, subtitles, creative_commons, 360, vr180, 3d, hdr |
| upload_date | last_hour, today, this_week, this_month, this_year | — | Upload date filter |

## What can you do with YouTube structured search results in Claude Code?

Build a YouTube research report that connects channel references with publishing and community discussion. A coding agent can add the returned data to your project’s tables and implement parsing for raw search responses.

### Compare competing channels

Research NASA and ESA publishing: resolve channel identities, compare descriptions, discover relevant search results, and review videos, Shorts, and community announcements. Read post comments and replies for recurring audience questions, then attach recognizable channel links to the comparison.

### Prepare a product launch briefing

Build a briefing around a Google product announcement. Confirm the publishing channels and their descriptions, find related coverage through search, inventory videos and Shorts, and examine community announcements with their comment threads. Include channel links so editors can check the sources.

### Research creator sponsorship fit

Find public technology channels, reconcile their URLs, and review their descriptions and publishing topics. Compare video titles, Shorts, community posts, and aggregate discussion themes to prepare a sponsorship shortlist with source links. Use raw or structured search according to the research workflow.

### Plan an educational content series

Research Python teaching channels and their public catalogs. Use channel descriptions and identity lookups to organize sources, search for existing lessons, and compare videos with Shorts. Review community posts, comments, and replies for questions worth addressing in a lesson outline.

### Check a search parser against cleaned results

Run the same YouTube research query through raw and structured search. Compare the parsed results with the cleaned output to investigate missing content types or extraction errors.

## Overview

- [TikHub](https://spiral.ai/providers/tikhub)
- [All Claude Code guides](https://spiral.ai/integrations/claude-code)

## YouTube structured search results in other agents

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

## More Claude Code guides

- [YouTube signed playback URL](https://spiral.ai/integrations/claude-code/youtube-signed-playback-url)
- [YouTube transcript](https://spiral.ai/integrations/claude-code/youtube-transcript)
- [YouTube selected video download links](https://spiral.ai/integrations/claude-code/youtube-selected-video-download-links)
- [YouTube trending Shorts](https://spiral.ai/integrations/claude-code/youtube-trending-shorts)
- [YouTube search suggestions](https://spiral.ai/integrations/claude-code/youtube-search-suggestions)
- [YouTube video and Shorts details](https://spiral.ai/integrations/claude-code/youtube-video-and-shorts-details)

## Questions about YouTube structured search results in Claude Code

**Can Claude Code use YouTube structured search results?**

Yes. Add Spiral to Claude Code as an MCP server, and Claude Code can find and run YouTube structured search results like any built-in tool.

**How much does YouTube structured search results cost in Claude Code?**

$0.0026 per request. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your Claude Code plan is separate.

**Do I need a TikHub account to use YouTube structured search results in Claude Code?**

No. Spiral runs YouTube structured search results 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 structured search results in Claude Code?**

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

**Does Claude Code wait while YouTube structured search results runs?**

YouTube structured search results runs in the background. Claude Code starts the run, checks on it and gives you the json when it's ready.

**Does YouTube search cover private and unlisted videos?**

Private videos do not appear in YouTube search. Unlisted videos also stay out of search unless someone adds them to a public playlist.

**How fresh are YouTube engagement counts?**

YouTube says metrics may take the first few hours after a video is published to appear. Counts on a new upload can therefore be incomplete.

**Is a YouTube handle the same as a channel name?**

Handles are unique identifiers that start with @ and are distinct from channel names. Each channel can have only one handle.

**Do older YouTube custom URLs still work?**

Existing custom URLs continue to work and redirect to the channel’s handle-based URL. YouTube no longer allows new custom URLs or changes to existing custom URLs.

**Is YouTube content available in every country?**

Video owners can restrict availability to certain countries or regions, usually for licensing reasons. YouTube can also block content to comply with local laws.

