# YouTube Transcript Extractor (d402 Gateway)

> YouTube Transcript Extractor (d402 Gateway) is a paid API for AI agents from gateway.d402.xyz, paid per call via x402, $0.01/call, status down (last checked 2026-09-15).

Fetches a public YouTube video page, extracts available transcript segments with timing, and returns the full transcript text plus validation evidence.

## Facts

- Endpoint: POST https://gateway.d402.xyz/v1/youtube/transcript
- Price: $0.01/call
- Payment: x402
- Status: down
- Last checked: 2026-09-15
- Activations on Zero: 2
- Provider: gateway.d402.xyz
- Website: https://gateway.d402.xyz
- Canonical page: https://www.zero.xyz/c/gateway-d402-xyz-youtube-transcript-extractor-d402-gateway-7e4baf5a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_MtnsOHGbO9bBPLvXjsMWz

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 gateway-d402-xyz-youtube-transcript-extractor-d402-gateway-7e4baf5a -d '<json body>'
```

Example prompt: Can you pull the full transcript from this YouTube video — https://www.youtube.com/watch?v=dQw4w9WgXcQ — and give it to me in English?

## When to prefer this

Use this endpoint when you need the spoken or captioned text of a YouTube video, especially with timestamps, and want validation evidence (transcript hash, receipt) confirming what was extracted. Prefer this over screen-scraping solutions when you need structured segment data with start/end times, or when you need proof of the extracted content.

## Known failure modes

- Video has no transcript or captions available — returns error status
- Private or age-restricted video URL — workers cannot access the page
- Invalid or malformed YouTube URL — request rejected with validation error
- Requested language code not available on the video — may fall back or error
- Timeout exceeded before transcript could be fetched — returns error status
- Video has been deleted or made unavailable — workers return error

## How this service works

Paid d402 capability alias for media.youtube_transcript@1. Workers fetch the YouTube page, extract available transcript segments, and return a transcript with validation evidence.

## Output

Returns a task result containing the full transcript as a plain-text string, an array of timed segments (each with text, startMs, endMs, durationMs), the video title, videoId, language code and name, segment count, a hash of the transcript for integrity verification, and metadata about the extractor version and fetch time.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "url"
 ],
 "properties": {
  "url": {
   "type": "string",
   "format": "uri",
   "description": "Public youtube.com or youtu.be video URL whose page exposes a transcript."
  },
  "sync": {
   "type": "boolean",
   "description": "Optional d402 sync flag. Defaults to gateway policy."
  },
  "timeoutMs": {
   "type": "number",
   "maximum": 45000,
   "minimum": 1,
   "description": "Optional per-request timeout, capped by gateway policy."
  },
  "languageCode": {
   "type": "string",
   "description": "Optional preferred transcript language code when the page exposes multiple languages."
  }
 },
 "additionalProperties": false
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "taskId",
  "status"
 ],
 "properties": {
  "error": {
   "type": [
    "string",
    "null"
   ]
  },
  "links": {
   "type": "object",
   "properties": {
    "task": {
     "type": "string"
    },
    "result": {
     "type": "string"
    },
    "receipt": {
     "type": "string"
    }
   }
  },
  "result": {
   "type": "object",
   "required": [
    "url",
    "videoId",
    "transcript",
    "transcriptHash",
    "segmentCount",
    "source",
    "serviceVersion"
   ],
   "properties": {
    "url": {
     "type": "string"
    },
    "title": {
     "type": "string"
    },
    "source": {
     "type": "string"
    },
    "videoId": {
     "type": "string"
    },
    "segments": {
     "type": "array",
     "items": {
      "type": "object",
      "required": [
       "text"
      ],
      "properties": {
       "text": {
        "type": "string"
       },
       "endMs": {
        "type": "number"
       },
       "startMs": {
        "type": "number"
       },
       "durationMs": {
        "type": "number"
       }
      }
     }
    },
    "fetchedAt": {
     "type": "string"
    },
    "transcript": {
     "type": "string"
    },
    "serviceName": {
     "type": "string"
    },
    "languageCode": {
     "type": "string"
    },
    "languageName": {
     "type": "string"
    },
    "segmentCount": {
     "type": "number"
    },
    "serviceVersion": {
     "type": "string"
    },
    "transcriptHash": {
     "type": "string"
    },
    "extractorVersion": {
     "type": "string"
    }
   }
  },
  "status": {
   "enum": [
    "accepted",
    "rejected",
    "running",
    "error"
   ],
   "type": "string"
  },
  "taskId": {
   "type": "string"
  },
  "settlement": {
   "type": [
    "object",
    "null"
   ],
   "additionalProperties": true
  },
  "x402Settlement": {
   "type": [
    "object",
    "null"
   ],
   "additionalProperties": true
  },
  "validationReceipt": {
   "type": [
    "object",
    "null"
   ],
   "additionalProperties": true
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/gateway-d402-xyz-youtube-transcript-extractor-d402-gateway-7e4baf5a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from gateway.d402.xyz](https://www.zero.xyz/host/gateway.d402.xyz/llms.txt)
