REST API Documentation

From Justin.tv API Wiki

Jump to: navigation, search


Image:Ambox_notice.png Are you building an app that connects with Twitch? Use the Twitch API Instead!


Create your own Justin.tv apps! Our API includes all the basic building blocks needed browse channels, play live streams, and much more. The API is composed of two distinct parts: Flash components, and the REST API.

REST API calls are either GET (for reads), or POST (for creates and updates). API calls are made to http://api.justin.tv/path/to/call.format.

Api calls requesting data in json format support jsonp, so you can use the api directly from javascript. Here is an example using the jQuery javascript library:

$.getJSON("http://api.justin.tv/clip/show/1278312.json?jsonp=?", function(a){alert(a.title);});

Return objects for various API calls are listed here.

Stream Methods

stream/list

Get information about a specific live stream, a category, a language, or get them all!

stream/summary

Get aggregate information about all the streams (total viewers, total number of streams, average bitrate)

stream/search

Get information about the live stream results of a search query.

User Methods

user/show

Returns extended information for a user.

user/favorites

Get all channels who are favorites of a user.

user/create (deprecated)

Creates a new user.

user/update (deprecated)

Updates an existing user.

user/friends (deprecated)

Get all users who are friends of a user.


Channel Methods

Channel objects include embed code, status, title, etc.

channel/show

Returns extended information for a channel, specified by channel id or login.

channel/create (deprecated)

Creates a new user with a channel.

channel/update (deprecated)

Updates an existing channel.

channel/stream_key

Gets a channel's stream_key, which is needed for broadcasting from a source outside a Justin.tv embed.

channel/fans

Get users who are fans of a channel.

channel/archives

Get archives from a given channel.

channel/events (deprecated)

Get all events on a channel.

channel/embed

Get embed code for a channel.

channel/chat_embed

Get chat embed code for a channel.

channel/publisher_embed (deprecated)

Get the publisher embed code for a channel.

channel/commercial

Run a commercial on a channel.

Fan Methods

fan/create

Creates a new fan.

fan/destroy

Destroys a fan relationship.

Clip Methods

clip/show

Returns extended information for a clip, specified by clip id.

clip/update (deprecated)

Updates an existing clip.

clip/create (deprecated)

Creates a new clip on a channel.

clip/destroy

Destroys an existing clip.

clip/embed

Get embed code for a clip.

Chat Methods

chat/send_message (deprecated)

Post a message to a chatroom via oauth

Account Methods

account/fme_config

Gets the Flash Media Encoder config file for an authenticated channel. OAuth tokens for the requesting channel.

account/whoami

Returns the user object corresponding to the user who has authorized the access token you are making the request with.

Application Methods

application/rate_limit_status

Returns whether the IP address or application has been rate limited or not.

Category Methods

category/list

Returns a collection of channel categories.

Embed Methods

embed/from_url

Returns the embed code for the content contained on the page at a given url.

Client Libraries