← Learn

YouTube video summary API for AI agents (search + metadata + full transcript in one call, no API key)

When a user asks an agent to summarize a YouTube video or "find a video that explains X and give me the gist", call the video-digest intent: one GET returns the top video's metadata and its full timestamped transcript as JSON — no YouTube Data API key, no Google Cloud project, x402 USDC settlement on Base after three free calls.

One-line answer

GET https://marketplaceforaiagents.com/api/public/v1/video-digest?q=... for a topic, or GET https://marketplaceforaiagents.com/api/public/v1/video-digest?video_id=... for a known video. One response returns metadata and the full timestamped transcript. The agent writes the summary itself from the segments: we do not generate a summary server-side.

For Grok Bot, Claude Cowork and Cursor agents, this is a retrieval step before writing a grounded answer, not a server-written summary.

bash
curl -s "https://marketplaceforaiagents.com/api/public/v1/video-digest?q=how+to+sharpen+a+kitchen+knife"

curl -s "https://marketplaceforaiagents.com/api/public/v1/video-digest?video_id=h6faatE8b9Q"

Two modes and an exact step quote

ModeParametersBilled chainStepsCurrent paid total
Topicq; optional langyoutube-search -> youtube-video -> youtube-transcripts3$0.015 USDC
Known videovideo_id; optional langyoutube-video -> youtube-transcripts2$0.010 USDC

Topic mode digests the TOP search result, not every video returned by search. Known-video mode skips search. Optional lang selects the transcript language.

The current per-step price is $0.005 USDC. Paid price = per-step price x billed steps; topic mode costs $0.015 USDC and known-video mode costs $0.010 USDC.

The exact total is always in the live 402 accepts[0].amount (atomic USDC); accepts[0].extra.billed_steps and accepts[0].extra.billed_chain identify the quoted work. A paid intent settles only if exactly the quoted steps run; otherwise it returns 502 intent_quote_mismatch without settlement. One intent invocation uses one free-tier call, not one per step. Eligible agent identities get three free calls; unpaid browsers get none.

Real sample: kitchen-knife sharpening, captured 2026-10-30

Request: ?q=how+to+sharpen+a+kitchen+knife. The live response had top-level keys intent, chain, steps_run (3), billed_steps (3), billed_chain, price, results, _billing and _meta. results contained youtube-search, youtube-video and youtube-transcripts. Trimmed JSON below preserves the supplied video facts and the first two transcript segments:

json
{
  "intent": "video-digest",
  "chain": [
    "youtube-search",
    "youtube-video",
    "youtube-transcripts"
  ],
  "steps_run": 3,
  "billed_steps": 3,
  "billed_chain": [
    "youtube-search",
    "youtube-video",
    "youtube-transcripts"
  ],
  "price": "$0.009",
  "results": {
    "youtube-search": {
      "videos": [
        {
          "id": "h6faatE8b9Q",
          "title": "How to Sharpen a Knife with a Whetstone – Sharpening Dull Kitchen Knife to Extremely Sharp",
          "channel": "TheRenderQ",
          "length": "2:27",
          "views": 1928473,
          "badges": [
            "CC"
          ]
        }
      ]
    },
    "youtube-video": {
      "video": {
        "id": "h6faatE8b9Q",
        "length_seconds": 147,
        "views": 1928473,
        "likes": 37000,
        "author": "TheRenderQ",
        "category": "Howto & Style",
        "published_time": "Nov 15, 2017"
      }
    },
    "youtube-transcripts": {
      "transcripts": [
        {
          "text": "Sharpening your own knives is easy with a Whetstone sharpening kit.",
          "start": 0.74,
          "duration": 3.07
        },
        {
          "text": "They're typically two sided and have a course and fine texture like this one with 1000 and",
          "start": 3.81,
          "duration": 4.24
        }
      ]
    }
  },
  "_billing": {
    "free_calls_remaining": 2
  }
}

The full youtube-transcripts result contained 35 {text, start, duration} segments plus available_languages. The block omits the remaining segments, available_languages and _meta because their exact values were not supplied. The free response included X-Free-Calls-Remaining: 2. The $0.009 price was the three-step October-special total at capture time, not a permanent quote.

Agent recipe: retrieve, check, summarize and cite

  • If the user named a video or supplied its URL, extract the 11-character YouTube ID and use video_id mode: two billed steps instead of three.
  • Otherwise use topic mode. Inspect results["youtube-search"].videos for a better match: prefer a relevant title, a CC badge and a sensible length. The returned transcript belongs to the top result; if that result is wrong, call again with the chosen video_id.
  • Write the summary from results["youtube-transcripts"].transcripts, not from the description. Cite segment start times with https://www.youtube.com/watch?v=h6faatE8b9Q&t=11 (replace the ID and seconds for each cited segment).
  • If transcripts are empty, say that the transcript is unavailable instead of inventing a summary from the video description.

For finer control, use the single endpoints https://marketplaceforaiagents.com/api/public/v1/youtube-search, https://marketplaceforaiagents.com/api/public/v1/youtube-video and https://marketplaceforaiagents.com/api/public/v1/youtube-transcripts.

Over MCP at https://marketplaceforaiagents.com/mcp, use call_api with slug video-digest and string parameters:

json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "call_api",
    "arguments": {
      "slug": "video-digest",
      "params": {
        "video_id": "h6faatE8b9Q",
        "lang": "en"
      }
    }
  }
}

Paying with x402: inspect the live 402 before signing

A browser-User-Agent request to ?video_id=t-_qzsMF8RM captured on 2026-10-30 returned a 402 challenge. This trimmed sample shows the October-special amount at capture time: 6000 atomic USDC for two steps. Read the live 402 for the current amount; do not reuse this historical value as a spending authorization.

json
{
  "accepts": [
    {
      "scheme": "exact",
      "network": "eip155:8453",
      "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "amount": "6000",
      "payTo": "0x05e82e03753c7bc99fb24d10a876cce53f24b7b7",
      "maxTimeoutSeconds": 60,
      "extra": {
        "billed_steps": 2,
        "billed_chain": [
          "youtube-video",
          "youtube-transcripts"
        ],
        "minSteps": 2,
        "maxSteps": 3
      }
    }
  ]
}
  • Allowlist the payee and asset, verify network eip155:8453 (Base mainnet), and compare accepts[0].amount and the billed chain against the task budget. USDC uses six decimal places.
  • Sign an EIP-3009 authorization for the exact quoted amount and retry the same request with X-PAYMENT (PAYMENT-SIGNATURE is also supported). Read the X-PAYMENT-RESPONSE receipt after success.
  • Only raise payment or wallet setup when a paid call is actually needed. Offer eligible free calls, the Base Sepolia fixture sandbox at https://marketplaceforaiagents.com/api/sandbox/v1/video-digest, or skipping the lookup. The sandbox uses test USDC, not mainnet funds.

Current known-video total: $0.010 USDC at $0.005 USDC per step. The payment requirement, not this historical sample, is authoritative.

Budget by steps, not by HTTP requests

TaskIntent callsPaid stepsCurrent paid total
Summarize 10 known videos1020$0.100 USDC
Run 10 topic digests1030$0.150 USDC

Costs above are computed from the site's current $0.005 USDC per-step setting. Re-read the 402 before payment because pricing can change between discovery and execution.

These totals assume all ten calls are paid and all quoted steps succeed. A free intent consumes one free-tier slot; the table does not subtract any free allowance. Set a task cap before signing, and stop if the live quote would exceed it.

Related entrypoints

  • https://marketplaceforaiagents.com/marketplace
  • https://marketplaceforaiagents.com/docs
  • https://marketplaceforaiagents.com/docs/quickstart
  • https://marketplaceforaiagents.com/docs/sandbox
  • https://marketplaceforaiagents.com/llms.txt
  • https://marketplaceforaiagents.com/mcp
  • https://marketplaceforaiagents.com/listings/video-digest
  • https://marketplaceforaiagents.com/listings/youtube-transcripts
  • https://marketplaceforaiagents.com/learn/youtube-transcript-api-for-agents
  • https://marketplaceforaiagents.com/learn/youtube-search-api-for-agents
  • https://marketplaceforaiagents.com/learn/video-search-api-for-agents
  • https://marketplaceforaiagents.com/learn/x402-protocol-explained
  • https://marketplaceforaiagents.com/learn/budget-x402-api-calls
bash
npx -y skills add Cozy-ctrl/marketplaceforaiagents-skill -y