Stephanie Liu: Hi.
In this video, I'm going to give you a quick overview
of what you can do with the YouTube APIs.
First of all, we all know what YouTube is, right?
Millions of videos uploaded from all around the world
at your fingertips.
The YouTube APIs allow you
to integrate YouTube into your application.
There are two main APIs:
the data API, and the player APIs.
But before I get into more detail,
let's talk widgets.
If you're looking for a quick sprinkling
of YouTube on your website,
there are some pre-made widgets for you to check out.
The AJAX Video Bar makes it easy
to add a dynamic block of videos onto your site.
All you have to do is copy/paste some JavaScript.
There's even a handy wizard to help you do customizations.
Use the Video Search Control
to make this block of videos more interactive.
We also have the custom player available.
You can change the color and borders to match your site,
as well as size and format.
To populate your custom player,
just select one of your own playlists.
Now, if you decide you want to do something
that's more complex than what these widgets offer,
then you'll wanna use the APIs,
so let's get into a bit more detail there.
The data API is a RESTful API
that allows you to do a wide breadth of operations.
Searching, pulling back user information,
uploading videos,
creating playlists, and much more.
I'll go over the two most popular use cases,
search and upload, and show you some examples.
First up, search.
I'm sure you've all searched
for your favorite video on YouTube.com.
Using the API, you can send a query
for a search term like you would on the site,
and retrieve a few results in XML, which you could then
display in your application how you want.
For example, TimeTube has an innovative viewing experience.
They take video search results
and display them on a timeline with weighted importance.
In this web-based presentation creator,
you can search for videos within the app,
and then embed them right into your presentation.
Another big operation is upload.
Your users can upload their videos to YouTube
through your application.
For example, Animoto.com is a slide show creation site.
Once their users create a slide show,
they have an option to export to YouTube.
They use the API to authorize the user to the YouTube account,
and then send the video over.
"Spore" is a computer game
that lets you create your own creatures.
And all proud parents want to videotape
and share their creations, so there's a "record" button
that lets you upload straight to YouTube.
I've only covered a small set
of what you can do with the data API,
but hopefully you have some good ideas.
You can get started with the data API
with one of our open source client libraries.
We have them for PHP, Java, .NET, and Python.
They make parsing feeds
and handling authentication much easier.
I should also point out
that while we don't have a JavaScript client library,
we do offer JSON as an alternative format to XML
so you can easily parse responses with JavaScript.
Now, on to the player APIs.
The player APIs give you
control over the YouTube-embedded player.
You can issue commands, like "stop," "pause," and "play";
listen for events, like air events--
or which state the player is in--
and poll status, like how far into the video the user is.
Here's an example of an application
that's using the player APIs
to sync up this lecture with the slides.
If you wanna do even deeper customizations,
use our chromeless player.
It's just a video box with no buttons
that you can control with the player APIs.
You can skin the player
to match the look and feel of your application,
much like in these examples.
For even more examples, check out our app gallery.
And once you've built something, show us by submitting yours.
This has only been a quick overview,
but find all the rest of the details
on code.google.com, and ask your questions in our forum.