Social Fetch
YouTube

Get YouTube video transcript

Get the transcript for a YouTube video.

GET/v1/youtube/videos/transcript
1credit
x-api-key*stringheader

API key (`sfk_...`)

Parameters
2
url*stringquery

Link to the YouTube video whose transcript should be returned.

min 1 chars · max 4096 chars

languagestringoptionalquery

Optional ISO 639-1 language code (two letters) to prefer when multiple transcripts exist.

min 2 chars · max 2 chars

Response fields
16

Endpoint-specific response payload.

datalookupStatus
string

Outcome of the transcript lookup.

one of: found, not_found, lookup_failed

Video identity when the lookup resolved.

datavideoid
string

YouTube video id.

min 1 chars

datavideourl
string

Canonical public URL for the video.

min 1 chars

Transcript content when available for the resolved video.

Timed transcript segments.

datatranscriptsegments[]text
string

Transcript segment text.

datatranscriptsegments[]startMs
integer

Segment start offset in milliseconds.

≥ 0

datatranscriptsegments[]endMs
integer

Segment end offset in milliseconds.

≥ 0

datatranscriptplainText
string

Full transcript text, typically derived from captions.

datatranscriptlanguage
string

Human-readable transcript language label when reported by the lookup.

Metadata describing the request and billing outcome.

metarequestId
string

Unique request identifier for tracing this API call.

min 1 chars

metacreditsCharged
integer

Credits charged for this request.

≥ 0

metaversion
string

Public API version that served the response.

one of: v1

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. Inspect `data.lookupStatus` for found, not found, or lookup_failed.

On this page

No Headings