YouTube Scraper
Get YouTube Transcript
Get a YouTube video or Short's captions as a timestamped transcript and plain text, in a chosen language.
Endpoint
Parameters
| Name | Type | Required | Note |
|---|---|---|---|
| urlstring · required | string | required | YouTube video or short URL |
| languagestring · optional | string | optional | Language code, ie 'en', 'es', 'fr' or 'en-US'. Overrides the default track selection unless original_audio=true. If omitted, prefers captions matching the original spoken language when YouTube identifies the original audio. If that metadata is unavailable or ambiguous, prefers an auto-generated caption, otherwise the first caption track. One of: |
| cache_max_agestring · optional | string | optional | See the Caching page for details. One of: |
| original_audioboolean · optional | boolean | optional | Set to true to return captions only in the original spoken language identified by YouTube. Takes precedence over language. Omit or set to false for the existing default selection. |
Response schema
{
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"url": {
"type": "string"
},
"type": {
"type": "string"
},
"videoId": {
"type": "string"
},
"language": {
"type": "string"
},
"transcript": {
"type": "array"
},
"transcript_only_text": {
"type": "string"
}
},
"additionalProperties": true
}