Question: Why am I receiving only 1 video from the below actions I take with the YouTube Data V3 API? The example channel I am trying to pull videos from (https://www.youtube.com/user/JayLenosGarage/videos) has multiple videos.
I'm trying to fetch all the videos and their associated ids from the Youtube data api v3 for a specific channel. Let's use the example channel JayLenosGarage.
So following this video on YouTube (https://www.youtube.com/watch?v=jdqsiFw74Jk&t=757s) which says to first get an "uploads" id by querying the channels#list api, then taking using the uploads id to run a query thru playlists#list api, I ran queries thru the API explorer (I also tried curl with an API_KEY) for JayLenosGarage channel on Youtube as follows and received the following output:
Channels#list api query:
GET https://www.googleapis.com/youtube/v3/channels?part=contentDetails&id=UCQMELFlXQL38KPm8kM-4Adg&key=<API_KEY>
# returns:
{
"kind": "youtube#channelListResponse",
"etag": "\"sZ5p5Mo8dPpfIzLYQBF8QIQJym0/z48ndyqvca6Iiuq8GhSM74uM6Ho\"",
"pageInfo": {
"totalResults": 1,
"resultsPerPage": 1
},
"items": [
{
"kind": "youtube#channel",
"etag": "\"sZ5p5Mo8dPpfIzLYQBF8QIQJym0/ZrtYB2hQFGE9E0BKmRhauZQb1kI\"",
"id": "UCQMELFlXQL38KPm8kM-4Adg",
"contentDetails": {
"relatedPlaylists": {
"likes": "LLQMELFlXQL38KPm8kM-4Adg",
"uploads": "UUQMELFlXQL38KPm8kM-4Adg",
"watchHistory": "HL",
"watchLater": "WL"
}
}
}
]
}
Playlist#list api query:
GET https://www.googleapis.com/youtube/v3/playlists?part=snippet&id=UUQMELFlXQL38KPm8kM-4Adg&key=<API_KEY>
# returns:
{
"kind": "youtube#playlistListResponse",
"etag": "\"sZ5p5Mo8dPpfIzLYQBF8QIQJym0/DWOe-LD4_fSk0yC55HX_ZOrkuy4\"",
"pageInfo": {
"totalResults": 1,
"resultsPerPage": 20
},
"items": [
{
"kind": "youtube#playlist",
"etag": "\"sZ5p5Mo8dPpfIzLYQBF8QIQJym0/3CSCtGQNcyDVWQJAktkawoG7h7k\"",
"id": "UUQMELFlXQL38KPm8kM-4Adg",
"snippet": {
"publishedAt": "1970-01-01T00:00:00.000Z",
"channelId": "UCQMELFlXQL38KPm8kM-4Adg",
"title": "Uploads from Jay Leno's Garage",
"description": "",
"thumbnails": {
"default": {
"url": "https://i.ytimg.com/vi/hnjbaBzq7II/default.jpg",
"width": 120,
"height": 90
},
"medium": {
"url": "https://i.ytimg.com/vi/hnjbaBzq7II/mqdefault.jpg",
"width": 320,
"height": 180
},
"high": {
"url": "https://i.ytimg.com/vi/hnjbaBzq7II/hqdefault.jpg",
"width": 480,
"height": 360
},
"standard": {
"url": "https://i.ytimg.com/vi/hnjbaBzq7II/sddefault.jpg",
"width": 640,
"height": 480
},
"maxres": {
"url": "https://i.ytimg.com/vi/hnjbaBzq7II/maxresdefault.jpg",
"width": 1280,
"height": 720
}
},
"channelTitle": "Jay Leno's Garage",
"localized": {
"title": "Uploads from Jay Leno's Garage",
"description": ""
}
}
}
]
}