Free trial: 3 of 3 test requests left. Get your own API key with 100 free credits. No credit card.
Get the transcript for a YouTube video by URL.
Endpoint
/v1/youtube/videos/transcript
Query
Link to the YouTube video whose transcript should be returned.
Optional language code to prefer when multiple transcripts exist: a two- or three-letter code (`en`, `es`), optionally with a region or script (`en-US`, `pt-BR`, `zh-Hans`). See `availableLanguages` for the codes a video offers.
When `true`, only return captions in the video's original spoken language, and ignore `language`. If the original language can't be identified or has no captions, `transcript` is `null`. Default: `false`.
const response = await fetch( "https://api.socialfetch.dev/v1/youtube/videos/transcript?url=https://www.youtube.com/watch?v=dQw4w9WgXcQ", { headers: { "x-api-key": "YOUR_API_KEY" } } ); const data = await response.json(); console.log(data);