Add YouTube transcript extraction to any JavaScript project. Our API works with the native Fetch API in browsers and Node.js 18+, as well as libraries like axios. Build Chrome extensions, web apps, or serverless functions that extract captions from any YouTube video instantly.
npm install node-fetchconst API_KEY = "YOUR_API_KEY";
const VIDEO_URL = "https://www.youtube.com/watch?v=dQw4w9WgXcQ";
const response = await fetch(
`https://api.youtubetranscripts.co/v1/transcript?url=${encodeURIComponent(VIDEO_URL)}`,
{
headers: { "x-api-key": API_KEY },
}
);
const data = await response.json();
console.log(`Title: ${data.title}`);
console.log(`Channel: ${data.channel}`);
data.transcript.forEach((segment) => {
console.log(`[${segment.start.toFixed(1)}s] ${segment.text}`);
});Works with native Fetch API in browsers and Node.js 18+
Compatible with axios, node-fetch, and got
Perfect for Chrome extensions and browser-based tools
Returns standard JSON, no SDK required
Batch endpoint for processing multiple videos at once
CORS-enabled for client-side requests
Sign up in 30 seconds. Get 150 free API requests. No credit card required. Your JavaScript integration can be live in minutes.