PeumeAPI

Social media data · YouTube

YouTube video captions by video id — SRT, XML, JSON3, text

Retrieve available caption tracks for a YouTube video or request captions in SRT, XML, JSON3, or plain-text format.

$0.022 per lookup, only when foundUsually answers in a few seconds

Call it

curl https://api.peume.com/v1/call/youtube-video-captions-by-video-id-srt-xml-json3 \
  -H "Authorization: Bearer $PEUME_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "input": {
    "videoId": "your videoId",
    "languageCode": "",
    "format": "srt"
  }
}'

Answer: {"id": "run_…", "status": "completed", "cost_usd": …, "output": {…}}. Long jobs answer 202 with a run id to read later. From an AI agent, connect the MCP server and ask for this by name: youtube-video-captions-by-video-id-srt-xml-json3.

Parameters

videoIdRequiredstring

The unique identifier for a YouTube video.

languageCodestring

Caption language code, such as en, zh-Hans, or a.en. Leave it empty to retrieve available caption tracks.

Example:

formatstring

Caption output format. Available Values: - `srt`: SubRip caption format with timeline cues - `xml`: Original XML caption format - `json3`: YouTube original JSON caption structure - `txt`: Plain text without timeline cues One of: srt, xml, json3, txt.

srt · xml · json3 · txt

Example: srt

Start free · $1 of calls included

Every API your product needs. One key.

7,267 endpoints, one bill, and you only pay for calls that work.