Engineering and Developers Blog
What's happening with engineering and developers at YouTube
Latest Release Notes
середа, 25 червня 2008 р.
Posted by Daniel Danciu, Software Engineer
We have recently pushed a few updates to the YouTube API, so here's a quick overview of a few new features you can play with.
Restrict for videos that have location information
You can now restrict your search to videos that have an associated location (latitude-longitude pair). Simply add a 'location=' empty parameter to the URL of your query, whether it is search, or a query for uploads, playlists or favorites:
http://gdata.youtube.com/feeds/videos?location=
You'll notice that all results returned by the api now have a location returned in the
georss:where
tag:
<georss:where>
<
gml:Point
>
<
gml:pos
>
40.44263458251953 -79.94313049316406
<
/gml:pos
>
<
/gml:Point
>
<
/georss:where
>
This opens the gates for some pretty cool mashups that combine Google Maps and YouTube. (And closes out
this
feature request). We'll be doing some more work with geo in the future, so stay tuned.
Country request returned in the header
We now return the country the request came from in the
X-GData-User-Country
header of the response. For example, if you made the request from Switzerland, you'll see the following header in the response from the API server:
X-GData-User-Country: CH
This is useful in a few cases, the most common of which is an authenticated request to a user's own upload, favorites or playlists feed. The API will, in this case, return all videos in the feed, including the videos that are restricted in the country where the request was made from. Combine
X-GData-User-Country
with the
tag to filter out these videos (for example, you can show the video's thumbnail but disable the playback).
Please note that in order to be able to view all videos of a user (including restricted or private videos), the request has to be authenticated and should not contain additional filtering parameters (like
format
or
vq
).
Don't forget that if you have your own website, you can always forward to the API (and we encourage you to do so) the country of origin or IP of origin of your requests using the
restriction=
parameter. This will ensure that videos are properly filtered for the location where your user is. In this case, the
X-GData-User-Country
response header will return the country specified in the
restriction
parameter.
New Standard Feed: Most Popular
There's a new standard feed out there:
http://gdata.youtube.com/feeds/api/standardfeeds/most_popular
It is different from most_viewed or top_rated in the sense that it uses a smarter algorithm to evaluate the popularity of a video. Oh, and if you're an international user, don't forget that the API supports standard feeds for all the countries YouTube does. For example, if you are interested in most popular videos in Germany, du kannst einfach:
http://gdata.youtube.com/feeds/api/standardfeeds/de/most_popular
** This is now called "Rising Videos" on the main site.
Same Authsub tokens for uploads.gdata.youtube.com and gdata.youtube.com
You can now use the same AuthSub token to query a user's inbox, to update a playlist or to upload a video, even with secure AuthSub. No need for hacks. Read more about AuthSub for YouTube in
the docs
.
Programmatic login token is valid for 2 weeks
We have extended the life time of the authentication token obtained via
ClientLogin
from 1 day to 2 weeks. This will hopefully enable a better user experience for all clients of installed applications by not forcing them to login every day.
Enjoy! If you have any questions or feedback, visit us in our
developer forum
.
Мітки
.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