Reputation: 10384
When including multiple YouTube channel ids the response does not return a result.
Returning video results from multiple channel ids with the API request.
Request
GET https://www.googleapis.com/youtube/v3/search?part=snippet&channelId=UCiAW4HQiYjpPmyi4v905u1A%2C+UCrFCDzgIucPi7x_OzsYefWQ&key={YOUR_API_KEY}
Response
The response is empty.
{
"kind": "youtube#searchListResponse",
"etag": "\"XpPGQXPnxQJhLgs6enD_n8JR4Qk/-f6JA5_OcXz2RWuH1mpAA2_9mM8\"",
"regionCode": "US",
"pageInfo": {
"totalResults": 0,
"resultsPerPage": 5
},
"items": [
]
}
Upvotes: 0
Views: 1348
Reputation: 61
Channel's request accepts multiple channel IDs like below: https://www.googleapis.com/youtube/v3/channels?part=snippet&id=UCiAW4HQiYjpPmyi4v905u1A%2CUCrFCDzgIucPi7x_OzsYefWQ&key={YOUR_API_KEY}
But nowadays there no way to get video IDs directly from channels API response, you have to set "part=snippet%2CcontentDetails" in channel request part, and then fetch ID of list uploaded videos in response ("relatedPlaylists" -> "uploads"). Then you can get whole channel's videos ID's by playListItems request: https://developers.google.com/youtube/v3/docs/playlistItems
Upvotes: 2