YouTube Video Transcripts API
Our API allows you to programmatically fetch transcripts for YouTube videos. You have two options to use the API:
1. Deploy on Your Own
You can clone our open-source API server and deploy it to your own infrastructure (e.g., Cloudflare Workers). This gives you full control over the API and its usage.
Steps to deploy:
- Clone the repository:
git clone https://github.com/youtube-transcript-plus/youtube-transcript-api.git
- Install dependencies:
npm install
(or yarn/pnpm) - Run locally for development:
npm run dev
- Deploy to Cloudflare: Follow the instructions in the README after
wrangler login
andnpm run deploy
.
2. Use Our Hosted API (Cloud)
Purchase an API license to get immediate access to our managed service. You will receive your Base URL endpoint and License Key via email after purchase.
Currently Supported
Transcript endpoint via YouTube URL or Video ID.
Endpoint
GET /api/v1/transcript
Authentication
Pass your license key via the license
query parameter.
Rate Limits
- 45 requests per 60 seconds
- 5000 requests per 30 days
Need a custom package or higher limits? Email us atapi@youtubevideotranscripts.com, and let us know the rate limits that suit you.
Request Examples
Using full YouTube URL
{BASE_URL}/api/v1/transcript?video=https://www.youtube.com/watch?v=dQw4w9WgXcQ&license={your_license_key}
Using YouTube Video ID
{BASE_URL}/api/v1/transcript?video=dQw4w9WgXcQ&license={your_license_key}
Response Example
View sample response
{
"videoTitle": "Rick Astley - Never Gonna Give You Up (Official Video) (4K Remaster)",
"transcript": [
{
"text": "[♪♪♪]",
"offset": 1.36,
"duration": 1.68
},
{
"text": "♪ We're no strangers to love ♪",
"offset": 18.64,
"duration": 3.24
},
{
"text": "♪ You know the rules
and so do I ♪",
"offset": 22.64,
"duration": 4.32
},
{
"text": "♪ A full commitment's
what I'm thinking of ♪",
"offset": 27.04,
"duration": 4
},
{
"text": "♪ You wouldn't get this
from any other guy ♪",
"offset": 31.12,
"duration": 3.96
},
{
"text": "♪ I just wanna tell you
how I'm feeling ♪",
"offset": 35.16,
"duration": 4.36
},
{
"text": "♪ Gotta make you understand ♪",
"offset": 40.52,
"duration": 2.4
},
{
"text": "♪ Never gonna give you up ♪",
"offset": 43,
"duration": 2.12
},
{
"text": "♪ Never gonna let you down ♪",
"offset": 45.2,
"duration": 1.88
},
{
"text": "♪ Never gonna run around
and desert you ♪",
"offset": 47.32,
"duration": 3.8
},
{
"text": "♪ Never gonna make you cry ♪",
"offset": 51.48,
"duration": 2
},
{
"text": "♪ Never gonna say goodbye ♪",
"offset": 53.6,
"duration": 1.919
},
{
"text": "♪ Never gonna tell a lie
and hurt you ♪",
"offset": 55.72,
"duration": 3.64
},
{
"text": "♪ We've known each other
for so long ♪",
"offset": 60.8,
"duration": 4
},
{
"text": "♪ Your heart's been aching
but you're too shy to say it ♪",
"offset": 64.88,
"duration": 4.159
}
// ... more items ...
]
}
Base URL and License Key will be provided right after purchase (check your email).
Contact & Support
For any questions regarding the API, or for support, please email us at: api@youtubevideotranscripts.com.