YouTube

Retrieve auto-generated or human captions

Returns the caption cues for a YouTube video by its 11-character video id, in the language given by lang (ISO 639-1, default en). Each cue has its text, start time and duration. Works for both auto-generated and human-written captions.

get/youtube/captions/{id}

Request

  • Base URL: https://api.crawlora.net/api/v1
  • URL: https://api.crawlora.net/api/v1/youtube/captions/{id}
  • Auth: API key in header x-api-key

Path parameters

idstring required

YouTube video ID (11-character code)

Query parameters

langstring

Caption language code (ISO 639-1), defaults to en

Headers

x-api-keystring required

API key required

Response

Wrapped caption payload (map[string][]Subtitle)

codeinteger
msgstring

Example response

{
  "code": 200,
  "msg": "OK"
}

Changes

No recorded changes to this operation across all 2 revisions of this API.