Batch Processing and yt:statistics

Showing 1-2 of 2 messages
Batch Processing and yt:statistics James Alday 2/27/12 2:33 PM
I'm building an app that basically replicates the functionality of Youtube Direct within a custom hosted CMS.  Users will upload or select videos they've posted to youtube and we track them for moderation and playing in custom playlists on app pages.  My client is requesting a few custom playlists, including the "most viewed" videos that have been approved in the CMS.  To do this, I need to keep track of the view counts on those videos.  I've created a script that is using batch processing to get info on videos that I select from the DB, but it appears that there is no statistical data in the return from a batch query.  

Am I missing something or is this the case?  Is there any way to create a batch query to get statistical data (primarily view counts) or is this something I will have to make individual requests for?  I was hoping to make a single request for up to 50 videos rather than having to do 50 individual requests to get this data.  Is there a best practice for this type of thing as far as quotas? Thanks!

Re: Batch Processing and yt:statistics Jeffrey Posnick 2/28/12 12:50 PM
Hello James,

 There's no difference from a quota perspective between making a batch
request that contains 50 subentries or making 50 individual requests.
There's obviously less HTTP overhead involved with making a single
batch request and therefore it's a little faster—that's the main

 I'm not very familiar with the results of a video entry batch
requests. I'm somewhat surprised that we don't return the full video
entry, including the yt:statistics element, for batch requests, but if
you tried it and that information's not there, I'll take your word for
it. Given the relatively small number of batch requests that we see,
it's unlikely that we'll be able to persuade the engineering team to
devote the work needed to expand on the information returned.

-Jeff Posnick, YouTube API Team | |