PeumeAPI

Social media data · YouTube

Get YouTube Transcripts

Get transcripts for YouTube videos in bulk, or list and transcribe a channel's videos.

From $0.0005 per unit

Call it

curl https://api.peume.com/v1/call/get-youtube-transcripts \
  -H "Authorization: Bearer $PEUME_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "input": {
    "languages": [
      "en"
    ],
    "transcript_type": "any",
    "output_formats": [],
    "preserve_formatting": false,
    "list_only": false,
    "include_metadata": true
  }
}'

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: get-youtube-transcripts.

Parameters

youtube_urlstring

Required unless 'channel' is provided. Provide one YouTube URL as a string, or multiple as an array (max 100 URLs per run). Works with standard videos, Shorts, youtu.be short links, embed URLs, and m.youtube.com mobile URLs. Channel URLs (youtube.com/@handle, /channel/, /c/, /user/) are detected automatically and treated as the 'channel' input. Each video URL is processed in parallel. If more than 100 URLs are submitted, only the first 100 are processed and a truncation notice is written to the dataset - split larger batches into multiple runs. Invalid URLs are recorded as errors in the datase

languagesarray

Ordered list of ISO 639-1 language codes. The first available transcript matching one of these languages is returned. Example: ["en", "es", "fr"] tries English first, then Spanish, then French. Defaults to ["en"] when omitted.

Example: ["en"]

translate_tostring

Optional. If set to an ISO 639-1 code (e.g. "es", "fr", "de"), the picked transcript is translated to this language. Requires the source transcript to be translatable - run with list_only=true first to see translation_languages for each available transcript. If translation is unavailable, the original transcript is returned (no error).

transcript_typestring

Filter which transcript variant to consider when both manually-created and auto-generated captions exist for a language. "any" picks whichever matches the language priority first; "manual" only considers human-made captions; "generated" only considers auto-generated.

any · manual · generated

Example: any

output_formatsarray

Optional list of extra output formats to include in the dataset alongside the default structured fields. Allowed values: "srt" (SubRip subtitles), "vtt" (WebVTT subtitles), "text" (plain text, newline-separated). Unknown values are ignored with a warning. The structured fields (timestamped, non_timestamped, etc.) are always included.

Example: []

preserve_formattingboolean

If true, keep YouTube's inline HTML formatting tags (<i>, <b>) in transcript text. Default false (strips them for clean text).

Example: false

list_onlyboolean

If true, do NOT fetch any transcript. Instead, for each URL return the list of all available transcripts with their language code, generated/manual status, is_translatable flag, and translation_languages. Useful for discovering what languages exist before picking one. Not charged as a videoprocessed event. Video metadata is not fetched in discovery mode (include_metadata is ignored).

Example: false

include_metadataboolean

If true, attach video metadata from the same YouTube response that carries the captions: title, description, channel_name, channel_id, channel_url, view_count, video_duration_seconds, thumbnail_url, tags, was_live. No extra request and not charged. For like_count, upload_date, categories and availability enable include_extended_metadata. Ignored when list_only is true. Defaults to true.

Example: true

include_extended_metadataboolean

If true, run a second lookup per video for the fields the caption response does not carry: like_count, upload_date, categories, availability. Adds about 1-3 seconds per video and is charged as a videometadata event when it succeeds; if it fails, the transcript and the basic metadata are still returned and metadata_error is populated. Requires include_metadata. Defaults to false.

Example: false

channelstring

Optional. One YouTube channel as a string, or multiple as an array. Accepts an @handle ("@mkbhd"), a bare handle ("mkbhd"), a channel ID ("UCBJycsmduvYEL83R_U4JriQ"), or any channel URL (/channel/, /c/, /user/, /@handle; a /videos, /shorts, or /streams tab URL keeps that tab). Each channel produces one dataset row per video, newest first, up to max_videos: video_id, url, title, duration, view count, and thumbnail, plus the channel's subscriber count, verified badge, handle and avatar on every row (and its About text when include_channel_description is true). Rows are marked result_type="channe

max_videosinteger

Maximum number of videos to list per channel, newest first. Default 100. Values above 1000 are capped at 1000 (and values below 1 are raised to 1) with a log warning rather than failing the run. When channel_transcripts is true, at most 100 videos per run (across all channels plus explicit URLs) proceed to transcript extraction.

Example: 100

channel_transcriptsboolean

If true, every video listed from the channel(s) is also queued for transcript extraction (newest first, deduplicated against youtube_url entries, subject to the 100 videos per run limit). Each successful transcript is charged as a videoprocessed event, exactly like videos passed via youtube_url. Default false: channels are only listed.

Example: false

include_channel_descriptionboolean

If true, every channel listing row also carries channel_description, the channel's About text (up to 1,000 characters). It comes from the same request as the listing, so it adds no time and no charge; it is off by default only because the same text repeats on every row. The subscriber count, verified badge, handle and avatar are always included. Default false.

Example: false

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.