Engineering and Developers Blog
What's happening with engineering and developers at YouTube
Latest Release Notes
Wednesday, June 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
.
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
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
Feedback Time
Latest Release Notes
Python client library support for the YouTube API
Fn ( Fried (Macaroni, Cheese), Creativity (EA, You...
Registrations Open for "Powered By YouTube"
Spotlight on: TimeTube
YouTube in your Living Room
Google I/O Wrapup
May
April
March
February
2007
December
November
August
June
May
Feed
YouTube
on
Follow @youtubedev
No comments :
Post a Comment