# YouTube Comments Scraper

> YouTube Comments 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 and returns structured public comments and replies from one or more YouTube videos, with sorting and date filtering options.

## Facts

- Endpoint: POST https://api.scrapeforagents.tech/v1/youtube-comments?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-comments-scraper-10672be4
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_3ozk49aF3fNKipNhxRMNH

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-comments-scraper-10672be4 -d '<json body>'
```

Example prompt: Pull the 200 newest comments (including replies) from this YouTube video https://www.youtube.com/watch?v=dQw4w9WgXcQ and return them as structured data.

## When to prefer this

Choose this endpoint when you need structured, machine-readable YouTube comment data at scale without managing browser automation or YouTube API quotas. It is pay-per-call with no charge for failed or empty runs, making it cost-efficient for batch or exploratory tasks. Prefer it over the YouTube Data API v3 when you need more than quota allows or want simpler flat output without OAuth setup.

## Known failure modes

- Video is private or age-restricted — returns empty result with no charge
- Invalid or malformed YouTube URL — may return empty items array
- Video has comments disabled — returns empty items array
- Rate limiting or YouTube anti-scrape measures — may return partial results
- oldestCommentDate filter is approximate due to YouTube's relative timestamp display

## 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 items and an array of comment objects, each containing the comment ID, author name, comment text, comment URL, author avatar URL, author channel ID, author channel URL, and whether the author is verified. Failed or empty runs are not billed.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "maxItems": {
   "type": "integer",
   "default": 0,
   "minimum": 0,
   "description": "Hard cap across all videos. Zero means no total cap."
  },
  "startUrls": {
   "type": "array",
   "description": "Public YouTube video URLs. Watch, Shorts, live, embedded, and short links are accepted."
  },
  "maxComments": {
   "type": "integer",
   "default": 100,
   "minimum": 1,
   "description": "Stop after this many comments and replies per video."
  },
  "includeReplies": {
   "type": "boolean",
   "default": true,
   "description": "Follow public reply threads as well as top-level comments."
  },
  "sortCommentsBy": {
   "enum": [
    "TOP_COMMENTS",
    "NEWEST_FIRST"
   ],
   "type": "string",
   "default": "NEWEST_FIRST",
   "description": "Order top-level comments by featured ranking or newest first."
  },
  "oldestCommentDate": {
   "type": "string",
   "description": "Optional UTC date such as 2026-09-01 or relative age such as 7 days. YouTube supplies relative times, so this filter is approximate and selects newest-first order."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "count": 1,
  "items": [
   {
    "cid": null,
    "author": null,
    "comment": null,
    "commentUrl": null,
    "authorAvatarUrl": null,
    "authorChannelId": null,
    "authorChannelUrl": null,
    "authorIsVerified": null
   }
  ],
  "product": "youtube-comments"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/youtube-comments-scraper-10672be4/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)
