Skip to Content

Category

A category with its viewers, channels and followers.

GET
/v1/twitch/category

Authorization

apiKey
headerAuthorizationBearer <token>

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

Query Parameters

name?string

The category's name as written (Just Chatting).

slug?string

The name in its link (just-chatting), instead of name.

id?string

Its numeric id, instead of either.

url?string

Its link (https://www.twitch.tv/directory/category/just-chatting), instead of any.

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

One item, as every single-item endpoint answers: { "data": … }.

data*

A category: a game, or a kind of broadcast such as Just Chatting.

Example Request
import { SocialAPI } from "@socialapihq/sdk";const client = new SocialAPI({ apiKey: process.env.SOCIALAPI_API_KEY });const { data } = await client.twitch.category({ name: "Just Chatting" });
Example Response
{  "data": {    "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": 5834,    "followers": 53355320,    "tags": [      "IRL"    ]  }}