# YouTube Search Scraper (x402)

> YouTube Search Scraper (x402) is a paid API for AI agents from x402.186-241-26-229.sslip.io, paid per call via x402, $0.025/call, status unknown (last checked 2026-10-02).

Searches YouTube and returns structured results including video, channel, playlist, short, and movie metadata for a given query.

## Facts

- Endpoint: POST https://x402.186-241-26-229.sslip.io/v1/youtube-search?utm_source=zero.xyz
- Price: $0.025/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/youtube-search-scraper-x402-aac4404a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_qwVMHZxUERmN7yP7DsL-Q

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability youtube-search-scraper-x402-aac4404a -d '<json body>'
```

Example prompt: Search YouTube for 'machine learning tutorials' in the US, return up to 50 videos sorted by popularity, and only include videos over 20 minutes long uploaded this month.

## When to prefer this

Choose this endpoint when you need structured, machine-readable YouTube search results without building your own scraper — especially when you need localized results by country/language, content-type filtering (videos, Shorts, channels, playlists, movies), or duration/recency filters. It's pay-per-call with no charge for failed or empty runs, making it cost-efficient for exploratory searches. Prefer this over the YouTube Data API when you want to avoid API quota limits or need results that closely mirror what a user would see on YouTube.

## Known failure modes

- Empty result set if query matches nothing on YouTube — not charged
- Network or scraping failure returns an error — not charged
- Invalid enum value for type, sortBy, duration, or uploadDate returns a validation error
- Missing required 'query' field results in a bad request error
- maxResults set below minimum of 1 is rejected
- Rate limits or YouTube anti-scraping measures may cause transient failures

## How this service works

Pay-per-call structured web data. Failed or empty runs are not charged.

## Output

Returns a JSON object with a count of results and an array of items, each containing the video/channel/playlist URL, content type, search query, title, videoId, channelId, playlistId, and position in the results list.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "geo": {
   "type": "string",
   "default": "US",
   "description": "Two-letter country code for localized search, such as US or GB."
  },
  "lang": {
   "type": "string",
   "default": "en",
   "description": "Two-letter interface language code, such as en or es."
  },
  "type": {
   "enum": [
    "video",
    "shorts",
    "channel",
    "playlist",
    "movie"
   ],
   "type": "string",
   "default": "video",
   "description": "Choose videos, Shorts, channels, playlists, or movies."
  },
  "query": {
   "type": "string",
   "description": "Keywords to search on YouTube."
  },
  "sortBy": {
   "enum": [
    "relevance",
    "popularity"
   ],
   "type": "string",
   "default": "relevance",
   "description": "Order by relevance or popularity. Shorts search uses its own ordering."
  },
  "duration": {
   "enum": [
    "under3min",
    "3to20min",
    "over20min"
   ],
   "type": "string",
   "description": "Optional duration filter for video results."
  },
  "features": {
   "type": "object",
   "description": "Optional video feature filters; selected features are combined."
  },
  "maxResults": {
   "type": "integer",
   "default": 100,
   "minimum": 1,
   "description": "Maximum unique results saved when scrapeAllResults is off."
  },
  "uploadDate": {
   "enum": [
    "today",
    "week",
    "month",
    "year"
   ],
   "type": "string",
   "description": "Optional recent upload period."
  },
  "scrapeAllResults": {
   "type": "boolean",
   "default": false,
   "description": "Follow available continuation pages until the source ends, the run budget is reached, or the 200-page safety limit is reached."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "count": 1,
  "items": [
   {
    "url": null,
    "type": null,
    "query": null,
    "title": null,
    "videoId": null,
    "position": null,
    "channelId": null,
    "playlistId": null
   }
  ],
  "product": "youtube-search"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/youtube-search-scraper-x402-aac4404a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.186-241-26-229.sslip.io](https://www.zero.xyz/host/x402.186-241-26-229.sslip.io/llms.txt)
