strapi-plugin-youtube-transcript
v1.0.0
Published
Fetch and generate transcripts from YouTube videos. Store them as content types and expose via REST API.
Maintainers
Readme
Strapi Plugin: YouTube Transcript
Fetch and generate transcripts from YouTube videos. Store them as content types and expose via REST API.
Installation
npm install strapi-plugin-youtube-transcriptThen enable in config/plugins.ts:
export default {
'youtube-transcript': { enabled: true },
};Authentication
| Endpoint | Auth required |
|----------|--------------|
| POST /fetch-transcript | ✅ Yes — Bearer token or session |
| GET /transcripts | ❌ Public |
| GET /transcripts/:id | ❌ Public |
| DELETE /transcripts/:id | ✅ Yes — Bearer token or session |
To call authenticated endpoints, pass your Strapi API token:
curl -H "Authorization: Bearer <YOUR_API_TOKEN>" ...API Reference
Fetch and save a transcript
POST /api/youtube-transcript/fetch-transcript
Authorization: Bearer <YOUR_API_TOKEN>
Content-Type: application/json
{ "videoUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ" }Response:
{ "data": { "documentId": "...", "videoId": "dQw4w9WgXcQ", ... }, "created": true }If the transcript already exists, it is updated and
createdisfalse.
List all transcripts
GET /api/youtube-transcript/transcriptsGet transcript by ID
GET /api/youtube-transcript/transcripts/:idDelete transcript
DELETE /api/youtube-transcript/transcripts/:id
Authorization: Bearer <YOUR_API_TOKEN>Content Type Schema
| Field | Type | Description |
|-------|------|-------------|
| videoId | string (unique) | YouTube video ID (e.g. dQw4w9WgXcQ) |
| videoUrl | string (unique) | Full YouTube URL |
| transcript | richtext | Full transcript text |
| language | string | Language code (e.g. en) |
| segments | json | Timestamped transcript segments [{ text, start, duration }] |
Local Development
Clone this repo. The project contains the plugin and a playground Strapi app.
# 1. Build the plugin
cd plugins/strapi-plugin-youtube-transcript
npm install
# 2. Run the playground
cd ../../playground
npm install
npm run developLicense
MIT
