Upload caption tracks to YouTube videos via the Data API v3

domain: developers.google.com · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Authenticate with OAuth 2.0 using a scope that includes 'https://www.googleapis.com/auth/youtube.force-ssl' — caption upload requires this scope, not the read-only scope
  2. Prepare your caption file in one of YouTube's accepted formats: SRT, VTT, SBV, TTML, or SCC — the file must be encoded in UTF-8
  3. Call POST 'https://www.googleapis.com/upload/youtube/v3/captions' with 'uploadType=multipart', include a JSON metadata part with 'snippet.videoId', 'snippet.language' (BCP-47 code), and 'snippet.name', and attach the caption file as a second part
  4. Set the 'isDraft' field in the snippet to true if you want to review the captions before making them public — drafts are visible only to you and channel managers
  5. Handle the quota cost of 400 units per captions.insert call — plan batch uploads accordingly within your project's daily quota, and use captions.update for subsequent edits rather than deleting and re-uploading
  6. Verify the upload by calling GET 'https://www.googleapis.com/youtube/v3/captions' with the 'videoId' query parameter and checking that the new track appears with the correct language and name

Known gotchas

Related routes

Manage video caption and subtitle tracks via the Vimeo Text Tracks API
developer.vimeo.com · 6 steps · unrated
Upload videos to YouTube via Data API within quota
youtube-api · 4 steps · unrated
Upload a video using the Vimeo API
developer.vimeo.com · 6 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans