# stream.categories

Source: https://docs.lightair.app/developers/remote-api/stream.categories

> Searches a platform's categories, to choose one for stream.info.set.

JSON-RPC 2.0 method of Lightair's Remote API (ws://localhost:4455/rpc). Group: Outputs. Script plugins need the `project.read` permission.

Twitch and Kick search their own categories; YouTube's fixed list is filtered by name. At most 20.

## Parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `platform` | `string` | yes | The platform. |
| `query` | `string` | no | What to search for. |

## Result

| Name | Type | Required | Description |
|---|---|---|---|
| `(list)` | `{ id: string, name: string, image?: string }[]` | no | Matching categories. |

## Errors

Invalid params (-32602) without `platform`. A state error (-32005) when the platform doesn't answer.

## From an AI agent

The MCP server's `stream_info (action: categories)` reaches this method.

## Example

```json
{ "jsonrpc": "2.0", "id": 1, "method": "stream.categories", "params": { "platform": "twitch", "query": "chess" } }
```

Result:

```json
[{ "id": "743", "name": "Chess", "image": "https://…" }]
```

## Related

- [stream.info.set](https://docs.lightair.app/developers/remote-api/stream.info.set.md)
