Getting Started with the Twitch API

As of April 30, 2020, all Helix endpoints require OAuth and matching client IDs. See this announcement for more details.


The new Twitch API provides tools for developing integrations with Twitch. Here, as a quick example to get you started, we make a basic request to get the top streams for a specific game, using the Get Streams endpoint.

Step 1: Setup

To make API calls, you need a client ID. To receive one, log into the Twitch developer dashboard (aka console), select the Apps tab, and click Register Your Application. Enter an app name and your OAuth redirect URI (where your users are redirected after being authorized), and select an app category. Click Create, and the app is created and listed on the dashboard as one of your registered apps. Click Manage to see the client ID.

Note: App names must not include “Twitch” (as an exact or fuzzy match), or registration will fail.

Step 2: Sample Code

This gets information about the most active streams for game ID 33214.

curl -H 'Client-ID: p0gch4mp101fy451do9uod1s1x9i4a' \
-X GET ''

The example uses a dummy client ID. To try it out, copy and paste the example into your terminal, replacing the dummy client ID with your client ID.

Step 3: Results

The API returns an array of stream objects, along with a cursor for pagination. By default, this endpoint returns the 20 most active streams. For brevity, we truncate the long response here:

  "data": [
      "id": "28623425344",
      "user_id": "150573462",
      "game_id": "488191",
      "community_ids": [
      "type": "live",
      "title": "CHILL // PSYCHEDELIA :: ambience \u0026 tones  [ !visuals ]",
      "viewer_count": 9001,
      "started_at": "2018-05-08T18:47:34Z",
      "language": "en",
      "thumbnail_url": "{width}x{height}.jpg"
  "pagination": {
    "cursor": "eyJiIjpudWxsLCJhIjp7Ik9mZnNldCI6MX19"

For descriptions of the response fields, see Get Streams.

What’s Next

For complete information on the API (including webhooks), see:

See the Apps & Authentication Guide for information about using Twitch Authentication, which enables your application to take actions on behalf of a Twitch account or access certain data about a user’s account. Twitch supports OAuth 2.0 and OIDC.

Stop by our Developer Forums to join our community of Twitch developers.