Today we were working on producing some custom Youtube video searches that output to RSS feed. The intent being to then consume the result into a Yahoo Pipes manipulation and ultimately use the result in a new iPhone / iPad app.
Google and Youtube have made the quite easy, which was nice.
YouTube Search as RSS
If you wanted to search for the term “A380” (like the aircraft) then you would use a URL like this: http://www.youtube.com/rss/search/a380.rss
If you wanted to find all the videos recently posted that are tagged “A380” you would use a URL like this: http://www.youtube.com/rss/tag/a380.rss
The above examples can have a space in the search. "Airbus A380” would be:
Must have the two words
Using the + sign you can conjoin two words.
However this appears to deliver the same results as the above search.
Google YouTube API
There is an API available to do more complex searches. These produce some interesting results. The API is available here.
YouTube User Search
Using a USER ID like ours “interactivewebs” you can find all the videos published by us using this search: http://www.youtube.com/rss/user/interactivewebs/videos.rss
It is possible to sort the search results using a tag on the end that looks like this:
Did you know, you can use complex boolean searches at YouTube, and get these out as an RSS feed, but that you may need to fiddle with the feed url to get it to work properly.
You can use:
parenthesis ( …. )
"-" for negation (or is it just excluding the next word)
in searches. For example here is a search I just conducted:
("light sport aircraft" OR (microlight OR ultralight OR lightsportaircraft OR lsa)) AND -ultralightnews
Fancy huh. You can grab this as an RSS by using the rss link in your browser should it provide it, however take note, that YouTube seems to cut the query short in the RSS link if it’s too long (and doesn’t fully evaluate it either if you force it), and it does not return in the expected "most recent upload" order, so some modification of the string is necessary to make it useful. Here’s the RSS feed for the above search
Returning Large Images of the Feed
We also found a neat little search that looks like this:
The end result of this produces some great looking feeds for our use.
Hope this helps others.