# ScrapeMole YouTube Comments API

> ScrapeMole YouTube Comments API is a paid API for AI agents from scrapemole-api-mainnet.scrapemole.workers.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-21).

Fetches paginated comments from a YouTube video, sorted by top or newest, with like counts, reply counts, and creator flags

## Facts

- Endpoint: GET https://scrapemole-api-mainnet.scrapemole.workers.dev/v1/youtube/comments?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-21
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/scrapemole-youtube-comments-api-ed368a22
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_SIvZxCpXPRzincAD97ic_

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 scrapemole-youtube-comments-api-ed368a22
```

Example prompt: Fetch the top 50 comments on the YouTube video 'aircAruvnKk' and show me the text, like counts, and whether any are pinned or from the creator.

## When to prefer this

Use this endpoint when you need structured comment data from YouTube videos without managing API keys, OAuth, or YouTube API quotas. It is ideal for AI agents that need pay-per-call access with no account setup, particularly for sentiment analysis, audience research, or monitoring viewer feedback. Prefer this over the YouTube Data API when you want zero-setup access and only pay for successful responses in USDC.

## Known failure modes

- Invalid or non-existent video ID returns an error (no charge)
- Video with comments disabled returns an error or empty result (no charge)
- Limit value outside 1-100 range may cause a validation error
- Payment failure or insufficient USDC balance prevents the request from being processed
- Rate limiting or upstream YouTube access issues may cause transient errors (no charge on error)

## How this service works

Pay-per-call public web data for agents: Google Trends, YouTube transcripts, YouTube search, YouTube channel videos, YouTube video details, YouTube comments, YouTube playlists. Pay per successful call in USDC with x402; errors are never charged. No accounts, no API keys.

Payments: x402 v2, scheme "exact", USDC on Base (eip155:8453). The payment is verified before the scrape and settled only when the response is 200. Terms: https://scrapemole-api-mainnet.scrapemole.workers.dev/terms

## Output

Returns a JSON object containing the video title, video ID, sort mode, total comment count, and an array of comments each with: comment text, comment ID, like count, reply count, relative publish time, pinned status, and whether the commenter is the video creator.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "video"
     ],
     "properties": {
      "lang": {
       "type": "string",
       "examples": [
        "en"
       ],
       "description": "Interface language (hl), e.g. en, de."
      },
      "sort": {
       "enum": [
        "top",
        "newest"
       ],
       "type": "string",
       "default": "top",
       "description": "Comment order."
      },
      "limit": {
       "type": "string",
       "default": "20",
       "description": "Max comments (1-100)."
      },
      "video": {
       "type": "string",
       "examples": [
        "aircAruvnKk"
       ],
       "description": "YouTube video URL or 11-character video ID."
      },
      "country": {
       "type": "string",
       "examples": [
        "US"
       ],
       "description": "Country (gl), e.g. US, GB."
      }
     },
     "additionalProperties": false
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "sort": "top",
  "count": 1,
  "title": "But what is a neural network? | Deep learning chapter 1",
  "videoId": "aircAruvnKk",
  "comments": [
   {
    "text": "This is the clearest explanation of backprop I have seen.",
    "isPinned": false,
    "commentId": "Ugx…",
    "likeCount": 1200,
    "replyCount": 14,
    "publishedText": "3 years ago",
    "isByVideoCreator": false
   }
  ],
  "totalComments": 9000
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/scrapemole-youtube-comments-api-ed368a22/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from scrapemole-api-mainnet.scrapemole.workers.dev](https://www.zero.xyz/host/scrapemole-api-mainnet.scrapemole.workers.dev/llms.txt)
