Search

Search for categories and channels on Twitch.

View as markdown
Provide feedback for this page

Search Categories

Gets the games or categories that match the specified query.

A category matches if its name or one of its alternative names begins with the query string, if any word in its name begins with the query string, or if each word in the query string matches the beginning of a word in its name. For example, if the query string is love computer, the response includes any category whose name contains words that begin with love and computer. The comparison is case insensitive, and close misspellings can also match.

Endpoint

GEThttps://api.twitch.tv/helix/search/categories

Authorization

Requires one of the following:

Query Parameters

  • queryStringRequired
    The URI-encoded search string. For example, encode #archery as '%23archery' and search strings like angel of death as 'angel%20of%20death'.
  • firstInteger
    The maximum number of items to return per page in the response. The minimum page size is 1 item per page and the maximum is 100 items per page. The default is 20.
  • afterString
    The cursor used to get the next page of results. The Pagination object in the response contains the cursor's value. Read More

Response Body

  • dataObject[]
    The list of games or categories that match the query. The list is empty if there are no matches.
    Hide child attributesShow child attributes
    • data.box_art_urlString
      A URL to an image of the game's box art or streaming category.
    • data.nameString
      The name of the game or category.
    • data.idString
      An ID that uniquely identifies the game or category.
  • paginationObject
    Contains the information used to page through the list of results. The object is empty if there are no more pages left to page through. Read More.
    Hide child attributesShow child attributes
    • pagination.cursorString
      The cursor used to get the next page of results. Use the cursor to set the request's after query parameter.

Response Codes

200OK
Successfully retrieved the list of category names that matched the specified query string.
400Bad Request
  • The query query parameter is required.
401Unauthorized
  • The Authorization header is required and must contain an app access token or user access token.
  • The access token is not valid.
  • The client ID specified in the Client-Id header does not match the client ID specified in the access token.
Request Example
curl -X GET 'https://api.twitch.tv/helix/search/categories?query=fort' \
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  -H 'Client-Id: YOUR_CLIENT_ID'
Response Example
{
  "data": [
    {
      "id": "33214",
      "name": "Fortnite",
      "box_art_url": "https://static-cdn.jtvnw.net/ttv-boxart/33214-52x72.jpg"
    },
    ...
  ],
  "pagination": {
    "cursor": "eyJiIjpudWxsLCJhIjp7IkN"
  }
}

Search Channels

Gets the channels that match the specified query.

The fields that the API uses for comparison depends on the value that the live_only query parameter is set to. If live_only is false, the API matches on the broadcaster's login name and display name. However, if live_only is true, the API matches on the broadcaster's login name, display name, and the name of the category they're streaming.

If live_only is false, the broadcaster's login name or display name must begin with the query string. If live_only is true, the query string can also match the beginning of any word in those names or in the category name, and a phrase matches if each of its words does. The comparison is case insensitive, and close misspellings can also match. For example, the query string angel of death can match names that begin with angelofdeath or angel_of_death.

By default, the results include both live and offline channels. To get only live channels set the live_only query parameter to true.

Endpoint

GEThttps://api.twitch.tv/helix/search/channels

Authorization

Requires one of the following:

Query Parameters

  • queryStringRequired
    The URI-encoded search string. For example, encode search strings like angel of death as 'angel%20of%20death'.
  • live_onlyBoolean
    A Boolean value that determines whether the response includes only channels that are currently streaming live. Set to true to get only channels that are streaming live; otherwise, false to get live and offline channels. The default is false.
  • firstInteger
    The maximum number of items to return per page in the response. The minimum page size is 1 item per page and the maximum is 100 items per page. The default is 20.
  • afterString
    The cursor used to get the next page of results. The Pagination object in the response contains the cursor's value. Read More

Response Body

  • dataObject[]
    The list of channels that match the query. The list is empty if there are no matches.
    Hide child attributesShow child attributes
    • data.broadcaster_languageString
      The ISO 639-1 two-letter language code of the language used by the broadcaster. For example, en for English. If the broadcaster uses a language not in the list of supported stream languages, the value is other.
    • data.broadcaster_loginString
      The broadcaster's login name.
    • data.display_nameString
      The broadcaster's display name.
    • data.game_idString
      The ID of the game that the broadcaster is playing or last played.
    • data.game_nameString
      The name of the game that the broadcaster is playing or last played.
    • data.idString
      An ID that uniquely identifies the channel (this is the broadcaster's ID).
    • data.is_liveBoolean
      A Boolean value that determines whether the broadcaster is streaming live. Is true if the broadcaster is streaming live; otherwise, false.
    • data.tag_idsString[]

      IMPORTANT As of February 28, 2023, this field is deprecated and returns only an empty array. If you use this field, please update your code to use the 'tags' field.

      The list of tags that apply to the stream. The list contains IDs only when the channel is steaming live. For a list of possible tags, see List of All Tags. The list doesn't include Category Tags.

    • data.tagsString[]
      The tags applied to the channel.
    • data.thumbnail_urlString
      A URL to a thumbnail of the broadcaster's profile image.
    • data.titleString
      The stream's title. Is an empty string if the broadcaster didn't set it.
    • data.started_atString
      The UTC date and time (in RFC3339 format) of when the broadcaster started streaming. The string is empty if the broadcaster is not streaming live.
  • paginationObject
    Contains the information used to page through the list of results. The object is empty if there are no more pages left to page through. Read More.
    Hide child attributesShow child attributes
    • pagination.cursorString
      The cursor used to get the next page of results. Use the cursor to set the request's after query parameter.

Response Codes

200OK
Successfully retrieved the list of channels that matched the specified query string.
400Bad Request
  • The query query parameter is required.
401Unauthorized
  • The Authorization header is required and must contain an app access token or user access token.
  • The access token is not valid.
  • The client ID specified in the Client-Id header does not match the client ID specified in the access token.
503Service Unavailable
The API couldn't get the details of the matching channels. Try the request again.
Request Example
curl -X GET 'https://api.twitch.tv/helix/search/channels?query=twitchdev' \
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  -H 'Client-Id: YOUR_CLIENT_ID'
Response Example
{
  "data": [
    {
      "broadcaster_language": "en",
      "broadcaster_login": "twitchdev",
      "display_name": "TwitchDev",
      "game_id": "1469308723",
      "game_name": "Software and Game Development",
      "id": "141981764",
      "is_live": false,
      "tag_ids": [],
      "tags": [
        "WebDevelopment",
        "GameDevelopment",
        "SoftwareDevelopment",
        "English"
      ],
      "thumbnail_url": "https://static-cdn.jtvnw.net/jtv_user_pictures/8a6381c7-d0c0-4576-b179-38bd5ce1d6af-profile_image-300x300.png",
      "title": "Standard Output",
      "started_at": ""
    },
    ...
  ],
  "pagination": {
    "cursor": "Mg=="
  }
}