How to use Youtube Data V3 Data API to download feeds using chanel username?
I've explored most of this topic using the previous question How do I get the list of uploaded videos for a specific channel with the new YouTube Data API (V3)? but I need some specifics based on the answer.
Is it possible to use the channel name without calling the search query to get the channel ID? I have an https request that can get the search list shown below, but I'd rather not waste API quotas when I know the exact username of the channel.
https://www.googleapis.com/youtube/v3/search?q={channel_username}&key={my_api_key}&part=snippet
My hack for this is to just take the videoid from the feed and extract the bootloader id from it, but it's not graceful and won't work if the download is removed.
Also, once I've worked my way up to getting the uploads key, how can I get a json that shows all uploads, not just a list of 25? If I have to recursively call the download pages, how can I do that?
Thank.
source to share
I think for getting a channel using the channel username, the only option is to use lookup, and the best strategy to minimize quota usage is to use cache or store the channel ID.
For a complete list of uploaded videos as JSON, you can use contentDetails.relatedPlaylists.uploads (the id of the playlist that contains the uploaded videos) and retrieve the PlaylistItems using pages with 50 items per page and using the nextPageToken value to retrieve each page in the result set ...
source to share
I found the answer. The correct way to do this is to query the site using a search, but specify the list type directly for the response, essentially searching for channels only. This is done with
https://www.googleapis.com/youtube/v3/search?q={search_term}&key={API_key}&type=channel&part=snippet
As you can see, type is a channel. When you search with the search term for the exact username of the channel, you will get a return list with the first object of the object as the channel, and you can save the channel ID and load it there.
source to share
To update this answer, you need to define "quota limits".
Thus, for use of " search? Q = [search] " 100 quotas will be applied.
Better to use " channels? Part = id & forUsername = {username] " as soon as quota is 1.
Then you can use " channels? Part = id, snippet ....... & id = {channel_ID] " to capture all your data
source to share