# Twitch / Twitch Search

Search public Twitch videos, channels, or games by keyword.

```
GET /api/v1/twitch/search
```

Auth: `Authorization: Bearer <SOCIFY_KEY>`  
Credits: 1 credit per request

## Parameters

| Name | Required | Description | Example |
|------|----------|-------------|---------|
| `keyword` | yes | Search text. | `magic` |
| `type` | no | videos \| channels \| games. Defaults to videos. | `videos` |
| `depth` | no | Pages to fetch. Defaults to 1. | `1` |

## Example

```bash
curl -s 'https://trysocify.com/api/v1/twitch/search?keyword=magic&type=videos&depth=1' \
  -H "Authorization: Bearer $SOCIFY_KEY"
```

## Response fields

| Field | Type | Description |
|-------|------|-------------|
| `[].item.id` | string | Result id. |
| `[].item.title` | string | Title (videos). |
| `[].item.owner.login` | string | Channel login. |
| `[].item.viewCount` | number | View count, when present. |
## Sample response

Successful lookups wrap the payload in `{ ok, platform, resource, params, data, meta }`. `data` is shown below.

```json
{
  "ok": true,
  "platform": "twitch",
  "resource": "search",
  "params": {
    "keyword": "magic",
    "type": "videos",
    "depth": "1"
  },
  "data": [
    {
      "item": {
        "id": "2613189376",
        "owner": {
          "displayName": "Magic",
          "login": "magic"
        },
        "title": "Example stream VOD",
        "viewCount": 14337
      }
    }
  ],
  "meta": {
    "credits_charged": 1,
    "latency_ms": 420,
    "platform": "twitch",
    "resource": "search",
    "path": "/api/v1/twitch/search"
  }
}
```

## Links

- HTML docs: https://trysocify.com/docs/api/twitch/search
- SEO page: https://trysocify.com/twitch/search
- OpenAPI: https://trysocify.com/openapi.json
- Catalog: https://trysocify.com/catalog.json
