# ScrapeMole YouTube Search API

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

Search YouTube videos by keyword and return ranked results with metadata including view counts, durations, channel info, and descriptions

## Facts

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

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-search-api-df6ad79e
```

Example prompt: Search YouTube for 'espresso machine review' and show me the top 10 most viewed results uploaded in the last year, sorted by view count.

## When to prefer this

Use this endpoint when you need YouTube search results without a Google API key or quota limits, want pay-per-call pricing with no account setup, need rich metadata per video (likes, comments, duration, channel info), or want to filter by upload date, duration, or country. Prefer this over the YouTube Data API when you want to avoid quota management or account provisioning, and over generic web scrapers when you want structured, consistently formatted JSON output.

## Known failure modes

- Empty results if the search query returns no YouTube videos
- Payment failure if USDC balance is insufficient or x402 header is malformed — no charge applied
- Invalid query parameter (q is required; omitting it returns a 400 error)
- Invalid enum values for sort, duration, or uploaded fields return validation errors
- Limit out of range (must be 1-50) causes a 400 error
- YouTube rate limiting or scraping blocks may cause intermittent 500 errors — not charged

## 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 with a count field and a videos array. Each video object includes: videoId, url, title, channelName, channelId, channelUrl, channelHandle, viewCount, likeCount, commentCount, durationSeconds, durationText, uploadDate, publishDate, publishedText, thumbnailUrl, description, descriptionSnippet, category, keywords, badges, position, isLive, isShort, isFamilySafe, isVerifiedChannel, searchQuery, and availableCountriesCount. Results can contain up to 50 videos per call.

## 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": [
      "q"
     ],
     "properties": {
      "q": {
       "type": "string",
       "examples": [
        "espresso machine review"
       ],
       "description": "Search query."
      },
      "lang": {
       "type": "string",
       "examples": [
        "en"
       ],
       "description": "Interface language (hl), e.g. en, de."
      },
      "sort": {
       "enum": [
        "relevance",
        "date",
        "views",
        "rating"
       ],
       "type": "string",
       "default": "relevance",
       "description": "Sort order."
      },
      "limit": {
       "type": "string",
       "default": "20",
       "description": "Max videos (1-50)."
      },
      "country": {
       "type": "string",
       "examples": [
        "US"
       ],
       "description": "Country (gl), e.g. US, GB."
      },
      "duration": {
       "enum": [
        "any",
        "short",
        "medium",
        "long"
       ],
       "type": "string",
       "default": "any",
       "description": "Duration filter."
      },
      "uploaded": {
       "enum": [
        "any",
        "hour",
        "today",
        "week",
        "month",
        "year"
       ],
       "type": "string",
       "default": "any",
       "description": "Upload date filter."
      }
     },
     "additionalProperties": false
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "count": 2,
  "videos": [
   {
    "url": "https://www.youtube.com/watch?v=4MJnPVnY3_o",
    "title": "The Best Espresso Machine You've Never Heard Of",
    "badges": [
     "4K"
    ],
    "isLive": false,
    "isShort": false,
    "videoId": "4MJnPVnY3_o",
    "category": "People & Blogs",
    "keywords": [],
    "position": 2,
    "channelId": "UCu7x43fFlwbBykF1r04T_wQ",
    "isLiveNow": false,
    "likeCount": 1986,
    "viewCount": 158741,
    "channelUrl": "https://www.youtube.com/channel/UCu7x43fFlwbBykF1r04T_wQ",
    "sourceType": "search",
    "uploadDate": "2026-02-07T03:00:13-08:00",
    "channelName": "Daddy Got Coffee",
    "description": "The $3,000 espresso category hasn’t changed in years — until now.\nThe Arkel Coast brings saturated group performance, flow control, shot programming, and pro-level build into a price bracket where those specs normally don’t exist.\n\n10% off Arkel Coast at Cafune  - https://geni.us/ArkelCoast (Use - D…",
    "publishDate": "2026-02-07T03:00:13-08:00",
    "searchQuery": "espresso machine review",
    "commentCount": 280,
    "durationText": "20:15",
    "isFamilySafe": true,
    "thumbnailUrl": "https://i.ytimg.com/vi/4MJnPVnY3_o/maxresdefault.jpg",
    "channelHandle": "@DaddyGotCoffee",
    "publishedText": "8 months ago",
    "viewCountText": "158,741 views",
    "durationSeconds": 1215,
    "isShortsEligible": false,
    "isVerifiedChannel": false,
    "publishedAtApprox": "2026-02-07",
    "descriptionSnippet": "The $3000 espresso category hasn't changed in years — until now. The Arkel Coast brings saturated group performance, flow ...",
    "availableCountriesCount": 249
   },
   {
    "url": "https://www.youtube.com/watch?v=miNqgmVH9I0",
    "title": "Best Entry Level Espresso Machines 2025 – Our Top Picks for Beginners",
    "badges": [
     "4K"
    ],
    "isLive": false,
    "isShort": false,
    "videoId": "miNqgmVH9I0",
    "category": "Howto & Style",
    "keywords": [
     "best entry level espresso machine 2025",
     "espresso machine for beginners"
    ],
    "position": 3,
    "channelId": "UCJwRmBtnYh_7Xs9oXUrLhZg",
    "isLiveNow": false,
    "likeCount": 1259,
    "viewCount": 169694,
    "channelUrl": "https://www.youtube.com/channel/UCJwRmBtnYh_7Xs9oXUrLhZg",
    "sourceType": "search",
    "uploadDate": "2025-11-07T12:30:07-08:00",
    "channelName": "Whole Latte Love",
    "description": "Looking for the best entry level espresso machine in 2025? 
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/scrapemole-youtube-search-api-df6ad79e/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)
