{"openapi":"3.1.0","info":{"title":"YouTube Videos, Channels, Comments and Transcripts (x402 & MCP)","version":"0.1.0","description":"Public YouTube data: search results, channel videos, video details with engagement counts, comments and transcripts, one row per video, channel or comment.","x-guidance":"Structured real-time web intelligence APIs paid per delivered row in USDC via x402 on Base, Polygon, Arbitrum, Monad, World Chain and Solana. All endpoints are synchronous at POST /s/<site>/v1/<endpoint> and also exposed over stateless MCP at POST /mcp. Supports x402 v2 'upto' (Permit2) and 'exact' (EIP-3009) on EVM chains, and 'exact' (SPL USDC transfer, facilitator-paid fees) on Solana. 'upto' charges only for the rows delivered. 'exact' settles the full quoted amount (quoted rows x the row price) even when fewer rows than maxResults are delivered. Empty/0-row (404), invalid input (422), and upstream failures or timeouts (503, see error.code) are never charged. New wallets: the first 10 rows are free on 12 trial sites (apps-apple-com, booking-com, github-com, hackernews-com, huggingface-co, imdb-com, play-google-com, polymarket-com, tripadvisor-com, upwork-com, walmart-com, zillow-com), up to 5 per call; with exact, a call is free when maxResults <= 5. The wallet must hold at least the quoted USDC to pass payment verification, but free rows are not charged and never settled on-chain.","contact":{"email":"ops@opendata.best"}},"servers":[{"url":"https://x402.opendata.best"}],"paths":{"/s/youtube-research-scraper/v1/search":{"post":{"operationId":"youtube_research_scraper_search","summary":"YouTube Videos, Channels, Comments and Transcripts: Search videos","description":"Search YouTube for one or more keywords with upload date, result type and duration filters, in a chosen country and language. One row per result. Unit price: $0.003000/row USDC (default quote 10 rows, max 20 rows). Unsettled / 0-row / error responses are never charged.","tags":["youtube-research-scraper","Video, Images"],"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"dynamic","currency":"USD","amount":"0.030000"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"searchQueries":{"type":"array","items":{"type":"string","minLength":1,"maxLength":160},"description":"Keywords to search on YouTube. Each distinct query gets its own maxResults row allowance; comma- or newline-separated text is also accepted.","maxItems":50},"uploadDate":{"type":"string","description":"Restrict search to the selected relative publishing period. The API does not automatically widen the period.","default":"any","enum":["any","hour","today","week","month","year"]},"resultType":{"type":"string","description":"Select the YouTube search filter. A playlist filter does not export playlists; rows represent videos, channels, or comments.","default":"any","enum":["any","video","channel","playlist","movie","short"]},"duration":{"type":"string","description":"Filter search by video length: short is under about 4 minutes, medium is 4–20 minutes, and long is over about 20 minutes.","default":"any","enum":["any","short","medium","long"]},"gl":{"type":"string","description":"Two-letter country code for YouTube search and popular-topic results, such as US, GB, DE, JP, BR, or IN.","default":"US","minLength":2,"maxLength":2,"pattern":"^[A-Za-z]{2}$"},"hl":{"type":"string","description":"Language for YouTube results, such as en, de, ja, or pt-BR; this is separate from transcriptLanguage. Leave empty to select a language for the market in gl.","minLength":2,"maxLength":12},"maxResults":{"type":"integer","description":"Most rows this call returns, 1 to 20 (default 10). All row types count toward it. The 402 payment quote is maxResults x $0.0030/row USDC: with the upto scheme you pay only for the rows delivered, with exact you pay the quoted amount. Calls that return 0 rows or fail are not charged.","default":10,"minimum":1,"maximum":20}},"additionalProperties":false},"example":{"searchQueries":["home espresso"],"gl":"US","maxResults":10}}}},"responses":{"200":{"description":"Synchronous data rows with x402 PAYMENT-RESPONSE receipt header.","headers":{"PAYMENT-RESPONSE":{"description":"Base64-encoded x402 v2 SettleResponse receipt.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response_youtube_research_scraper"},"example":{"jobId":"job_youtube-_example","status":"succeeded","done":true,"rowCount":1,"rowsBilled":1,"rowsDelivered":1,"rows":[{"rowType":"example_rowType","id":"example_001","title":"example_title","videoTitle":"example_videoTitle","channelName":"example_channelName","authorName":"example_authorName"}],"meta":{"site":"youtube-research-scraper","endpoint":"search","maxResults":10,"payment":{"scheme":"upto","network":"eip155:8453","quotedMicrousd":30000,"settledMicrousd":3000,"transaction":"0x0000000000000000000000000000000000000000000000000000000000000000"}}}}}},"402":{"description":"Payment required or invalid/declined payment authorization (never charged).","headers":{"PAYMENT-REQUIRED":{"description":"Base64-encoded x402 v2 PaymentRequired quote.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"no_results: 0 rows matched the query; aborted before settlement (charged=false).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"payment_id_conflict: payment-identifier reused with different parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Invalid or missing request parameters (validated before /verify; charged=false).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit or payer cooldown exceeded (charged=false).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"error.code collection_failed / source_blocked (upstream source failed or blocked) or upstream_timeout (synchronous deadline reached, task cancelled): charged=false. Also settlement_pending or facilitator_unavailable; retry same payment to reconcile.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/s/youtube-research-scraper/v1/channels":{"post":{"operationId":"youtube_research_scraper_channels","summary":"YouTube Videos, Channels, Comments and Transcripts: Videos from channels","description":"List the videos, Shorts or live streams of public channels given by link, @handle or channel ID, newest first, with an optional channel information row. Unit price: $0.003000/row USDC (default quote 10 rows, max 20 rows). Unsettled / 0-row / error responses are never charged.","tags":["youtube-research-scraper","Video, Images"],"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"dynamic","currency":"USD","amount":"0.030000"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"channelUrls":{"type":"array","items":{"type":"string","minLength":2,"maxLength":300},"description":"Public channel links, @handles, or channel IDs starting with UC. Each distinct input has one maxResults allowance shared by all selected tabs and any extra rows.","maxItems":50},"channelTab":{"type":"string","description":"Select videos, shorts, streams, or all tabs. All selected tabs share the channel input's maxResults allowance.","default":"videos","enum":["videos","shorts","streams","all"]},"includeChannelAbout":{"type":"boolean","description":"Add a public channel-information row before the channel's video rows. This row is billed at the same price and uses the channel input's allowance.","default":false},"gl":{"type":"string","description":"Two-letter country code for YouTube search and popular-topic results, such as US, GB, DE, JP, BR, or IN.","default":"US","minLength":2,"maxLength":2,"pattern":"^[A-Za-z]{2}$"},"hl":{"type":"string","description":"Language for YouTube results, such as en, de, ja, or pt-BR; this is separate from transcriptLanguage. Leave empty to select a language for the market in gl.","minLength":2,"maxLength":12},"maxResults":{"type":"integer","description":"Most rows this call returns, 1 to 20 (default 10). All row types count toward it. The 402 payment quote is maxResults x $0.0030/row USDC: with the upto scheme you pay only for the rows delivered, with exact you pay the quoted amount. Calls that return 0 rows or fail are not charged.","default":10,"minimum":1,"maximum":20}},"additionalProperties":false},"example":{"channelUrls":["https://www.youtube.com/@freecodecamp"],"maxResults":10}}}},"responses":{"200":{"description":"Synchronous data rows with x402 PAYMENT-RESPONSE receipt header.","headers":{"PAYMENT-RESPONSE":{"description":"Base64-encoded x402 v2 SettleResponse receipt.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response_youtube_research_scraper"},"example":{"jobId":"job_youtube-_example","status":"succeeded","done":true,"rowCount":1,"rowsBilled":1,"rowsDelivered":1,"rows":[{"rowType":"example_rowType","id":"example_001","title":"example_title","videoTitle":"example_videoTitle","channelName":"example_channelName","authorName":"example_authorName"}],"meta":{"site":"youtube-research-scraper","endpoint":"channels","maxResults":10,"payment":{"scheme":"upto","network":"eip155:8453","quotedMicrousd":30000,"settledMicrousd":3000,"transaction":"0x0000000000000000000000000000000000000000000000000000000000000000"}}}}}},"402":{"description":"Payment required or invalid/declined payment authorization (never charged).","headers":{"PAYMENT-REQUIRED":{"description":"Base64-encoded x402 v2 PaymentRequired quote.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"no_results: 0 rows matched the query; aborted before settlement (charged=false).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"payment_id_conflict: payment-identifier reused with different parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Invalid or missing request parameters (validated before /verify; charged=false).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit or payer cooldown exceeded (charged=false).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"error.code collection_failed / source_blocked (upstream source failed or blocked) or upstream_timeout (synchronous deadline reached, task cancelled): charged=false. Also settlement_pending or facilitator_unavailable; retry same payment to reconcile.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/s/youtube-research-scraper/v1/videos":{"post":{"operationId":"youtube_research_scraper_videos","summary":"YouTube Videos, Channels, Comments and Transcripts: Video details, comments and transcripts","description":"Details of videos given by link or 11-character ID: title, channel, dates, description and, on request, engagement counts, the transcript and comments as separate rows. Unit price: $0.003000/row USDC (default quote 10 rows, max 20 rows). Unsettled / 0-row / error responses are never charged.","tags":["youtube-research-scraper","Video, Images"],"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"dynamic","currency":"USD","amount":"0.030000"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"videoUrls":{"type":"array","items":{"type":"string","minLength":11,"maxLength":300},"description":"YouTube watch, shorts, live, embed, or youtu.be links, or 11-character video IDs. Each distinct input has one maxResults allowance shared by its video, comments, replies, and related videos.","maxItems":500},"scrapeDetails":{"type":"boolean","description":"Request richer video metadata, including publishing dates, descriptions, categories, and counts when available. Use a shortlist to avoid enriching videos you do not need.","default":false},"includeEngagement":{"type":"boolean","description":"Include available likes, subscriber counts, comment counts, and view counts when scrapeDetails is enabled.","default":false},"includeTranscript":{"type":"boolean","description":"Request available captions as fields on the video row, without an extra row charge. At most 50 segments are retained; joined text is capped at 100,000 characters and may be shortened further.","default":false},"transcriptLanguage":{"type":"string","description":"Preferred caption language, such as en, es, fr, de, ja, or pt. Another available track may be returned; check transcriptLanguage in the output row.","default":"en","minLength":2,"maxLength":12},"includeComments":{"type":"boolean","description":"Add comments as separate rowType=comment rows, including replies when enabled. Each row is billed and uses the originating input's maxResults allowance.","default":false},"maxComments":{"type":"integer","description":"Maximum top-level comments considered per video. Zero uses the 20,000-comment safety limit, but maxResults and the run's remaining allowance take precedence.","default":0,"minimum":0,"maximum":20000},"commentSort":{"type":"string","description":"Sort comments by top comments or newest first.","default":"top","enum":["top","newest"]},"gl":{"type":"string","description":"Two-letter country code for YouTube search and popular-topic results, such as US, GB, DE, JP, BR, or IN.","default":"US","minLength":2,"maxLength":2,"pattern":"^[A-Za-z]{2}$"},"hl":{"type":"string","description":"Language for YouTube results, such as en, de, ja, or pt-BR; this is separate from transcriptLanguage. Leave empty to select a language for the market in gl.","minLength":2,"maxLength":12},"maxResults":{"type":"integer","description":"Most rows this call returns, 1 to 20 (default 10). All row types count toward it. The 402 payment quote is maxResults x $0.0030/row USDC: with the upto scheme you pay only for the rows delivered, with exact you pay the quoted amount. Calls that return 0 rows or fail are not charged.","default":10,"minimum":1,"maximum":20}},"additionalProperties":false},"example":{"videoUrls":["https://www.youtube.com/watch?v=dQw4w9WgXcQ"],"scrapeDetails":true,"includeComments":true,"maxResults":10}}}},"responses":{"200":{"description":"Synchronous data rows with x402 PAYMENT-RESPONSE receipt header.","headers":{"PAYMENT-RESPONSE":{"description":"Base64-encoded x402 v2 SettleResponse receipt.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response_youtube_research_scraper"},"example":{"jobId":"job_youtube-_example","status":"succeeded","done":true,"rowCount":1,"rowsBilled":1,"rowsDelivered":1,"rows":[{"rowType":"example_rowType","id":"example_001","title":"example_title","videoTitle":"example_videoTitle","channelName":"example_channelName","authorName":"example_authorName"}],"meta":{"site":"youtube-research-scraper","endpoint":"videos","maxResults":10,"payment":{"scheme":"upto","network":"eip155:8453","quotedMicrousd":30000,"settledMicrousd":3000,"transaction":"0x0000000000000000000000000000000000000000000000000000000000000000"}}}}}},"402":{"description":"Payment required or invalid/declined payment authorization (never charged).","headers":{"PAYMENT-REQUIRED":{"description":"Base64-encoded x402 v2 PaymentRequired quote.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"no_results: 0 rows matched the query; aborted before settlement (charged=false).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"payment_id_conflict: payment-identifier reused with different parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Invalid or missing request parameters (validated before /verify; charged=false).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit or payer cooldown exceeded (charged=false).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"error.code collection_failed / source_blocked (upstream source failed or blocked) or upstream_timeout (synchronous deadline reached, task cancelled): charged=false. Also settlement_pending or facilitator_unavailable; retry same payment to reconcile.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/s/youtube-research-scraper/v1/health":{"get":{"operationId":"youtube_research_scraper_health","summary":"YouTube Videos, Channels, Comments and Transcripts: health check","description":"Free readiness check (never returns 402 and never starts a collection).","tags":["youtube-research-scraper","health"],"responses":{"200":{"description":"Operational","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthStatus"}}}},"503":{"description":"Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthStatus"}}}}}}}},"components":{"schemas":{"ErrorDetail":{"type":"object","required":["code","message","retryable"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"charged":{"type":"boolean"}}},"ErrorResponse":{"type":"object","required":["error"],"properties":{"error":{"$ref":"#/components/schemas/ErrorDetail"}}},"HealthStatus":{"type":"object","required":["ok","site","status","endpoints","rowsBilled"],"properties":{"ok":{"type":"boolean"},"site":{"type":"string"},"status":{"type":"string","enum":["operational","unavailable"]},"endpoints":{"type":"array","items":{"type":"string"}},"rowsBilled":{"type":"integer"}}},"Row_youtube_research_scraper":{"type":"object","properties":{"rowType":{"type":["string","number","boolean","object","array","null"]},"id":{"type":["string","number","boolean","object","array","null"]},"title":{"type":["string","number","boolean","object","array","null"]},"videoTitle":{"type":["string","number","boolean","object","array","null"]},"channelName":{"type":["string","number","boolean","object","array","null"]},"authorName":{"type":["string","number","boolean","object","array","null"]},"viewCount":{"type":["number","string","null"]},"publishedText":{"type":["string","number","boolean","object","array","null"]},"source":{"type":["string","number","boolean","object","array","null"]},"url":{"type":["string","null"],"format":"uri"},"videoUrl":{"type":["string","null"],"format":"uri"},"scrapedAt":{"type":["string","number","boolean","object","array","null"]}},"additionalProperties":true},"Response_youtube_research_scraper":{"type":"object","properties":{"jobId":{"type":"string"},"status":{"type":"string"},"done":{"type":"boolean"},"rowCount":{"type":"integer","minimum":1},"rowsBilled":{"type":"integer","minimum":1},"rowsDelivered":{"type":"integer","minimum":1},"rows":{"type":"array","items":{"$ref":"#/components/schemas/Row_youtube_research_scraper"}},"meta":{"type":"object","properties":{"site":{"type":"string"},"endpoint":{"type":"string"},"maxResults":{"type":"integer"},"payment":{"type":"object","properties":{"scheme":{"type":"string"},"network":{"type":"string"},"quotedMicrousd":{"type":"integer"},"settledMicrousd":{"type":"integer"},"transaction":{"type":"string"},"payer":{"type":"string"}}}}}},"required":["jobId","status","done","rowCount","rows"]}}},"x-discovery":{"ownershipProofs":["0xdb7c562a3ef6f9f29da4672abdab1489e82e910a91b863e3c22b905df6522b7223798a84245e0452cab689483b6cbb7cd8c13141319df982b213dea31ee7e4311c"]}}