Youtube API not showing all videos - youtube-data-api

I'm quite new to Youtube API and I've been trying to retrieve a list of the most watched video musics. The code seems to work fine, but it doesn't show all results (some videos are missing)
Current link/code:
https://www.googleapis.com/youtube/v3/search?type=video&part=snippet&order=viewCount&maxResults=50&videoCategory=10&key={key}
It shows up to 50 videos but some are missing and I don't know why (I even checked and they also are 'music' category)
Ex: Justin Bieber Baby (1,546,982,110 views) Ariana Grande Problem (955,619,144 views) etc..
Thanks!

Related

YouTube Video Topics/Categories

I'm working with YouTube videos and I noticed the field topicDetails.topicCategories (see in the API). It's not clear to me if this field is autogenerated by YouTube or if the user has to fill it. I tried to find some relevant field when editing the video but I didn't find it anywhere. So I guess YouTube fills this field based on tags, keywords etc. Is that correct?
google Api Explorer Check this site to see for which api you need which parameters.
I couldn't find a definitive answer for your question in the YouTube documentation for topicCategories, but I have some evidences that it is automatically calculated by YouTube.
First I couldn't find a way to set it in the configuration options of the channel I created.
Second, they used to have a (now deprecated) attribute called Guide Category they explicitly say:
A guideCategory resource identifies a category that YouTube algorithmically assigns based on a channel's content or other indicators, such as the channel's popularity. The list is similar to video categories, with the difference being that a video's uploader can assign a video category but only YouTube can assign a channel category.
So I believe that this Topic Category is automatically calculated by You Tube.

Filtering out people in google photos using content filter does not appear to work

I am trying to select all pictures that do not feature people using the following content filter
{
"filters": {
"contentFilter": {
"excludedContentCategories": [
"PEOPLE",
"SELFIES",
]
}
}
}
However, I am puzzled by the results. The selection includes a lot of photos that feature people. One of the example is passport like picture of a person face front which should unmistakably fall into PEOPLE category to my mind at least. I also realise that categorising pictures is a difficult task and there bound to be some miscategorisation, so I do not expect that picture with people not showing faces, or only occupying small part of the picture might appear. However, the results I am seeing when applying the above filter is so random and not selective that it makes me think that this functionality simply is not working.
Maybe I am doing something wrong? Perhaps someone can suggest a better way of selecting pictures without people on them?
Thank you.
P.S. I am aware that pictures recently uploaded to google might not have been categorised yet. However, I was applying the filter to my photo collection that was uploaded to Google photos about a month prior to my tests. So I would assume that categorisation would have happened by then.
I can confirm that there is currently an issue with the PEOPLE content category. Unfortunately, at the moment this category is somewhat inaccurate and does not correctly include most media items with people or persons. Our apologies!
Based on your report we identified the issue and will be addressing it in the next release of the Google Photos Library API. Thank you for reporting it!
I have filed an issue on the issue tracker here: https://issuetracker.google.com/111143493
(You can "star" the issue to be notified if there are any updates.)

What HTML tags to display video preview in iMessage?

I'm trying to understand how Amazon does it to make this page play a video preview when its link is sent in iMessage:
https://www.amazon.com/Amazon-Fire-TV-Stick-With-Alexa-Voice-Remote-Streaming-Media-Player/dp/B00ZV9RDKK/ref=as_li_ss_tl?ie=UTF8&qid=1495387130&sr=8-2
After a bit of research, I've read multiple times that OGP og:video tags do the trick, however that page contains none.
The video that shows in iMessage is the one that appears as the last product image.
Any idea?

How to make the youtube video in Joomla article variable?

I have training material consisting of multiple lessons (= YouTube video’s).
I want these to be played within one and the same Joomla article, so that the comments of all students / viewers are shared over all lessons/video’s of that training.
For each lesson the student receives an email with the url, which is the same for all lessons, but with a variable to drive the correct video.
How to do this?
Are you looking for an extension or a way to develop a solution with javascript and PHP ??
In the first case you can try the media gallery extension supplied in the Joomla! extension directory, but I'm not sure that you find what you looking for...
In the second case you can building something with a little combinaison of javascript and PHP. One way that you can follow :
insert the id of the video in the url who's sent to the student then start the video by triggering a click on the player of the video.

Extract the number of views/revenue for a specific video (Youtube CMS)?

My friend works as a CMS admin for a Youtube Network and asked me if there is a way to automatically extract the number of views and the revenue for specific videos. Let me explain. If some people upload copyrighted material, as a CMS admin you have 2 options, either remove the video or claim it/add an asset so that ads appear on the video when being watched but the problem is that those videos are not connected to an partnered account so you can't see the revenue for that channel but have to check each video individually. So if I have a video (making it up) with the link: http://www.youtube.com/watch?v=123abcEFG56, you can take the code of the video, "123abcEFG56", paste it into the search-box of the Youtube CMS analytics and you get all the information for that video if you claimed it/added an asset to it (he tried to search by using words which are part of the video title (he tried even the exact title) in the YT CMS analytics but this works only for videos that are uploaded on a partnered channel/account so for videos uploaded on non-partnered channels, you can only view the statistics for that video if you put in the code of the video into the search box).
I came up with an idea, I visited some of the channels with the claimed videos, clicked on the video's tab and copied the html code. Then, by using a regular expression and PowerShell (Win7), I extracted all the video codes into a .txt file. Each line of the .txt file contains one video code, for example, it would look something like this:
123abcEFG56
123abcEFG57
123abcEFG58
...
So, this is not about a regular Youtube account but a CMS account and since analytics offers it, I would like to extract the data from the "Last Month" (default on Youtube is: "Last 30 days").
I am not familiar with the Youtube-API, so my question is, is it possible (and if yes, how) to make a batch script which would take one code per line and request the views and revenue made last month for the video with the corresponding code, and then "write" that info into another .txt or .csv file (ideally: "Video name", "Number of views", "Revenue")?
Thanks in advance for your answers!
You can use the Content ID API for this. Please reach to your partner manager for details.

Resources