Skip to Content

Search Categories

Categories matching a query, 30 a page.

GET
/v1/twitch/search/categories

Authorization

apiKey
headerAuthorizationBearer <token>

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

Query Parameters

query*string

What to search for.

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.searchCategories({ query: "minecraft" });
Example Response
{  "data": [    {      "id": "27471",      "name": "Minecraft",      "slug": "minecraft",      "url": "https://www.twitch.tv/directory/category/minecraft",      "description": "Minecraft focuses on allowing the player to explore, interact with, and modify a dynamically-generated map made of one-cubic-meter-sized blocks. In addition to blocks, the environment features plants, mobs, and items. Some activities in the game include mining for ore, fighting hostile mobs, and crafting new blocks and tools by gathering various resources found in the game. The game's open-ended m…",      "coverUrl": "https://static-cdn.jtvnw.net/ttv-boxart/27471_IGDB-285x380.jpg",      "viewers": 43961,      "channels": 3218,      "followers": 4003931,      "tags": [        "Simulation",        "Adventure Game",        "Arcade"      ]    },    {      "id": "2042681592",      "name": "Minecraft Dungeons II",      "slug": "minecraft-dungeons-ii",      "url": "https://www.twitch.tv/directory/category/minecraft-dungeons-ii",      "description": "Drop the pickaxe, grab a sword, and charge into a thrilling new adventure in Minecraft Dungeons II. Journey through unexplored lands and mysterious locations, in a quest to stop a new evil from causing chaos in not one, but two worlds! Clash with menacing foes in explosive encounters and fight your way through hordes of mobs that will do everything in their power to stop you from saving the day.",      "coverUrl": "https://static-cdn.jtvnw.net/ttv-boxart/2042681592_IGDB-285x380.jpg",      "viewers": 79,      "channels": 14,      "followers": 11957,      "tags": [        "RPG",        "Action",        "Adventure Game"      ]    }  ],  "pagination": {    "nextCursor": "MzA=",    "hasMore": true  }}