Does youtube have a limit of video search result? - youtube

I heard that youtube API has a limit of searching result(about 500 videos) but searching on youtube has no limit.
So, I am trying to get all of the result of some keywords but it seems that there is a limit on searching youtube too.
For example, I think 'league of legends' keyword will have more than 1000 videos but when I searched with that keyword on youtube, The number of videos was about 800.
Does youtube have a limit of video search result? If it has, is there any way that I can get unlimited result?

Another option that might be more suitable for your needs is Google Custom Search API. With GCS, you can set the API for filter the results from a given website - in this case, from YouTube.

Related

How do I get channel IDs for all YouTube channels in Japan?

I want to get channel IDs for all YouTube channels in Japan.
I tried to set the following parameters and call /search of YouTube Data API v3.
part: id
maxResults: 50
regionCode: jp
type: channel
pageInfo.totalResults in the API response is about 200,000 but actually I can only get 583 channel IDs.
583 is too little even if pageInfo.totalResults is an approximate value.
I would like to know how to get all the channel IDs in Japan, either by using the API or not.
I hope you will be able to provide the related information.
I tried to do almost the same for France. As said #stvar there isn't any appropriate endpoint to do so. However with patience and work we can make a kind of work around. My method only retrieves Japanese YouTube channels having indirectly publicly interacted with your starting set (see below).
Get a good starting set (in order to maximize the discover of the Japanese YouTube channels graph). I recommend you for instance to retrieve the top 100 Japanese YouTube channels sorted by view count by using SocialBlade.
For each channel discovered by the comments retrieved at step 3 (automatically) choose whether or not it is a Japanese YouTube channel. You can retrieve this piece of information if it is available for the channel in the "About" tab. To do it in an automatic way check whether or not snippet["country"] == "JP" in https://youtube.googleapis.com/youtube/v3/channels?part=snippet&id=CHANNEL_ID&key=YOUR_API_KEY If country isn't defined you can try to guess (automatically) whether or not it is a Japanese YouTube channel by making more complex checks see isFrench function. These checks are based on "About" tab and uploaded videos.
If the channel is interesting you (is Japanese) retrieve all comments (and so the YouTube channel about channel's videos and in the community tab using CommentThreads: list with part containing snippet and allThreadsRelatedToChannelId filter. If this method doesn't return any data because a video has disabled comments then retrieve the videos list and comments associated using (a) then CommentThreads: list with filter videoId. The approach (a) consists in getting the uploads auto-created playlist id of the YouTube channel by using Channels: list with contentDetails in part and then use PlaylistItems: list to retrieve all public videos uploaded on this YouTube channel. And if the YouTube channel contains more than 20 000 videos which is the upper limit for playlist size, use this script instead of (a). The script consists in faking requests done when browsing videos on a YouTube channel.
Then continue to dive into the Japanese YouTube channel graph by discovering Japanese YouTube channels through the comments found in your starting set and so on.
You can have a look for more details and some helping tools on my GitHub repository dedicated to the same approach for France (I was trying to list all comments let on French YouTube videos).
Of course you might need multithreading and group your YouTube Data API v3 request to reach maxResults upper limit in order to maximize your quota efficiency. Good luck.

YouTube API How to Get Most Viewed Videos of All Time?

I have tried to use the new YouTube API to get the videos with the highest view count of all time.
I have tried to use this request:
GET https://www.googleapis.com/youtube/v3/search?part=id%2Csnippet&maxResults=10&order=viewCount&safeSearch=none&key={YOUR_API_KEY}
I thought it would work. It returns 10 videos that have a quite high view count and are sorted in a descending order by view count. However, those videos are definitely not the absolute top 10.
Is there a way to make YouTube API return the real top of most viewed videos?

Query YouTube API for most liked videos

I am experimenting with YouTube's API, and I am trying to figure out how to return an ordered list of videos by the most number of likes.
I know I can access the number of likes using the video list query, but that is not going to get me what I need.
I need the search query response to have the videos already sorted by most liked.
Is there any query to the API that will do that?
Thanks,
Nathan
The YouTube API does not support ordering video search results by likes.
Order by rating order=rating and number of results with maxResults= For example:
fetch(`https://www.googleapis.com/youtube/v3/search?&channelId=${CHANNEL_ID}&maxResults=1&order=rating&type=video&key=${API_KEY}`)

Explore videos with youtube api

Can i with youtube api explore videos without added search keyword e.g. popular videos per country,new videos,last comments videos or something like that where i can get videos without added search keyword ?
You can check out the Video Feeds developer guide to search for most popular videos and other feeds. You can also limit it to a certain user, country, etc.
In v3, you can use chart=mostPopular option of youtube.search.list.
https://developers.google.com/youtube/v3/guides/implementation/videos#videos-retrieve-most-popular-videos
If you want to get TOP 10 videos in Geographic areas, 7DayTotals, 30DayTotals, ..., you can use dimensions of YouTube Analytics API.
https://developers.google.com/youtube/analytics/v1/dimsmets/dims

Output last and popular youtube videos on site ? any api?

I want to output last videos and popular videos of my youtube channel.
Is there any standart widget, api method for this?
Based on this answer, you can use the YouTube Data V3 API to get the uploads playlist ID, which you can then use to get the latest videos in that playlist. You can change the value of maxResults to return however many videos you want (from 0 to 50).
Use the search:list method to get your most viewed videos by specifying the channel ID and setting order=viewcount (not quite sure what you want when you say popular videos, you could also set order=rating to get the highest rated videos). This video might also help you out.

Resources