Stream/list

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!

Returns stream information for all live channels. The results are sorted by the current number of viewers, with the most popular channels first.

Interface

URL: http://api.justin.tv/api/stream/list.format
Formats: xml, json
Methods: GET
Params: Can include:

  • channel, which will limit to those streams
  • title, which will limit to streams with the given title
  • category (Justin.tv Categories), which would be the same as the name appearing in the URL of its corresponding directory page on justin.tv (http://www.justin.tv/directory/science_tech, http://www.justin.tv/directory/featured, etc.)
  • language, which will select only channels in that language. Language is specified as the language code: nl, fr, zh-cn, etc.
  • limit, which will cap the number of results returned, speeding up the request, max is 100, default is 50
  • offset, which will make the call return results starting at a particular offset, default is 0


Cache: This response is cached for 60 seconds; polling faster than that will yield no new results.
Returns: Stream Object

Examples

<streams>
  <stream>
    <category>gaming</category>
    <stream_count>15841</stream_count>
    ...
  </stream>
  <stream>
    <category>entertainment</category>
    <stream_count>14352</stream_count>
    ...
  </stream>
  ...
  <stream>
    <category>gaming</category>
    <stream_count>1</stream_count>
    ...
  </stream>
<streams>
<streams>
  <stream>
    <category>social</category>
    <stream_count>4205</stream_count>
    ...
  </stream>
  <stream>
    <category>social</category>
    <stream_count>3872</stream_count>
    ...
  </stream>
  ...
  <stream>
    <category>social</category>
    <stream_count>2</stream_count>
    ...
  </stream>
<streams>
<streams>
  <stream>
    <subcategory>dogs</subcategory>
    <id href="/stream/show/913626.xml">913626L</id>
    <category>animals</category>
    <title>Star's Doberman Pinscher puppies (5) were born on March 18th!</title>
    <video_height>240</video_height>
    <embed_enabled>False</embed_enabled>
    <up_time>Mon Jun 15 19:09:37 2009</up_time>
    <embed_count>0</embed_count>
    <video_codec>VP6</video_codec>
    <directory_hidden>False</directory_hidden>
    <video_width>320</video_width>
    <embed_ratio>0.00000000000000000000</embed_ratio>
    <name href="/stream/show/live_user_dandldobermans.xml">live_user_dandldobermans</name>
    <language>en</language>
    <stream_count>10</stream_count>
    <video_bitrate>107.4296875</video_bitrate>
    <channel>
      <category>animals</category>
      <id>4881553</id>
      <login>dandldobermans</login>
      <subcategory>dogs</subcategory>
      <title>D & L Dobermans' Webcam</title>
      <tags></tags>
      <category_title>Animals</category_title>
      <subcategory_title>Dogs</subcategory_title>
      <producer>true</producer>
      <language>en</language>
      <timezone>America/Chicago</timezone>
      <channel_url>http://www.justin.tv/dandldobermans</channel_url>
      <mature>false</mature>
      <image_url_huge>http://static-cdn.justin.tv/jtv_user_pictures/dandldobermans-320x240-5.jpg</image_url_huge>
      <image_url_large>http://static-cdn.justin.tv/jtv_user_pictures/dandldobermans-125x94-5.jpg</image_url_large>
      <image_url_medium>http://static-cdn.justin.tv/jtv_user_pictures/dandldobermans-75x56-5.jpg</image_url_medium>
      <image_url_small>http://static-cdn.justin.tv/jtv_user_pictures/dandldobermans-50x37-5.jpg</image_url_small>
      <image_url_tiny>http://static-cdn.justin.tv/jtv_user_pictures/dandldobermans-33x25-5.jpg</image_url_tiny>
      <screen_cap_url_huge>http://static-cdn.justin.tv/previews/live_user_dandldobermans-320x240.jpg</screen_cap_url_huge>
      <screen_cap_url_large>http://static-cdn.justin.tv/previews/live_user_dandldobermans-125x94.jpg</screen_cap_url_large>
      <screen_cap_url_medium>http://static-cdn.justin.tv/previews/live_user_dandldobermans-75x56.jpg</screen_cap_url_medium>
      <screen_cap_url_small>http://static-cdn.justin.tv/previews/live_user_dandldobermans-50x37.jpg</screen_cap_url_small>
      <screen_cap_url_tiny>http://static-cdn.justin.tv/previews/live_user_dandldobermans-33x25.jpg</screen_cap_url_tiny>
    </channel>
    <updated_on>Tue Jun 16 17:05:40 2009</updated_on>
  </stream>
</streams>
Client Libraries