API Reference
Interactive REST API documentation for the Lyra Express server
The Lyra Express API wraps all lyra-sdk functions behind REST endpoints. Start the server with:
cd packages/sdk-examples && npm run dev:expressAll endpoints are available at http://localhost:3000/api/.
Try it out
Use the interactive playground on each endpoint page to send real requests to your local server.
Endpoints
Video
Fetch video details, batch fetch, and title-only lookup.
Channel
Channel metadata and recent uploads.
Playlist
Full playlists, info, IDs, and filtered queries.
Comments
Comment threads, top comments, and replies.
Batch Transcript
Fetch transcripts for entire playlists with concurrency control.
Error Responses
All errors follow the same format:
{
"error": {
"code": 404,
"message": "Video not found: INVALID_ID"
}
}| HTTP Status | Cause |
|---|---|
400 | Validation error (Zod) or invalid URL |
401 | Invalid YouTube API key |
404 | Video/channel/playlist not found |
429 | YouTube API quota exceeded |
502 | YouTube API error |
500 | Internal server error |