Get YouTube video transcript
Get the transcript for a YouTube video by URL.
Headers
Get your API keyAPI key (`sfk_...`)
Link to the YouTube video whose transcript should be returned.
min 1 chars · max 4096 chars
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.
pattern: ^[a-zA-Z]{2,3}(-[a-zA-Z0-9]{2,8})*$
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`.
Endpoint-specific response payload.
Outcome of the transcript lookup.
one of: found, not_found, lookup_failed
Video identity when the lookup resolved.
YouTube video id.
min 1 chars
Canonical public URL for the video.
min 1 chars
`video` for a regular video, `short` for a YouTube Short. `null` when unknown.
one of: video, short, null
Transcript content when available for the resolved video. `null` when the video has no readable transcript; such lookups are free.
Timed transcript segments.
Transcript segment text.
Segment start offset in milliseconds.
≥ 0
Segment end offset in milliseconds.
≥ 0
Full transcript text, typically derived from captions.
Human-readable transcript language label when reported by the lookup.
Language code of the caption track that was returned, as listed in `availableLanguages`. `null` when it can't be determined reliably.
`true` when the returned captions were generated automatically by YouTube, `false` when they were uploaded by the creator. `null` when it can't be determined reliably.
Caption tracks the video offers, including when `transcript` is `null`. Empty when the video has none or the lookup did not resolve.
Language code of the caption track. Pass it as `language` to request this track.
min 1 chars
Human-readable language name, for example `English` or `Portuguese (Brazil)`. `null` when not reported.
`true` for captions generated automatically by YouTube, `false` for captions uploaded by the creator.
Metadata describing the request and billing outcome.
Unique request identifier for tracing this API call.
min 1 chars
Credits charged for this request.
≥ 0
Public API version that served the response.
one of: v1
True when served from shared response cache. Credits still apply (full endpoint price); Age header may be present.
Code example
curl "https://api.socialfetch.dev/v1/youtube/videos/transcript?url=https://www.youtube.com/watch?v=dQw4w9WgXcQ" \
-H "x-api-key: YOUR_API_KEY"Responses
Transcript lookup result.