Category
A category with its viewers, channels and followers.
GET
apiKeyheader
AuthorizationBearer <token>An API key from the dashboard: Authorization: Bearer sapi_….
name?stringThe category's name as written (Just Chatting).
slug?stringThe name in its link (just-chatting), instead of name.
id?stringIts numeric id, instead of either.
url?stringIts link (https://www.twitch.tv/directory/category/just-chatting), instead of any.
maxAge?integerHow old a cached answer may be, in seconds; 0 always fetches. Default and most: the endpoint's cache lifetime.
Format
int64Range
0 <= valueThe answer.
application/json- response
One item, as every single-item endpoint answers: { "data": … }.
data*A category: a game, or a kind of broadcast such as Just Chatting.
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" ] }}