AI summarization of YouTube videos is one of the most popular use cases for transcript APIs. The workflow is simple: extract the spoken text, chunk it if needed, and send it to an LLM with a summarization prompt.
This guide walks through building that pipeline with FreeTranscriptAPI and any OpenAI-compatible model.
Step 1: Extract the transcript
Start with a YouTube URL. The API returns structured JSON with text segments and timestamps.
Example request
curl "https://api.freetranscriptapi.com/v1/transcript?video_url=https://www.youtube.com/watch?v=dQw4w9WgXcQ"Step 2: Prepare text for the LLM
Concatenate transcript segments into a single string. For long videos, chunk by time windows (e.g., 10-minute blocks) and summarize each chunk, then summarize the summaries.
Python example
import requests
response = requests.get(
"https://api.freetranscriptapi.com/v1/transcript",
params={"video_url": "https://www.youtube.com/watch?v=VIDEO_ID"},
)
data = response.json()
full_text = " ".join(segment["text"] for segment in data["transcript"])
summary_prompt = f"Summarize this video transcript in 3 bullet points:\n\n{full_text}"Step 3: Send to your LLM
Pass the prepared text to GPT-4, Claude, Gemini, or any model. The transcript already contains the spoken content, so the LLM does not need to process audio.
Why timestamps matter for AI workflows
Each transcript segment includes start and duration in seconds. This enables:
- Timestamped summaries ("At 5:30, the speaker discusses...")
- Chapter generation from topic shifts
- Linking summary points back to video moments
- Selective re-summarization of specific time ranges
Handling long videos
A 2-hour podcast might produce 30,000+ words of transcript. Most LLMs have context limits, so use a map-reduce pattern:
- Split transcript into chunks by time or word count
- Summarize each chunk independently
- Combine chunk summaries into a final summary
With 200 free requests per day, you can process hundreds of videos through this pipeline without paying for the transcript layer.
Automation with n8n
n8n users can chain an HTTP Request node (calling FreeTranscriptAPI) with an OpenAI node. Trigger on new YouTube URLs from a spreadsheet, RSS feed, or webhook. No custom code required.