# twitch.channel

One Twitch channel as its public page shows it: followers, description, links, and whether it is live with the stream's title, game and viewers.

Twitch channel, one of the Twitch scrapers.

| | |
| --- | --- |
| Id | `twitch.channel` |
| Version | 1 |
| Billed per | request — 1 unit for a charged run |
| Runs | within one request |

Start it with `POST /v1/scrapers/twitch.channel/runs`. How runs work is in [Running a scraper](https://docs.enrichednow.com/running-a-scraper.md); what a run costs is in [Usage and units](https://docs.enrichednow.com/usage-and-units.md).

## Inputs

The fields of `input`. A field that is not listed here is refused.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `login` | string | no | The channel's name as in its address, e.g. shroud for twitch.tv/shroud. Limit: matches ^[A-Za-z0-9][A-Za-z0-9_]{0,24}$. |
| `url` | string | no | The channel's address, e.g. https://www.twitch.tv/shroud. Limit: at most 2048 characters. |

- Give exactly one of `login` and `url`. Both, or neither, is refused with `invalid_input`.
- `login` is the name in the channel's address (`shroud` for `twitch.tv/shroud`); capital letters do not matter.
- `live` says whether the channel is on air at the time of the run. When it is, `stream` holds the title, game, viewers, start time, language and tags; when it is not, `stream` is `null`.
- `last_broadcast` is the most recent broadcast: the one on air when the channel is live.
- A name Twitch has no channel for ends the run `failed` with `not_found`; so does a channel that was closed or banned.

## Record fields

Every record of a run has these fields. A value that is not known is `null` — never an empty string and never `0`.

| Field | Type | Notes |
| --- | --- | --- |
| `id` | string | Twitch's numeric id of the channel. |
| `login` | string | The channel's name in its address, lower case. |
| `url` | string | The channel's address on Twitch. |
| `display_name` | string or null | The channel's name as shown. |
| `description` | string or null | The channel's description of itself. |
| `created_at` | string (date-time) or null | When the channel was created. |
| `profile_image` | string or null | The address of the channel's picture. |
| `banner_image` | string or null | The address of the channel's banner image. |
| `followers` | integer or null | How many followers the channel has. |
| `partner` | boolean or null | The channel is a Twitch Partner. |
| `affiliate` | boolean or null | The channel is a Twitch Affiliate. |
| `live` | boolean | Whether the channel is broadcasting at the time of the run. |
| `stream` | object or null | The stream on air; null when the channel is offline. |
| `stream.id` | string or null | Twitch's id of the stream. |
| `stream.title` | string or null | The stream's title. |
| `stream.game` | object or null | The game or category being streamed. |
| `stream.game.id` | string or null | Twitch's id of the game or category. |
| `stream.game.name` | string or null | The game or category, as shown, e.g. "Just Chatting". |
| `stream.viewers` | integer or null | How many people are watching, at the time of the run. |
| `stream.started_at` | string (date-time) or null | When the stream started. |
| `stream.language` | string or null | The stream's language, as a lower-case code, e.g. en. |
| `stream.tags` | array of string | The tags the streamer put on the stream. |
| `stream.preview_image` | string or null | The address of the stream's current preview image. |
| `last_broadcast` | object or null | The channel's most recent broadcast (the one on air, when it is live). |
| `last_broadcast.title` | string or null | The title of the channel's most recent broadcast. |
| `last_broadcast.started_at` | string (date-time) or null | When that broadcast started. |
| `last_broadcast.game` | object or null | The game or category of that broadcast. |
| `last_broadcast.game.id` | string or null | Twitch's id of the game or category. |
| `last_broadcast.game.name` | string or null | The game or category, as shown, e.g. "Just Chatting". |
| `language` | string or null | The language the channel is set to broadcast in, as a lower-case code. |
| `mature` | boolean or null | The channel marks its broadcasts as intended for mature audiences. |
| `links` | array of object | The links the channel shows on its page: its other social accounts and sites. |
| `links[].name` | string or null | The kind of link as Twitch names it, e.g. youtube, discord. |
| `links[].title` | string or null | The link's label on the channel. |
| `links[].url` | string | The address the channel links to. |
| `fetched_at` | string (date-time) | When the channel was read, in UTC. |

## Example request

It starts a run with this scraper's example input and waits up to 60 seconds for it. The key is read from `ENRICHEDNOW_API_KEY`.

```bash
curl -X POST "https://api.enrichednow.com/v1/scrapers/twitch.channel/runs?wait=60" \
  -H "Authorization: Bearer $ENRICHEDNOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"input":{"login":"shroud"}}'
```

## Example response

The run, once it has ended. A run that has not ended within `wait` comes back with `202` and the status `queued` or `running`.

```json
{
  "id": "run_841742f37553189ff9c27ba1",
  "scraper_id": "twitch.channel",
  "scraper_version": 1,
  "status": "ok",
  "reason": null,
  "input": {
    "login": "shroud"
  },
  "record_count": 1,
  "units": 1,
  "units_per_request": 1,
  "units_per_record": null,
  "units_per_page": null,
  "diagnostics": {
    "requests": 1,
    "bytes": 259214,
    "wall_ms": 885,
    "facts": {}
  },
  "created_at": "2026-11-16T22:37:50.170950Z",
  "started_at": "2026-11-16T22:37:50.178331Z",
  "finished_at": "2026-11-16T22:37:51.066313Z"
}
```

Its records, from `GET /v1/runs/{id}/records`. The record is a real one: this scraper's own parser read it from a page recorded from the site.

```json
{
  "records": [
    {
      "id": "37402112",
      "login": "shroud",
      "url": "https://www.twitch.tv/shroud",
      "display_name": "shroud",
      "description": "I'm back baby",
      "created_at": "2012-11-03T15:50:32.878470Z",
      "profile_image": "https://static-cdn.jtvnw.net/jtv_user_pictures/c754eebf-745b-4e0a-814a-10bcaecaabbc-profile_image-300x300.png",
      "banner_image": "https://static-cdn.jtvnw.net/jtv_user_pictures/dbee25e8-55b7-4565-87f0-e9d4661dcc66-profile_banner-480.jpeg",
      "followers": 11287753,
      "partner": true,
      "affiliate": false,
      "live": false,
      "stream": null,
      "last_broadcast": {
        "title": "short dungeon sesh with the boys",
        "started_at": "2026-11-18T00:48:44.519028Z",
        "game": {
          "id": "18122",
          "name": "World of Warcraft"
        }
      },
      "language": "en",
      "mature": false,
      "links": [
        {
          "name": "discord",
          "title": "Discord",
          "url": "https://discord.gg/shroud"
        },
        {
          "name": "twitter",
          "title": "Twitter",
          "url": "https://twitter.com/shroud"
        }
      ],
      "fetched_at": "2026-11-19T18:07:41.610420Z"
    }
  ],
  "next_cursor": null
}
```

What was done to the record for this page, and nothing else — the API returns every value whole. A text that was cut ends with `… [truncated]`.

- Shortened: `links`: 4 items, the first 2 shown.

A run does not always end `ok`. [Results and statuses](https://docs.enrichednow.com/results-and-statuses.md#reason-codes) lists every status and the reasons every scraper shares; [the reasons of the Twitch scrapers](https://docs.enrichednow.com/results-and-statuses.md#twitch) are in their own section there.
