{
  "openapi": "3.1.0",
  "info": {
    "title": "YouTube API — fetcher.sh",
    "version": "1.0.0",
    "summary": "15 pay-per-call YouTube endpoints.",
    "description": "Web data for agents and code: **15 YouTube endpoints**, priced **$0.005 per call** in USDC on Base, Polygon, Arbitrum, Monad or Solana. No accounts, no OAuth, no subscriptions — you only pay for calls you make.\n\nEvery endpoint is a `GET` returning the same envelope, where the HTTP status mirrors `status`:\n\n```json\n{ \"status\": 200, \"message\": \"ok\", \"data\": { } }\n```\n\n## Two ways to pay\n\n**1. Prepaid credits (simplest for code).** Top up once at [https://youtube.fetcher.sh/topup](https://youtube.fetcher.sh/topup), then send your key on every request:\n\n```bash\ncurl -H \"Authorization: Bearer bby_live_...\" \"https://youtube.fetcher.sh/api/search/video?query=lofi\"\n```\n\n**2. x402 per call (for autonomous agents).** Call without payment and you get `402` with machine-readable requirements in the `payment-required` header — one entry per supported network, so pay from whichever of Base, Polygon, Arbitrum, Monad or Solana you hold USDC on. Sign the authorization, retry with it, and the data comes back. Gas is sponsored, so the wallet needs no native token — libraries like `@x402/fetch` do the whole loop for you.\n\n## Errors\n\n`400` invalid or missing parameter (the message names it) · `401` unknown or revoked key · `402` payment required, or `topup_required` when a balance is exhausted · `404` not a priced endpoint · `502` upstream failure. There are no rate limits; your balance is the only limit. Settlement happens before delivery, so failed upstream calls are not refunded.\n\n## Also available\n\n[MCP server](https://youtube.fetcher.sh/#mcp) for Claude, Cursor and other MCP clients · [/skill.md](https://youtube.fetcher.sh/skill.md) agent setup instructions · [/llms.txt](https://youtube.fetcher.sh/llms.txt) condensed catalog · [/topup](https://youtube.fetcher.sh/topup) create or recharge a key.",
    "x-guidance": "YouTube is a web-data gateway: 15 read-only endpoints (YouTube). Every endpoint is a GET request that returns the same JSON envelope: { status, message, data }, where the HTTP status mirrors the status field. Pricing is per call, $0.005 in USDC. There are no plans, subscriptions, or rate limits — your balance is the only limit. Payable on Base, Polygon, Arbitrum, Monad or Solana: every 402 lists one accepts entry per network (eip155:8453, eip155:137, eip155:42161, eip155:143, solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp), each with its own USDC asset and payTo address, so pick the one matching a chain you hold USDC on. Base (eip155:8453) is always first. Two ways to pay. (1) x402 per call: request the endpoint, receive a 402 with machine-readable payment requirements, sign the USDC transfer authorization for your chosen network, and retry with the signed payload. Gas is sponsored by the facilitator, so the wallet needs no native token. (2) Prepaid credits: POST /api/credits/topup?amount=<usd> once (minimum $1, itself x402-paid) to receive a bby_live_ API key, then send it as `Authorization: Bearer <key>` on any endpoint — no signing and no chain round trip per call, which is much faster for high request volumes. GET /api/credits/balance returns the remaining balance for a key. Substitute path parameters marked {param}. Missing or invalid parameters return a descriptive 400. Settlement happens before delivery, so failed upstream calls are not refunded. Full agent setup instructions: /skill.md. Condensed catalog for LLMs: /llms.txt.",
    "contact": {
      "email": "info@fetcher.sh"
    }
  },
  "servers": [
    {
      "url": "https://youtube.fetcher.sh",
      "description": "Production"
    }
  ],
  "tags": [
    {
      "name": "YouTube",
      "description": "Search videos, channels, and playlists; fetch video details, comments, shorts, live streams, and trending."
    }
  ],
  "components": {
    "schemas": {
      "Envelope": {
        "type": "object",
        "description": "Every response uses this envelope; the HTTP status mirrors `status`.",
        "properties": {
          "status": {
            "type": "integer",
            "description": "HTTP status code, mirrored in the body."
          },
          "message": {
            "type": "string",
            "description": "\"ok\" on success, otherwise the error reason."
          },
          "data": {
            "type": [
              "object",
              "array",
              "null"
            ],
            "description": "Upstream payload; null on errors."
          }
        },
        "required": [
          "status",
          "message",
          "data"
        ]
      }
    }
  },
  "paths": {
    "/api/channel/handle/{handle}": {
      "get": {
        "operationId": "youtubeChannelHandleByHandle",
        "summary": "YouTube — Channel handle",
        "description": "Channel handle from YouTube. Returns the standard { status, message, data } envelope. $0.005 per call, payable with x402 (USDC on Base, Polygon, Arbitrum, Monad or Solana) or a prepaid credits API key.",
        "tags": [
          "YouTube"
        ],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.005000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "parameters": [
          {
            "name": "handle",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success — upstream payload in `data`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "description": "Missing or invalid parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required"
          },
          "502": {
            "description": "Upstream error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/channel/path": {
      "get": {
        "operationId": "youtubeChannelPath",
        "summary": "YouTube — Channel path",
        "description": "Channel path from YouTube. Returns the standard { status, message, data } envelope. $0.005 per call, payable with x402 (USDC on Base, Polygon, Arbitrum, Monad or Solana) or a prepaid credits API key.",
        "tags": [
          "YouTube"
        ],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.005000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "parameters": [
          {
            "name": "channelPath",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success — upstream payload in `data`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "description": "Missing or invalid parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required"
          },
          "502": {
            "description": "Upstream error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/channel/{id}": {
      "get": {
        "operationId": "youtubeChannelById",
        "summary": "YouTube — Channel",
        "description": "Channel from YouTube. Returns the standard { status, message, data } envelope. $0.005 per call, payable with x402 (USDC on Base, Polygon, Arbitrum, Monad or Solana) or a prepaid credits API key.",
        "tags": [
          "YouTube"
        ],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.005000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success — upstream payload in `data`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "description": "Missing or invalid parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required"
          },
          "502": {
            "description": "Upstream error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/channel/{id}/live-streams": {
      "get": {
        "operationId": "youtubeChannelByIdLiveStreams",
        "summary": "YouTube — Channel live streams",
        "description": "Channel live streams from YouTube. Returns the standard { status, message, data } envelope. $0.005 per call, payable with x402 (USDC on Base, Polygon, Arbitrum, Monad or Solana) or a prepaid credits API key.",
        "tags": [
          "YouTube"
        ],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.005000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success — upstream payload in `data`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "description": "Missing or invalid parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required"
          },
          "502": {
            "description": "Upstream error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/channel/{id}/shorts": {
      "get": {
        "operationId": "youtubeChannelByIdShorts",
        "summary": "YouTube — Channel shorts",
        "description": "Channel shorts from YouTube. Returns the standard { status, message, data } envelope. $0.005 per call, payable with x402 (USDC on Base, Polygon, Arbitrum, Monad or Solana) or a prepaid credits API key.",
        "tags": [
          "YouTube"
        ],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.005000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success — upstream payload in `data`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "description": "Missing or invalid parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required"
          },
          "502": {
            "description": "Upstream error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/channel/{id}/videos": {
      "get": {
        "operationId": "youtubeChannelByIdVideos",
        "summary": "YouTube — Channel videos",
        "description": "Channel videos from YouTube. Returns the standard { status, message, data } envelope. $0.005 per call, payable with x402 (USDC on Base, Polygon, Arbitrum, Monad or Solana) or a prepaid credits API key.",
        "tags": [
          "YouTube"
        ],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.005000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success — upstream payload in `data`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "description": "Missing or invalid parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required"
          },
          "502": {
            "description": "Upstream error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/hashtag/{tag}": {
      "get": {
        "operationId": "youtubeHashtagByTag",
        "summary": "YouTube — Hashtag",
        "description": "Hashtag from YouTube. Returns the standard { status, message, data } envelope. $0.005 per call, payable with x402 (USDC on Base, Polygon, Arbitrum, Monad or Solana) or a prepaid credits API key.",
        "tags": [
          "YouTube"
        ],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.005000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "parameters": [
          {
            "name": "tag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success — upstream payload in `data`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "description": "Missing or invalid parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required"
          },
          "502": {
            "description": "Upstream error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/playlist/{id}/videos": {
      "get": {
        "operationId": "youtubePlaylistByIdVideos",
        "summary": "YouTube — Playlist videos",
        "description": "Playlist videos from YouTube. Returns the standard { status, message, data } envelope. $0.005 per call, payable with x402 (USDC on Base, Polygon, Arbitrum, Monad or Solana) or a prepaid credits API key.",
        "tags": [
          "YouTube"
        ],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.005000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success — upstream payload in `data`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "description": "Missing or invalid parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required"
          },
          "502": {
            "description": "Upstream error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/search/channel": {
      "get": {
        "operationId": "youtubeSearchChannel",
        "summary": "YouTube — Search channel",
        "description": "Search channel from YouTube. Returns the standard { status, message, data } envelope. $0.005 per call, payable with x402 (USDC on Base, Polygon, Arbitrum, Monad or Solana) or a prepaid credits API key.",
        "tags": [
          "YouTube"
        ],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.005000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sortBy",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "relevance",
                "rating",
                "upload_date",
                "view_count"
              ]
            }
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "geo",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success — upstream payload in `data`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "description": "Missing or invalid parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required"
          },
          "502": {
            "description": "Upstream error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/search/playlist": {
      "get": {
        "operationId": "youtubeSearchPlaylist",
        "summary": "YouTube — Search playlist",
        "description": "Search playlist from YouTube. Returns the standard { status, message, data } envelope. $0.005 per call, payable with x402 (USDC on Base, Polygon, Arbitrum, Monad or Solana) or a prepaid credits API key.",
        "tags": [
          "YouTube"
        ],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.005000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sortBy",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "relevance",
                "rating",
                "upload_date",
                "view_count"
              ]
            }
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "geo",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success — upstream payload in `data`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "description": "Missing or invalid parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required"
          },
          "502": {
            "description": "Upstream error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/search/video": {
      "get": {
        "operationId": "youtubeSearchVideo",
        "summary": "YouTube — Search video",
        "description": "Search video from YouTube. Returns the standard { status, message, data } envelope. $0.005 per call, payable with x402 (USDC on Base, Polygon, Arbitrum, Monad or Solana) or a prepaid credits API key.",
        "tags": [
          "YouTube"
        ],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.005000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "duration",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "short",
                "medium",
                "long"
              ]
            }
          },
          {
            "name": "features",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "hd",
                "subtitles",
                "creative_commons",
                "3d",
                "live",
                "purchased",
                "4k",
                "360",
                "location",
                "hdr",
                "vr180"
              ]
            }
          },
          {
            "name": "uploadDate",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "hour",
                "today",
                "week",
                "month",
                "year"
              ]
            }
          },
          {
            "name": "sortBy",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "relevance",
                "rating",
                "upload_date",
                "view_count"
              ]
            }
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "geo",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success — upstream payload in `data`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "description": "Missing or invalid parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required"
          },
          "502": {
            "description": "Upstream error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/shorts/{id}": {
      "get": {
        "operationId": "youtubeShortsById",
        "summary": "YouTube — Shorts",
        "description": "Shorts from YouTube. Returns the standard { status, message, data } envelope. $0.005 per call, payable with x402 (USDC on Base, Polygon, Arbitrum, Monad or Solana) or a prepaid credits API key.",
        "tags": [
          "YouTube"
        ],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.005000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success — upstream payload in `data`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "description": "Missing or invalid parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required"
          },
          "502": {
            "description": "Upstream error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/trending": {
      "get": {
        "operationId": "youtubeTrending",
        "summary": "YouTube — Trending",
        "description": "Trending from YouTube. Returns the standard { status, message, data } envelope. $0.005 per call, payable with x402 (USDC on Base, Polygon, Arbitrum, Monad or Solana) or a prepaid credits API key.",
        "tags": [
          "YouTube"
        ],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.005000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "parameters": [
          {
            "name": "geo",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success — upstream payload in `data`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "description": "Missing or invalid parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required"
          },
          "502": {
            "description": "Upstream error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/video/{id}": {
      "get": {
        "operationId": "youtubeVideoById",
        "summary": "YouTube — Video",
        "description": "Video from YouTube. Returns the standard { status, message, data } envelope. $0.005 per call, payable with x402 (USDC on Base, Polygon, Arbitrum, Monad or Solana) or a prepaid credits API key.",
        "tags": [
          "YouTube"
        ],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.005000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "video",
                "shorts"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success — upstream payload in `data`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "description": "Missing or invalid parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required"
          },
          "502": {
            "description": "Upstream error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          }
        }
      }
    },
    "/api/video/{id}/comments": {
      "get": {
        "operationId": "youtubeVideoByIdComments",
        "summary": "YouTube — Video comments",
        "description": "Video comments from YouTube. Returns the standard { status, message, data } envelope. $0.005 per call, payable with x402 (USDC on Base, Polygon, Arbitrum, Monad or Solana) or a prepaid credits API key.",
        "tags": [
          "YouTube"
        ],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.005000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "top",
                "latest"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success — upstream payload in `data`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "400": {
            "description": "Missing or invalid parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required"
          },
          "502": {
            "description": "Upstream error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          }
        }
      }
    }
  }
}