惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

人人都是产品经理
人人都是产品经理
博客园_首页
IT之家
IT之家
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Vercel News
Vercel News
美团技术团队
D
Docker
WordPress大学
WordPress大学
T
Tailwind CSS Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
The Cloudflare Blog
Y
Y Combinator Blog
F
Fortinet All Blogs
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
G
Google Developers Blog
爱范儿
爱范儿
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
月光博客
月光博客
MongoDB | Blog
MongoDB | Blog
S
SegmentFault 最新的问题
GbyAI
GbyAI
Hugging Face - Blog
Hugging Face - Blog
Microsoft Azure Blog
Microsoft Azure Blog
A
About on SuperTechFans

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
How to Fetch YouTube Transcripts for AI Summarization and...
Walnut Serv · 2026-06-24 · via DEV Community

Walnut Serv

If you're building AI apps that summarize YouTube videos, power RAG over video content, or generate subtitles, you need reliable transcript text — not browser scraping that breaks every other week.

This guide shows a simple REST approach that returns JSON with timestamps, plain text, or raw timed cues.

Why transcripts matter for AI

  • Summarization — feed transcript text to GPT/Claude instead of sending video
  • RAG — chunk timed cues into a vector database for semantic search
  • Accessibility — build caption tools without manual SRT editing
  • Content indexing — search across a channel's spoken content

Quick start with curl

curl "https://get-youtube-transcript.p.rapidapi.com/transcript?video_id=jNQXAC9IVRw&format=json" \
  -H "X-RapidAPI-Key: YOUR_KEY" \
  -H "X-RapidAPI-Host: get-youtube-transcript.p.rapidapi.com"

Replace YOUR_KEY with a key from the YouTube Transcript API on RapidAPI. The Basic plan includes 100 free requests/month.

Python example

import requests

API_URL = "https://get-youtube-transcript.p.rapidapi.com/transcript"
headers = {
    "X-RapidAPI-Key": "YOUR_KEY",
    "X-RapidAPI-Host": "get-youtube-transcript.p.rapidapi.com",
}
params = {"video_id": "jNQXAC9IVRw", "format": "json"}

data = requests.get(API_URL, headers=headers, params=params, timeout=60).json()

for cue in data["transcript"]:
    print(f"[{cue['start']:.1f}s] {cue['text']}")

Response formats

format Use case
json LLM pipelines, metadata + timestamps
text Simple summarization
raw Subtitle/SRT workflows

Parameters

  • video_id — 11-char YouTube ID or pass url with full YouTube link
  • languages — comma-separated codes, e.g. en,pt

Production tip

For batch jobs (indexing hundreds of videos), upgrade to the Ultra plan on RapidAPI — 100k requests/month at $9. Test in the playground first with any public video ID.


Disclosure: I built this API. Feedback welcome — especially on languages, latency, and batch endpoints.

Try it: https://rapidapi.com/wrt/api/get-youtube-transcript