I'm working on a PHP project that need to get Youtube channel banner (or cover photo), avatar and uploaded videos from a specific Username.
For avatar and videos, I use: https://gdata.youtube.com/feeds/api/channels?q=Username&alt=json&v=2
But for the channel banner, I have searched on the Internet but no luck. Anyone here can help me? Thank you so much!
YouTube Data API costs are based on quota usage, and all requests will incur at least a 1-point quota cost. For each project, you're allowed 10,000 free quota units per day.
The API provides the ability to retrieve feeds related to videos, users, and playlists. It also provides the ability to manipulate these feeds, such as creating new playlists, adding videos as favorites, and sending messsages. The API is also able to upload videos.
You can do it with V3 of the API. You'll need the actual channel ID (not just the username), and then do a request to:
https://www.googleapis.com/youtube/v3/channels?part=brandingSettings&id={CHANNEL-ID}&key={YOUR_API_KEY}
(Note you'll also need an API key from the cloud console).
If you don't have the channel ID, you can get it from the username with this call:
https://www.googleapis.com/youtube/v3/channels?part=brandingSettings&forUsername={USERNAME}&key={YOUR_API_KEY}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With