15
votes

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!

1

1 Answers

21
votes

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}