Skip to the content
EnrichedNowDocs

    Type to search every page.

    Menu

    Scraper APITwitch

    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.

    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; what a run costs is in Usage and units.

    Inputs

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

    Inputs of twitch.channel
    FieldTypeDescription
    loginstringThe 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}$.
    urlstringThe 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.

    Record fields of twitch.channel
    FieldTypeNotes
    idstringTwitch's numeric id of the channel.
    loginstringThe channel's name in its address, lower case.
    urlstringThe channel's address on Twitch.
    display_namestring or nullThe channel's name as shown.
    descriptionstring or nullThe channel's description of itself.
    created_atstring (date-time) or nullWhen the channel was created.
    profile_imagestring or nullThe address of the channel's picture.
    banner_imagestring or nullThe address of the channel's banner image.
    followersinteger or nullHow many followers the channel has.
    partnerboolean or nullThe channel is a Twitch Partner.
    affiliateboolean or nullThe channel is a Twitch Affiliate.
    livebooleanWhether the channel is broadcasting at the time of the run.
    streamobject or nullThe stream on air; null when the channel is offline.
    id (in stream)string or nullTwitch's id of the stream.
    title (in stream)string or nullThe stream's title.
    game (in stream)object or nullThe game or category being streamed.
    id (in stream.game)string or nullTwitch's id of the game or category.
    name (in stream.game)string or nullThe game or category, as shown, e.g. "Just Chatting".
    viewers (in stream)integer or nullHow many people are watching, at the time of the run.
    started_at (in stream)string (date-time) or nullWhen the stream started.
    language (in stream)string or nullThe stream's language, as a lower-case code, e.g. en.
    tags (in stream)array of stringThe tags the streamer put on the stream.
    preview_image (in stream)string or nullThe address of the stream's current preview image.
    last_broadcastobject or nullThe channel's most recent broadcast (the one on air, when it is live).
    title (in last_broadcast)string or nullThe title of the channel's most recent broadcast.
    started_at (in last_broadcast)string (date-time) or nullWhen that broadcast started.
    game (in last_broadcast)object or nullThe game or category of that broadcast.
    id (in last_broadcast.game)string or nullTwitch's id of the game or category.
    name (in last_broadcast.game)string or nullThe game or category, as shown, e.g. "Just Chatting".
    languagestring or nullThe language the channel is set to broadcast in, as a lower-case code.
    matureboolean or nullThe channel marks its broadcasts as intended for mature audiences.
    linksarray of objectThe links the channel shows on its page: its other social accounts and sites.
    name (in links[])string or nullThe kind of link as Twitch names it, e.g. youtube, discord.
    title (in links[])string or nullThe link's label on the channel.
    url (in links[])stringThe address the channel links to.
    fetched_atstring (date-time)When the channel was read, in UTC.

    Example request

    # Start a run and wait up to 60 seconds for it to finish
    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"}}'
    
    # Read its records, with the id the first call answered
    curl "https://api.enrichednow.com/v1/runs/$RUN_ID/records?limit=100" \
      -H "Authorization: Bearer $ENRICHEDNOW_API_KEY"
    from enrichednow import EnrichedNow
    
    client = EnrichedNow()  # reads ENRICHEDNOW_API_KEY
    
    # Start a run, wait for it to end, and get its records
    result = client.scrape("twitch.channel", {"login": "shroud"})
    print(result.run.id, result.run.status, result.run.record_count)
    
    # Read its records: pages are fetched as you go
    for record in result.records:
        print(record)

    Install it with pip install enrichednow, then save as run.py and run python3 run.py

    import EnrichedNow from "enrichednow";
    
    const client = new EnrichedNow(); // reads ENRICHEDNOW_API_KEY
    
    // Start a run, wait for it to end, and get its records
    const { run, records } = await client.scrape("twitch.channel", { login: "shroud" });
    console.log(run.id, run.status, run.record_count);
    
    // Read its records: pages are fetched as you go
    for await (const record of records) console.log(record);

    Install it with npm install enrichednow, then save as run.mjs and run node run.mjs

    package main
    
    import (
    	"context"
    	"fmt"
    	"log"
    	"time"
    
    	enrichednow "github.com/enrichednow/enrichednow-go"
    )
    
    func main() {
    	client, err := enrichednow.NewClient() // reads ENRICHEDNOW_API_KEY
    	if err != nil {
    		log.Fatal(err)
    	}
    	ctx, cancel := context.WithTimeout(context.Background(), 10*time.Minute)
    	defer cancel()
    
    	// Start a run, wait for it to end, and get its records
    	run, records, err := client.Scrape(ctx, "twitch.channel", map[string]any{"login": "shroud"})
    	if err != nil {
    		log.Fatal(err)
    	}
    	fmt.Println(run.ID, run.Status, run.RecordCount)
    
    	// Read its records: pages are fetched as you go
    	for records.Next() {
    		fmt.Println(string(records.Current()))
    	}
    	if err := records.Err(); err != nil {
    		log.Fatal(err)
    	}
    }

    Install it with go get github.com/enrichednow/enrichednow-go@latest, then save as run.go and run go run run.go

    import com.enrichednow.EnrichedNowClient;
    import com.enrichednow.ScrapeResult;
    import java.util.Map;
    
    public class Run {
        public static void main(String[] args) {
            EnrichedNowClient client = EnrichedNowClient.fromEnv(); // reads ENRICHEDNOW_API_KEY
    
            // Start a run, wait for it to end, and get its records
            ScrapeResult result = client.scrape("twitch.channel", Map.of("login", "shroud"));
            System.out.println(result.run().id() + " " + result.run().status() + " " + result.run().recordCount());
    
            // Read its records: pages are fetched as you go
            for (Map<String, Object> record : result.records()) {
                System.out.println(record);
            }
        }
    }

    Add com.enrichednow:enrichednow-java:0.4.0 to your Maven or Gradle build, then save as Run.java

    enrichednow run twitch.channel --input login=shroud

    Install it with curl -fsSL https://raw.githubusercontent.com/enrichednow/enrichednow-cli/main/install.sh | sh

    It starts a run with this scraper’s example input, waits for it to finish and reads its records a page at a time. The key is read from ENRICHEDNOW_API_KEY.

    The body on its own:

    JSON
    {
      "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 lists every status and the reasons every scraper shares; the reasons of the Twitch scrapers are in their own section there.