Skip to Content

Trending Categories

The categories most watched now, 30 a page.

GET
/v1/twitch/trending/categories

Authorization

apiKey
headerAuthorizationBearer <token>

An API key from the dashboard: Authorization: Bearer sapi_….

Query Parameters

cursor?string

nextCursor of the previous page.

maxAge?integer

How old a cached answer may be, in seconds; 0 always fetches. Default and most: the endpoint's cache lifetime.

Formatint64
Range0 <= value

Response Body

The answer.

application/json
  1. response

A page of a list, as every list endpoint answers: { "data": [...], "pagination": … }.

data*array<>
pagination*
Example Request
import { SocialAPI } from "@socialapihq/sdk";const client = new SocialAPI({ apiKey: process.env.SOCIALAPI_API_KEY });const { data, pagination } = await client.twitch.trendingCategories();
Example Response
{  "data": [    {      "id": "1867279146",      "name": "Grand Theft Auto VI",      "slug": "grand-theft-auto-vi",      "url": "https://www.twitch.tv/directory/category/grand-theft-auto-vi",      "description": "Grand Theft Auto VI is an open-world action-adventure game developed by Rockstar Games. Set in the fictional U.S. state of Leonida, which includes Vice City and its surrounding regions, the game follows Jason Duval and Lucia Caminos, two criminals who become involved in a statewide conspiracy after a robbery goes wrong. Players can switch between the two protagonists while exploring the open world…",      "coverUrl": "https://static-cdn.jtvnw.net/ttv-boxart/1867279146_IGDB-285x380.jpg",      "viewers": 799573,      "channels": 39221,      "followers": 391255,      "tags": [        "FPS",        "Shooter",        "Driving/Racing Game"      ]    },    {      "id": "509658",      "name": "Just Chatting",      "slug": "just-chatting",      "url": "https://www.twitch.tv/directory/category/just-chatting",      "description": null,      "coverUrl": "https://static-cdn.jtvnw.net/ttv-boxart/509658-285x380.jpg",      "viewers": 415470,      "channels": 5828,      "followers": 53355320,      "tags": [        "IRL"      ]    }  ],  "pagination": {    "nextCursor": "eyJzIjozMCwiZCI6ZmFsc2UsInQiOnRydWV9",    "hasMore": true  }}