Reputation: 777
I'm trying to search for videos on the youtube data api that have the 'syndicate' attribute set to 'allowed' (so they should be allowed to be played on mobile devices).
I tried it that way:
https://gdata.youtube.com/feeds/api/videos?q=music&v=2&prettyprint=true&fields=entry[yt:accessControl/@action='syndicate'](id,title,yt:accessControl)
The return feed looks like this:
<?xml version='1.0' encoding='UTF-8'?>
<feed xmlns='http://www.w3.org/2005/Atom' xmlns:yt='http://gdata.youtube.com/schemas/2007'>
<entry>
<id>tag:youtube.com,2008:video:XXXXXXX</id>
<title>XXXXXXX</title>
<yt:accessControl action='comment' permission='allowed'/>
<yt:accessControl action='commentVote' permission='allowed'/>
<yt:accessControl action='videoRespond' permission='moderated'/>
<yt:accessControl action='rate' permission='allowed'/>
<yt:accessControl action='embed' permission='allowed'/>
<yt:accessControl action='list' permission='allowed'/>
<yt:accessControl action='autoPlay' permission='allowed'/>
<yt:accessControl action='syndicate' permission='denied'/>
</entry>
This is fine, however now I also need to integrate the "permission='allowed'" condition. I already tried it with lots of different combinations (see https://developers.google.com/youtube/2.0/developers_guide_protocol_partial?hl=de#Fields_Formatting_Rules) but wasn't able to get it working. Any hints?
Upvotes: 0
Views: 1036
Reputation: 876
Why not use the V3 API? Here is your query: https://www.googleapis.com/youtube/v3/search?part=id%2C+snippet&q=10&type=video&videoSyndicated=true&key={YOUR_API_KEY} You can try different combos with the API Explorer: https://developers.google.com/apis-explorer/#p/youtube/v3/youtube.search.list?part=id%252C+snippet&q=10&type=video&videoSyndicated=true&_h=1&
Upvotes: 1