Engineering and Developers Blog
What's happening with engineering and developers at YouTube
More Ways to Find What You’re Looking For
2011年10月13日星期四
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
标签
.net
360
acceleration
access control
accessibility
actionscript
activities
activity
android
announcements
apis
app engine
appengine
apps script
as2
as3
atom
authentication
authorization
authsub
best practices
blackops
blur faces
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
machine learning
mashups
media:keywords keywords tags metadata
metadata
mobile
mozilla
NAB 2016
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
Super Chat API
survey
tdd
theme
tos
tutorials
updates
uploads
v2
v3
video
video files
video transcoding
virtual reality
voting
VR
watch history
watchlater
webvtt
youtube
youtube api
YouTube Data API
youtube developers live
youtube direct
YouTube Engineering & Developers Blog
YouTube IFrame Player API
YouTube live
YouTube Reporting API
ytd
Archive
2020
十一月
2019
八月
四月
2018
十二月
八月
四月
2017
十一月
九月
八月
三月
一月
2016
十一月
十月
八月
五月
四月
2015
十二月
十一月
十月
五月
四月
三月
一月
2014
十月
九月
八月
五月
三月
2013
十二月
十月
九月
八月
七月
六月
五月
四月
三月
二月
2012
十二月
十一月
九月
八月
七月
六月
五月
四月
三月
二月
一月
2011
十二月
十月
九月
八月
七月
六月
五月
四月
三月
二月
一月
2010
十二月
十一月
十月
九月
七月
六月
五月
四月
三月
二月
一月
2009
十一月
十月
九月
八月
七月
六月
五月
四月
三月
二月
一月
2008
十二月
十一月
十月
九月
八月
七月
六月
五月
四月
三月
二月
2007
十二月
十一月
八月
六月
五月
Feed
Follow @youtubedev