Engineering and Developers Blog
What's happening with engineering and developers at YouTube
More Ways to Find What You’re Looking For
Thursday, October 13, 2011
We’ve got some exciting additions to the list of supported
search parameters
for YouTube feeds that should make it easier to narrow down your search results to exactly the videos you’re looking for. Each of these search parameters has an accompanying element in a
video entry’s
metadata, which we’ll cover as well. Here's a quick rundown:
license
- This parameter lets you filter search results based on whether they're
Creative Commons licensed
(
license=cc
) or use the standard YouTube license (
license=youtube
). The default behavior is to return videos regardless of their license in search results. The license for a given video entry is reflected in its
<media:license>
element.
hd
- This one lets you request videos that have high-resolution versions available. If you specify
hd
(no value is needed), all the videos in your search results will be available for playback in at least 720p, and higher resolutions, like 1080p, might be available, too. If you leave the parameter out, then search results won't be filtered at all based on resolution. The
<yt:hd>
element corresponds to this search parameter.
duration
- If you cater to an audience with a short attention span, then this parameter is for you. This parameter lets you filter search results based on video length. To find videos less than 4 minutes long, use
duration=short
. To find videos that are between 4 and 20 minutes long (inclusive), use
duration=medium
. Only videos that are longer than 20 minutes will be returning when requesting
duration=long
. The
<yt:duration>
element in a video entry provides a video’s exact runtime.
3d
- Finally, for those of you living in the future who want to find
3D content
on YouTube, this aptly-named parameter is for you. Adding
3d
(no value is needed) to your searches will ensure that all videos you get back are available for viewing in 3D. Videos that are available in 3D will have a
<yt:threed>
element in them, and that element will contain more detail about the nature of the 3D content in the given video.
Putting it all together, let’s say you want to use the API to find Creative Commons-licensed 3D YouTube videos that are available in resolutions of 720p and above and are longer than 20 minutes.The following request URL will return a feed of such videos:
https://gdata.youtube.com/feeds/api/videos?prettyprint=true&v=2&license=cc&hd&duration=long&3d
As always, if you have any questions or comments, please let us know in our
developer forum
.
Cheers,
—Jeff Posnick, YouTube API Team
No comments :
Post a Comment
Labels
.net
acceleration
access control
accessibility
actionscript
activities
activity
android
announcements
apis
app engine
appengine
apps script
as2
as3
atom
authentication
authorization
authsub
best practices
blackops
bootcamp
captions
categories
channels
charts
chrome
chromeless
client library
clientlibraries
clientlogin
code
color
comments
compositing
create
curation
custom player
decommission
default
deprecation
devs
direct
discovery
docs
Documentation RSS
dotnet
education
embed
embedding
events
extension
feeds
flash
format
friendactivity
friends
fun
gears
google developers live
google group
googlegamedev
googleio
html5
https
iframe
insight
io12
io2011
ios
iphone
irc
issue tracker
java
javascript
json
json-c
jsonc
knight
legacy
Live Streaming API
LiveBroadcasts API
logo
mashups
media:keywords keywords tags metadata
metadata
mobile
mozilla
news
oauth
oauth2
office hours
open source
partial
partial response
partial update
partners
patch
php
player
playlists
policy
previews
pubsubhubbub
push
python
quota
rails
releases
rendering
reports
responses
resumable
ruby
samples
sandbox
shortform
ssl https certificate staging stage
stack overflow
stage video
staging
standard feeds
storify
storyful
subscription
sup
survey
tdd
theme
tos
tutorials
updates
uploads
v2
v3
video
voting
watch history
watchlater
webvtt
youtube
youtube api
youtube developers live
youtube direct
ytd
Archive
2015
December
November
October
May
April
March
January
2014
October
September
August
May
March
2013
December
October
September
August
July
June
May
April
March
February
2012
December
November
September
August
July
June
May
April
March
February
January
2011
December
October
Insight Report Enhancements
Upcoming YouTube API Events
More Ways to Find What You’re Looking For
Introducing Google Account support and YouTube API...
Support for the Watch Later List
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
July
June
May
April
March
February
January
2009
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
2007
December
November
August
June
May
Feed
YouTube
on
Follow @youtubedev
No comments :
Post a Comment