# YouTube Channel Scraper

> YouTube Channel Scraper is a paid API for AI agents from api.scrapeforagents.tech, paid per call via x402, $0.025/call, status unknown (last checked 2026-10-02).

Scrapes public YouTube channel metadata and video listings (videos, streams, Shorts) from one or more channel URLs, returning structured JSON.

## Facts

- Endpoint: POST https://api.scrapeforagents.tech/v1/youtube-channel?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-channel-scraper-5e09b8e4
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_7jX81NblStN2HJV0Oh6Go

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-channel-scraper-5e09b8e4 -d '<json body>'
```

Example prompt: Pull the 20 most recent videos from the NASA YouTube channel at https://www.youtube.com/@NASA, sorted by newest, and include their titles, view counts, and publish dates — skip Shorts and streams.

## When to prefer this

Use this endpoint when you need structured video listings from one or more YouTube channels without managing your own scraping infrastructure. It handles legacy URLs, handles, and channel IDs, supports filtering by date and content type, and offers optional deep video detail fetching. Prefer it over generic web scrapers when you specifically need YouTube channel video metadata in a pay-per-successful-call model.

## Known failure modes

- Invalid or private channel URL returns empty items array (not charged)
- Channel with no videos in the requested category returns count 0
- Rate limiting or YouTube blocking may cause empty runs (not charged)
- Invalid date format in oldestPostDate causes validation error
- Unsupported channel URL format may fail to resolve

## How this service works

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

## Output

A JSON object with a count field and an items array, where each item contains the video ID, URL, title, date, duration, view count (raw and formatted text), and published timestamp. The product field identifies the data type as 'youtube-channel'.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "maxItems": {
   "type": "integer",
   "default": 0,
   "minimum": 0,
   "description": "Stop after this many items across all channels. Set to 0 for no global cap."
  },
  "startUrls": {
   "type": "array",
   "description": "Public channel URLs such as https://www.youtube.com/@NASA. Handles, channel IDs, legacy custom and user URLs are accepted."
  },
  "maxResults": {
   "type": "integer",
   "default": 10,
   "minimum": 0,
   "description": "Maximum regular videos to collect from each channel. Set to 0 to skip videos."
  },
  "sortVideosBy": {
   "enum": [
    "NEWEST",
    "POPULAR",
    "OLDEST"
   ],
   "type": "string",
   "default": "NEWEST",
   "description": "Sort each requested channel tab by newest, popular, or oldest."
  },
  "oldestPostDate": {
   "type": "string",
   "default": "",
   "description": "Optional earliest date for videos and streams as YYYY-MM-DD or a relative age such as 30 days. Shorts lack a list-page date and are not filtered."
  },
  "maxResultStreams": {
   "type": "integer",
   "default": 0,
   "minimum": 0,
   "description": "Maximum streams to collect from each channel. Set to 0 to skip streams."
  },
  "maxResultsShorts": {
   "type": "integer",
   "default": 0,
   "minimum": 0,
   "description": "Maximum Shorts to collect from each channel. Set to 0 to skip Shorts."
  },
  "includeVideoDetails": {
   "type": "boolean",
   "default": false,
   "description": "Read each video page for description links, an exact publication date, and a more precise view count. This makes runs slower."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "count": 1,
  "items": [
   {
    "id": null,
    "url": null,
    "date": null,
    "title": null,
    "duration": null,
    "viewCount": null,
    "publishedAt": null,
    "viewCountText": null
   }
  ],
  "product": "youtube-channel"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/youtube-channel-scraper-5e09b8e4/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.scrapeforagents.tech](https://www.zero.xyz/host/api.scrapeforagents.tech/llms.txt)
