0

I'm trying to search the youtube/google data api for videos with duration above x seconds that also have a minimum of x views.

I was hoping something like

"http://gdata.youtube.com/feeds/api/videos?q=surfing&max-results=25&fields=entry[yt:statistics/@viewCount > 100]&fields=entry[yt:statistics/@seconds > 300]"

would work but that gives me an error ("Inconsistent repeating query parameter fields"). What am I doing wrong?

Dan Lowe
  • 51,713
  • 20
  • 123
  • 112
maezr
  • 145
  • 2
  • 10

1 Answers1

2

found the correct syntax

http://gdata.youtube.com/feeds/api/videos?q=surfing&max-results=25&fields=entry[yt:statistics/@viewCount and media:group/yt:duration/@seconds > 300]
Mxyk
  • 10,678
  • 16
  • 57
  • 76
maezr
  • 145
  • 2
  • 10
  • 2
    I want to point out that any restrictions expressed in the fields= parameter are applied *after* the results are returned from the search index. So if you use max-results=25, there will be 25 results matching `surfing` retrieved from the search index, and then any of those 25 results that don't meet the fields= criteria will be excluded from the response. So the number of results you get back will be less than or equal to 25. Just something to keep in mind. – Jeff Posnick Nov 19 '12 at 21:24