Sep 11, 2017 - By Ivana Savic

Introducing the Deep Metadata API

The Deep Metadata API is now live! Released as part of the new Twitch API, the Deep Metadata API enables you to take your products and apps to the next level with near real-time, timestamped game stream metadata, such as the hero a streamer is currently using or the streamer’s in-game rank.

In the past, we have relied solely on metadata from game APIs, but we now have computer vision technology that extracts metadata through visual analysis of live broadcasts. By removing the need for streamers linking their accounts and 3rd party APIs, we are able to extend coverage to almost all live streams despite relying only on what is visible on the screen. Our long-term vision is to combine visually-scraped and game publisher metadata into a uniform set of Deep Metadata APIs so Twitch Developers can get all the video information from a single source.

Whether you are building a video player overlay to add interactivity or an analytics app, game metadata can help you create rich and more engaging experiences for your users, the same way it helps us. We recently launched Game Directory filters for Hearthstone and Overwatch; using the Deep Metadata API, these filters make it possible for viewers to filter live Hearthstone streams by Hero and Game Mode and Overwatch streams by Hero.

We are launching in limited preview with support for metadata in Hearthstone and Overwatch live broadcasts. Here is the list of metadata types you can get:

Hearthstone metadata:

  • Game play, non game play, Pack opening
  • Hero (class, name, type, adventure)
  • Game mode: Casual, Ranked (exact rank), Arena (number of wins), Tavern Brawl (number of wins for Heroic)

Overwatch metadata:

  • Game play, non game play
  • Hero (ability, name, role)

To get started, check out the documentation on the Twitch Developer site where you’ll find metadata information about top live streams or individual streams.

Here is a sample request to get the top 20 Overwatch and Hearthstone live streams sorted by number of current viewers in descending order:

{% raw %}
curl -H 'Client-ID: uo6dggojyb8d6soh92zknwmi5ej1q2' \
-X GET 'https://api.twitch.tv/helix/streams/metadata'
{% endraw %}

Example response:

{% raw %}
{"data":
   [
      {
         "user_id":"23161357",
         "game_id":"488552",
         "overwatch":{
            "broadcaster":{
               "hero":{
                  "role":"Offense",
                  "name":"Soldier 76",
                  "ability":"Heavy Pulse Rifle"
               }
            }
         },
         "hearthstone":null
      },
      {
         "user_id":"1564968",
         "game_id":"138585",
         "overwatch":null,
         "hearthstone":{
            "broadcaster":{
               "hero":{
                  "type":"Classic hero",
                  "class":"Shaman",
                  "name":"Thrall"
               }
            },
            "opponent":{
               "hero":{
                  "type":"Classic hero",
                  "class":"Warrior",
                  "name":"Garrosh Hellscream"
               }
            }
         }
      },
      {
         "user_id":"5848726",
         "game_id":null,
         "overwatch":null,
         "hearthstone":null
      },
         . . .
   ],
   "pagination":{"cursor": "eyJiIjpudWxsLCJhIjp7Ik9mZnNldCI6MjB9fQ=="}
}
{% endraw %}

We started with support for live broadcasts and two games, but stay tuned for more games, more metadata types, and support for other content types. We can’t wait to see how you use the Deep Metadata API. Please visit the Twitch Developer Forum to ask questions, share your feedback, and make requests for new features. Happy developing!

In other news
Sep 12, 2017

Twitch Extensions and Twitch API — Now Live!

Last week was a watershed moment for developers, streamers, and Twitch. We launched two new opportunities to revolutionize streaming using…
Twitch Extensions and Twitch API — Now Live! Post
Sep 8, 2017

VOD to VIP Week 12 Winners!

It was a tough choice this week in choosing our favorite VODs in Week 12 of the VOD to VIP contest, but after much deliberating we came to…
VOD to VIP Week 12 Winners! Post