yt-search-api is a lightweight video search proxy API service designed for applications that need to integrate multi-platform video search functionality. Currently supports YouTube search, with plans to expand to more platforms in the future.
- 🚀 High Performance: Supports high concurrency with multiple users
- 🔒 Security: Simple token authentication mechanism
- 🔄 Cache Optimization: Built-in smart caching strategy to reduce repeated requests
- 🔌 Extensibility: Modular design, easy to extend support for more video platforms
- Node.js (>=18) + TypeScript
- Fastify framework
- Memory cache (lru-cache)
- Jest testing framework
Request:
GET /search?platform=youtube&q=keyword
Parameters:
platform(required): Search platform, currently supportsyoutubeq(required): Search keyword
Authentication:
Add the following field to the request header:
Authorization: Bearer your_token
Response Example:
{
"items": [
{
"videoId": "dQw4w9WgXcQ",
"videoUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"title": "Video Title",
"thumbnailUrl": "https://i.ytimg.com/vi/dQw4w9WgXcQ/default.jpg",
"platform": "youtube"
}
],
"nextPageToken": "CAUQAA",
"totalResults": 1000
}This project is licensed under the MIT License - see the LICENSE file for details
