FastAPI wrapper for youtube-transcript-api library.
Root endpoint with API information
Health check
Get transcript for YouTube video
Request:
{
"video_id": "dQw4w9WgXcQ",
"lang": "en"
}Response:
{
"success": true,
"videoId": "dQw4w9WgXcQ",
"transcript": "Full text here...",
"length": 2089
}GET alternative for transcript
# Install dependencies
pip install -r requirements.txt
# Run server
uvicorn main:app --reload
# Test
curl http://localhost:8000/health
curl -X POST http://localhost:8000/transcript \
-H "Content-Type: application/json" \
-d '{"video_id":"dQw4w9WgXcQ"}'- Push code to GitHub
- Create Railway account (https://railway.app)
- Deploy from GitHub repo
- Railway auto-detects Dockerfile
- Get public URL
See: ../plan.md - Tasks 2 & 3