I am looking for a way to get top-50 most popular videos from Explore Tab for a specific date or a period of time for a specific country. Can't find a way how to do it in YouTube API Documentation. Is there a way? If not, maybe you know some workarounds for getting a historical data?
For example, I could build a web scraper that would collect trending videos from Wayback Machine but it shows trending videos in the U.S. only.
Also, found YouTube Charts website, but it shows only music.
As far as I know, there is no such public endpoint or public resource to get these results - besides Wayback Machine and the public/official YouTube channels you can find on their website.
However, since you mentioned using Wayback Machine, you could follow these steps:
Enter to Wayback Machine and search for results about the Pouplar on YouTube channel - see example of extract from Jun 15, 20211.
Retrieve the videos shown in the search results from step 1.
That being said, I recommend you to start creating a database for record trending videos everyday - not sure how you can do this by region, though (this is due there are trending videos by "main countries" like UK, India, some parts of Asia, France, but, as I searched, trending applies for ALL countries) - if I'm wrong in this, please, let me know.
Another possible way to get close results to your expectations could be:
Enter to Popular on YouTube channel and check the Popular now playlist.2
Retrieve those results and organize the results - with this, I mean: check the publication date, check the channel's country/location, etc. It's up to you to check how to organize the available data.
1 Please check that probably there is no data/snapshot on a given day you require - using Wayback Machine -.
2 According to the updated date, this playlist is updated everyday, so, you have to make the same procedure mentioned above (create a database that store results everyday, etc.).
Not sure if with an VPN you can set the VPN and try to get the "Popular now" videos from the selected VPN country, might worth give it a try.
Try also contact with YouTube - probably you might get some sort of answer, ask them if they can provide information about trending videos from a specific region - in a specific time.
Related
Getting video in the results even though it didn't match query parameter(q)
The parameter i passed didn't exists in body,title,tags, But the video is relavant. Is API looks any other metadata of video.
For Example: i have given parameter as "mobile", this video https://www.youtube.com/watch?v=j8UNo3vRIB0 is coming as result, here video title and description not contain mobile as parameter
Latest data not coming consistently in youtube api
Some times latest data not coming in youtube data api.
For Example: i have given rule as "amazon". This video https://www.youtube.com/watch?v=6zygd1iW-f4 is showing in youtube website's latest videos but not coming in youtube api result.
Example query: https://www.googleapis.com/youtube/v3/search?part=snippet&order=date&q=amazon&maxResults=50&type=video&key=xyz
W.r.t. point (1), Youtube is working OK, since the content of that video is related to the keyword mobile (please convince yourself by watching the first couple of minutes of that video).
For what concerns your point (2), I cannot in any way make the Youtube site to produce the video 6zygd1iW-f4 near the top of its search result set for the query term amazon.
All in all, I deem your claims above unsustainable.
Please note that one cannot expect crisp results from Youtube when queried with such general terms as yours is. One should not expect Youtube's searching feature to work similarly to say a full-text search in single computer-stored database. There will always be a degree of fuzziness associated to querying Youtube for broad terms.
You are actually stumbling on a very tricky scenario. Your goal is to get the same results via the API that you also see on YouTube’s website, right?
First, make sure that you configured the search endpoint as identical to your YouTube user account as possible:
order: relevance
relevanceLanguage: Same as the language that you set in the menu of YouTube’s website (Use a ISO 639-1 2-letter Code)
regionCode: Same as the country that you set in the menu of YouTube’s website (Use a ISO 3166-1 2-letter Code)
With these settings you will see that the results will be quite similar. But still not identical. Not because the API is not working or is still not properly configured but rather because YouTube’s search results change all the time. Just do the same exact search on YouTube’s website just 10 seconds apart. You’ll see that you get different search results.
I'm working on a application which would gather YouTube user's video data and create some meaningful data and metrics to help the creators market their videos better and expand their audience.
The problem is that since December 18, if I'm not wrong, this kind of practice is forbidden.
Can someone from Google comment and explain this change? Why can't I create metrics based on YouTube data, even if I visibly communicate that this is not data from YouTube?
For example: I would like to fetch users video description and tell what's the keyword density, how well is it prepared for SEO (in % or something).
And I guess that this new term destroys many businesses which are doing exactly that thing, creating meaningful data based on YouTube API. (Tubular, TubeBuddy, VidIQ).
Please! Anyone?
It seems that the YouTube API doesn't give updated results for mostPopular videos in my country since few days.
Example:
This request (https://www.googleapis.com/youtube/v3/videos?part=snippet,contentDetails&chart=mostpopular®ionCode=FR) doesn't give me the same videos results than the ones displayed directly on YouTube for the French most popular channel (https://www.youtube.com/channel/UCmzy72gDEpfXoFV9Xdtd0DQ). It seems that the results of this request is not updated since the 1th of february. Results was real time updated before this.
Does someone know if something is wrong with my API request, or if there are some issues with the YouTube API at this moment?
There is nothing wrong with your request. This is a known issue with the YouTube API reported here for Saudi Arabia (but also applicable to multiple regions), and another related issue here with regard to content from France.
Your best bet would be to follow up with the YouTube team on one of those defects, or potentially (and dangerously) scrape the YouTube site for the correct results.
Problem seems to be solved since 13th of february (maybe someone from Google have seen my post..)
YouTube Channels and chart=mostPopular parameter data are separate data entities, aka you will get different results. They may be related but there is no guarantee you will get the same data. To get the data that you want you may need to query for channel itself and its videos.
I got this information from the thread #Jal linked, there was an update by matthewc...#google.com a few days ago:
The most popular channel for Saudia
Arabia and
the mostPopular chart parameter in the video.list
call
are separate and distinct entities. If you'd like to get the content
of the most popular channel for Saudia
Arabia
please use the Data API video.list call to list the videos with the
channel ID (in this case "UCWY-_j1MCth6yf24m58Bh_Q") by setting the
items/snippet/channelId parameter.
My current concern right now is that there is supposedly a way to get video information from the videos.list endpoint using a channelId, which does not seem the case in the API Explorer. I will update my answer once I figure out what this person meant exactly.
So after scouring the youtube API, and thinking that this may not be possible, I'll give a last try here.
In a nutshell, I am trying to obtain analytical data from youtube's analytics's API for specific videos for a date range (by day if possible). I've found ways to get the channel data that the video reside in, but I have been unable to find how to ontain the specific video data itself. Assuming it exists in v3 that is.
Anyone had any luck with this kind of task at all? Has this feature been developed for v3 as of yet?
Channel Reports is the API to retrieve video metrics. It can filter by video, by country, by lead (for some fields) and accepts timespan and data aggregation granularity. In brief, Available Reports lists all the valid query parameter combinations.
Individual comments can be retrieved with v2 Data API - together with their dates.
This is a question about the Twitter API, which doesn't provide any information on this issue.
It's possible to get the current trending topic for a location, for example: United States:
https://api.twitter.com/1/trends/23424977.json
where 23424977 is the location code for the United States.
It's also possible to get the hourly trending topic for a given day, but world-wide:
https://api.twitter.com/1/trends/daily.json?date=2012-06-10/
However, I have not been able to find out how to get the trending topics on a given day in a given location, that is, a way to combine these two separate calls together.
Anyone has a solution to this?
Thanks.
You can't get this information from twitter API directly. You must regularly query the locations you are interested in for current trends. If you are interested in covering the globe, then you will need some oAuth drones to get past 150/350 request limit per hour.
And then in no time you will have your own archive of trending topics.