RelayAPI

Extract YouTube video transcript

Extracts captions/subtitles from a YouTube video. Returns segments with timestamps and the full concatenated text. Responds with 200 if ready immediately, or 202 with a job_id to poll.

POST
/v1/tools/youtube/transcript
AuthorizationBearer <token>

API key (rlay_live_* or rlay_test_*)

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://api.relayapi.dev/v1/tools/youtube/transcript" \  -H "Content-Type: application/json" \  -d '{    "url": "string"  }'
{
  "success": true,
  "video_id": "string",
  "language": "string",
  "is_auto_generated": true,
  "segments": [
    {
      "text": "string",
      "start": 0,
      "duration": 0
    }
  ],
  "full_text": "string"
}
{
  "job_id": "string",
  "status": "processing",
  "poll_url": "string"
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  }
}

Found something wrong? Help us improve this page.

Submit an Issue
Requires a GitHub account.View repo