Get report of all assets from YouTube Content ID API - youtube-api

I represent a YouTube content owner and I use the YouTube Reporting API to get daily analytical reports on how well our many thousands of assets perform on YouTube.
Those reports only give an asset ID to reference the actual real world asset ie musical sound recording. I plan to read those reports, in bulk, into a streaming platform to get analytics of how the assets are performing. The issue I have is that, in order to match the analytics to the actual sound recording, I need a list of all the assets for which we have control.
I see the YouTube Content ID API gives access to asset lists through their assets and assetSearch resources. The thing is neither really work as the assets resource requires knowledge of the asset IDs already and assetSearch returns a paginated list of only 25 at a time.
What would be best for me would be a CSV of all the assets that I could pass into the streaming platform in one go rather than having to hit a search endpoint thousands of times to get an up-to-date list.
I don't really want to have to build a secondary service to have a database of those assets. It would make far more sense to get an up-to-date list all in one go every day. Is that something that any of the APIs offer?
All other streaming platforms offer some data with their analytics to help us identify what sound recording this relates to, but YouTube seem to make it difficult.

What kind of KPI's do you want to track of those assets? Views or revenue?
In case if its revenue, you could use the Reporting API to get the system-managed reports of the assets and parse and calculate the revenue accordingly.

Related

Playlist video API missed certain posts when ran on particular day

I use Youtube APIs to keep track of the brand assets of a certain channel.
Playlist API: https://www.googleapis.com/youtube/v3/playlistItems
There is a weekly refresh on the platform. In one of the refresh, playlist API missed a certain post in the corresponding week. Post published date was well within the range.
Any justifiable reason for this issue? Just want to get the root cause and probability for this issue to occur, so that I can build some safeguard on my platforms if required.
To my knowledge the result set obtained from PlaylistItems endpoint should be exact -- no fuzziness implied like in the case of Search endpoint. Therefore I am inclined to believe -- you did not provided actual data along with your question -- that there is something else that caused your issue.
Often users of the API overlook the fact that any video could first be uploaded as private and only later made public.
publishedAt (datetime)
The date and time that the video was published. Note that this time might be different than the time that the video was uploaded. For example, if a video is uploaded as a private video and then made public at a later time, this property will specify the time that the video was made public.

YouTube API v3 Order Parameter Possible Bug

Looking at the YouTube API v3 Search documentation, it states that the order parameter is used to control ordering of API response resource results. However, when attempting to order by date, I'm not receiving the results in reverse chronological order as specified. In fact, they are not in any order whatsoever.
API Request with order date using API Explorer UI:
Is there some other way I should be requesting for results to be ordered by the time they were published on YouTube? Is there a bug in the handling of the order API parameter?
There's no bug; the 'order' parameter will sort results based on when the resources were created, This value may be slightly different than when a video is published, as a resource is created when an upload begins but a video is published when the upload finishes and is processed.
In this case, it looks like the 10 or so most recent videos were all uploaded at the exact same time (YouTube.com has a batch uploader), so you're getting the order they were created in, even though the published dates reflect minor differences (maybe a couple took a bit longer to upload or something). IF you scan the full list of results, though, you'll see they play out just fine in terms of their reverse chronological order. And generally you probably won't have so many videos that were batch uploaded like this.

Leverage browser caching for youtube thumbnails

I am using Youtube (v3)API for my website where many youtube video thumbnails are displayed.
For example something like: https://i1.ytimg.com/vi/0ZL_q7oUVrQ/mqdefault.jpg
When I check the Google Insights(https://developers.google.com/speed/pagespeed/insights/) for my website it complains about bad 'Leverage browser caching'. I had already taken care by adding expiry date for static resources coming from my server like js/css files but Google insights is mainly complaining about thumbnail images which are coming externally, direct from Youtube servers.
My website has many of these thumbnails and caching them is very important for fast page loads but youtube servers have set the expiry time for only 6 hours and I do not find a way to change that since they are external to my servers.
I would be very thankful if someone can suggest me of any better way to take care of browser caching for my usecase where resources are coming from external servers(like in my case thumbnails from youtube servers)
I am surprised that Youtube sets the expiry for only 6 hours though images are the least possible resources to change often...!
It's outside of your control so I don't think you can do anything about it.
These are your options:
Cache/update cache yourself.
Get the remote admin to change it (not possible with youtube).
Ignore.

How to retrieve the list of top 1000 games in the iOS App Store in real-time

I'd like to retrieve the list of top 1000 apps (specifically games) in the iOS App Store in real-time. This information is public (at least the top 300), but Apple doesn't offer any API or automated way to fetch these lists. Does anyone know a good service for this?
I've listed similar topics in forums below, as well as different useful resources. Most of these help you track your own applications, but I'm interested in following trends for ALL apps in the App Store.
Thanks!
Similar topics:
How can I use Appstore API to get top100 list? What is the common architecture to build a appstore application website?
https://stackoverflow.com/questions/2689711/itunes-app-store-api
http://www.cocos2d-iphone.org/forum/topic/13167
Solutions:
http://www.appfigures.com
http://majicjungle.com
http://itunes.apple.com/rss/generator
There appears to be no documented public API, but you can (currently) still get at the data.
You can use wireshark (or similar) to figure out the URL sequences and the user agent that iTunes on a Mac or PC uses to get all the popularity sorted pages that it displays when manually clicking through the pages. It's all (currently) done in plain HTTP. You can get 100's of pages for many 1000's of apps this way. Then parse and decode the XML returned for these URLs to get the app names displayed on each page. A bunch of perl scripts driving wget or curl might work.
Note that the URLs, user agent and the format of the XML returned often changes when Apple updates iTunes. So you will need to periodically re-adapt your retrieval mechanism.

Stream Videos Online and Access Rights

I have a web application that i have developed in RoR 2.1. In the app, users have the privilege of uploading media files. Currently, only FLV videos can be streamed online since i have given FLV player browser support.I have used the gem Mime Types to identify the file fomats of the media files being uploaded.
I would like to get the feasibility and ways to implement two new requirements
How can i stream all videos being uploaded online? Should I convert these files to flv or
is there any other way of making it possible?
I want the users who upload the videos to set a privilege (count) of how many users can
stream this video on line at a given time. How can i implement this?
1) for streaming you should use a CDN, this should not be the responsibility of your rails app. Lots of options, I have enjoyed working with S3/Cloudfront. Streaming through your app will really hurt the scalability of your platform. Lets the good folks at the CDN deal with this.
2) To throttle the usage -- I would do the following. When a web user wants to watch a video give them a link you your app (vs directly to the CDN) so http://myapp/video/watch. In that method(VideosController#watch) you can count concurrent views, and if under the threshold then perform a secure redirect to the video.
If you must serve files directly from your server use send_file method (doc)
If you are looking for video playback, there a bunch of javascript/html5 video solutions: VideoJS is a pretty good one: http://videojs.com/, It should be able to handle many different types of video formats
enter link description here
Good luck

Resources