Learn how to integrate with our YouTube Transcript API.
Include this key in your request headers as shown in the example below.
Get transcript data for a YouTube video.
// Node.js example using axios
const axios = require('axios');
async function getTranscript() {
try {
const response = await axios.get('https://www.free-youtube-transcript.com/api/transcript', {
params: {
url: 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'
},
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
});
console.log(response.data);
} catch (error) {
console.error('Error fetching transcript:', error.response?.data || error.message);
}
}
getTranscript();
{
"success": true,
"data": {
"transcript": [
{
"text": "We're no strangers to love",
"start": 0.0,
"duration": 4.12
},
{
"text": "You know the rules and so do I",
"start": 4.12,
"duration": 3.76
},
{
"text": "A full commitment's what I'm thinking of",
"start": 7.88,
"duration": 4.24
}
],
"video_id": "dQw4w9WgXcQ",
"video_title": "Rick Astley - Never Gonna Give You Up",
"language": "en"
}
}
Name | Required | Description |
---|---|---|
url | Yes | YouTube video URL |
Status | Description |
---|---|
400 | Missing or invalid URL |
401 | Missing or invalid API key |
404 | Transcript not found |
429 | Rate limit exceeded (100 requests/hour) |