A simple go api server to search videos/songs on YouTube & YouTube Music.
- Search YouTube videos and YouTube Music tracks
- SQLite caching to reduce rate limits
- Youtube visitor data randomization
- Configurable request timeouts
- Optional IPv6 rotation support (subnet should be multiple of 16)
go build -o youtube-searchapi .docker compose up -dCreate a config.yaml file:
server_addr: ":8080"
max_visitor_count: 2
request_timeout: 10
logging:
level: "info"
format: text
no_color: false
add_source: false
caching:
enabled: true
cache_dir: cache.db
cache_max_limit: -1 # -1 for unlimited./youtube-searchapi -config config.yamlGET /api/youtube/search?query=<search_term>
GET /api/youtubemusic/search?query=<search_term>
curl "http://localhost:8080/api/youtube/search?query=lofi+beats"