https://github.com/mattwright324/youtube-api-proxy
https://github.com/mattwright324/youtube-api-proxy
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/mattwright324/youtube-api-proxy
- Owner: mattwright324
- License: mit
- Created: 2024-12-26T19:12:33.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-02T18:46:30.000Z (over 1 year ago)
- Last Synced: 2025-02-02T19:33:44.640Z (over 1 year ago)
- Language: JavaScript
- Size: 16.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# YouTube API Proxy
Self-host a user rate-limited YouTube API proxy (must provide your own key for v3).
Requests to V3 make use of the requester's IP as the `quotaUser` parameter so you can enforce your project's
`Queries per minute per user` limit.
```
GET https://ytapi.example.com/v1/resolve_url?url=https://www.youtube.com/@VanityUrl
-> POST https://youtubei.googleapis.com/youtubei/v1/navigation/resolve_url
GET https://ytapi.example.com/v3/videos?part=snippet&id=dQw4w9WgXcQ
-> GET https://www.googleapis.com/youtube/v3/videos?part=snippet&id=dQw4w9WgXcQ
```
## Build
Make a copy of `.env.template` as your `.env` and fill in missing properties.
Check the YouTube API section below to get your own API key and determine allowed paths & parameters.
Make sure dependencies are installed then run
```shell
$ npm install
$ npm run start
```
- http://localhost:3000
- http://localhost:3000/v1/resolve_url?url=https://www.youtube.com/@RickAstleyVEVO
- http://localhost:3000/v3/videos?part=snippet&id=dQw4w9WgXcQ
- http://localhost:3000/v3/videoCategories?part=snippet®ionCode=US
## YouTube API
A YouTube API key is required in your `.env` API_V3_KEY property.
- https://console.cloud.google.com/apis/dashboard
- https://developers.google.com/youtube/v3/getting-started
- https://developers.google.com/youtube/v3/docs