Thursday, January 14, 2010

YouTube's APIs and Refresher on our Terms of Service

It's been a busy 2009 and we're excited to be back in 2010 to work on all the cool features we have planned for the YouTube APIs in the coming months.

Opening up our API has led to some really cool and fun commercial applications, far beyond what anyone here at YouTube could ever have imagined. Tens of thousands of developers have created great apps and websites that not only entertain and delight users in creative ways but give our content partners more choice and reach in distributing their videos. For example, we recently announced YouTube Direct, an open-source video uploading platform that is built entirely on top of the YouTube APIs and is available to any commercial website that wants to solicit video submissions from their users.

We thought it would be a good idea to start the year by revisiting a subject that many of you have had questions about since the APIs were born: the API Terms of Service.

Launched back in 2007, the YouTube APIs provide access to some of YouTube's core features (uploading, searching and playing videos, organizing playlists, etc.) for your websites and apps. Before using the API, we ask that you do one thing: carefully read through our Terms of Service (TOS). Here are a few things contained in our TOS that you should be aware of.
  • Videos belong to their owners - YouTube is a hosting platform. The videos themselves belong to the content owner (anyone from a major studio to a mother recording her son's graduation). In all cases, the content owner decides how and where their YouTube videos are distributed. Sometimes, video owners don't want others to profit from their work, or sometimes they may want to restrict where their videos are shown. While you may disagree with this decision, we need to respect the content owners' wishes.
  • Standard YouTube video player is key - Consistency in terms of quick video loads and playbacks is a hallmark of the YouTube experience. We therefore ask that you don't enable videos for download, modify a video in any way, or enable playback through means other than other official embeddable players.
  • Don't serve or strip ads from the video - Serving your own ads against a video without sharing revenue with the content creator, or YouTube, is against the TOS. So is using technology that strips out the ads we're serving on videos. Doing this deprives the uploader from legitimate earnings from his or her work. If you want to learn more about monetizing your YouTube apps, check out our API monetization guide.
  • It's ok to charge customers to access your application - Creating a subscription, or a one-time access/download fee to use your website or app is fine. But if you do, make it clear that it's you who's charging for access to the video, not YouTube. If you don't make this clear, you're very likely violating the TOS.
Occasionally, we update our TOS to make things even clearer, or to evolve as new features become available on the Web. But rest assured that the core guidelines in our TOS related to advertising, downloading videos, and using an official player have been there since the TOS's inception.

Our hope is that this post can serve as a reference point to clear up any confusions you might have surrounding our TOS. We're always looking to do more to make the API better for our developers and we are eager to hear your ideas and feedback. If you haven't already, do drop by our YouTube APIs Developer Forum and get in touch with us.

Posted by Kuan Yong, YouTube APIs and Tools Team

Tuesday, November 17, 2009

Enrich your site with YouTube Direct

Today we announced the launch of YouTube Direct, a new tool built on top of YouTube's public APIs that enables any developer to solicit video submissions on their website, powered by YouTube.

Users upload their videos directly on the developer's website, after which the developer can review the submissions and select the best ones to showcase. Since these videos live on YouTube, users are able to reach YouTube's large user base directly while also getting broader exposure and editorial validation for the videos they create.

Although YouTube Direct was originally created with our news partners in mind, we believe that other developers and website owners can benefit from it as well. To put YouTube Direct in the hands of as many developers as possible, we open sourced the bulk of the code and designed it to run on Google App Engine - Google's scalable hosting platform. This enables developers to easily deploy their own instance of the tool and take advantage of App Engine's scalability and low cost. The videos themselves are served from the same infrastructure that powers YouTube.com.





Visit YouTube Direct for Developers page to read more about it or go directly to the project page to download the code. As always, we'd love to hear your feedback on this new tool. Drop us a line in YouTube's Developer Forum.

Tuesday, November 10, 2009

New YouTube API Version Available for Testing

While we don't normally call out new releases of the Google Data YouTube API on this blog, we wanted to draw specific attention to the version that has just been pushed out to our staging servers. There are two specific changes that we'd like to give our developers and partners a chance to test before they go live. Both changes affect important areas of the API: ClientLogin authentication, and playback URLs in media:content entries.

We fully intend for the changes to be backwards compatible, and from the developer's perspective you should not have to change any code. But testing your code is always a best practice, so if you rely on ClientLogin or retrieving media playback URLs from the Google Data YouTube API, please repoint your code to http://stage.gdata.youtube.com and confirm functionality.

Any incompatibilities should be reported as soon as possible in our YouTube API Developer Forum. We expect to move the changes from the staging environment into production on November 17.

Wednesday, November 4, 2009

Final Decommission Notice for the Legacy YouTube API

It's been several years since we've released the Google Data-based YouTube API, and in that time we've been encouraging developers who used the legacy YouTube API to upgrade before we pull the metaphoric plug on that older version. At this point, all but a handful of holdouts have upgraded, and as of November 11, 2009, the legacy YouTube API will cease operation.

If you're using one of our YouTube API client libraries, then you're definitely making use of the modern Google Data YouTube API. If you're manually making HTTP requests to a URL whose hostname contains gdata.youtube.com, then you're also good to go. If you think you might still be using the legacy YouTube API but aren't sure, take a look at some of the example legacy API calls in this migration guide. If it turns out that you are still using the older API, then the migration guide will give you the information you need to upgrade – and be sure to do so before November 11!

Friday, October 30, 2009

Cleaning Up Our Embeds

For the longest time, official YouTube video embed codes have contained embarrassingly malformed URLs; the first URL parameter (at the end of URLs) should always start with a ? character, but our URL parameters begin with &. That looks something like this:

http://www.youtube.com/v/0XjwoVqM_qE&feature=player_embedded&fs=1 (incorrect)
http://www.youtube.com/v/0XjwoVqM_qE?feature=player_embedded&fs=1 (correct)

Fortunately, we've found a way to use correct URLs without breaking old browsers and we can't wait to do it.

Speaking of changes to the embed code, we'll also be tweaking the HTML content. The new YouTube embed code is leaner and still works on everything from ancient desktop browsers to modern smart phones. You won't find another snippet of HTML that's as battle-tested and mother-approved! Here's a preview of the new, streamlined format:








And here's what the HTML looks like:

<object width="425" height="344">
<param name="movie" value="http://www.youtube.com/v/0XjwoVqM_qE?color1=0xb1b1b1&color2=0xcfcfcf&hl=en&feature=player_embedded&fs=1">
<param name="allowFullScreen" value="true">
<param name="allowScriptAccess" value="always">
<embed src="http://www.youtube.com/v/0XjwoVqM_qE?color1=0xb1b1b1&color2=0xcfcfcf&hl=en&feature=player_embedded&fs=1"
type="application/x-shockwave-flash" allowfullscreen="true"
allowScriptAccess="always" width="425" height="344">
</object>


If you grab YouTube embed codes by hand from YouTube.com, or from the YouTube Player APIs or oEmbed, you'll start getting this updated HTML soon. As for all the embeds already on the web: worry not, those will continue to work forever.

Wednesday, October 14, 2009

The ActionScript 3 YouTube Chromeless Player is Now Live

We have some good news for developers who integrate YouTube videos into their ActionScript 3 Flash applications: the official YouTube Chromeless Player API has been updated to natively support ActionScript 3!

Previous to this release, ActionScript 3 developers had to rely on wrapper libraries that bridged the gap between the native ActionScript 2 API and their own ActionScript 3 code. We're thrilled that intrepid developers were able to patch things together on their own and share their code with the rest of the community. Now that there's official support for using the chromeless player from ActionScript 3, everyone should have more time to focus on writing compelling Flash applications, rather than dealing with the unique issues that cross-language coding entails.

Please check out our ActionScript 3 documentation, and let us know what you think of the new API in our developer forum.

With the launch of ActionScript 3 support, we're officially deprecating the ActionScript 2 YouTube Chromeless Player API. As per our YouTube API deprecation policy, detailed in our Terms of Service, we will continue to operate the ActionScript 2 API for a period of three years (until October 14, 2012).

Cheers,
-The YouTube API Team

Monday, October 12, 2009

Direct Uploads Server Migration

We first announced our new API upload infrastructure back in June and asked developers to test their YouTube API code against our staging environment.

Since then, we've started deploying the new upload infrastructure to production machines in a phased manner. Last month, we transitioned browser-based API uploads to the new servers, and have been closely monitoring performance and error rates to ensure that there were no unintended side effects.

We're now ready to begin the transition for direct uploads. Starting today, a small percentage of direct uploads traffic will automatically be routed to our new servers. We will be monitoring traffic over the next few weeks and gradually increasing the traffic that the new servers receive until we have fully completed the migration.

As a developer, you won't have to make any changes in your code to take advantage of the increased reliability and bug fixes found in the new infrastructure. While we do expect that this new infrastructure will be fully backwards compatible, if you do notice any change in your application's behavior with regard to direct uploads, please let us know in our developer group.

Cheers,
-The YouTube API Team