How to Scrape Twitch Clips with Node.js

Extract clip data from Twitch

⚡️ Using Node.js

Overview

Learn how to scrape Twitch clips using Node.js. This comprehensive guide will walk you through the entire process, from setup to implementation.

What You'll Learn

  • • Setting up your development environment
  • • Installing the required HTTP client
  • • Authenticating with the ScrapeCreators API
  • • Making requests to Twitch
  • • Handling responses and errors
  • • Best practices for production use

What You'll Get

  • • Access to clips data
  • • JSON formatted responses
  • • Real-time data access
  • • Scalable solution
  • • Error handling patterns
  • • Performance optimization tips

Prerequisites

1. API Key

First, you'll need a ScrapeCreators API key to authenticate your requests.

Sign up at app.scrapecreators.com to get your free API key with 100 requests.

2. Development Environment

Make sure you have the following installed:

  • Node.js and its dependencies
  • • A code editor (VS Code, Sublime, etc.)
  • • Basic understanding of API requests
  • • Command line interface access

Step 1: Install HTTP Client

Axios is a promise-based HTTP client for Node.js

npm
npm install axios

Step 2: API Implementation

Now let's make a request to the Twitch API using Node.js. Replace YOUR_API_KEY with your actual API key.

Node.js
import axios from 'axios';

const API_KEY = 'YOUR_API_KEY';

async function scrape() {
  try {
    const response = await axios.get(`https://api.scrapecreators.com/v1/twitch/clip?url=https://www.twitch.tv/staryuuki/clip/CloudySavageMarjoramRuleFive--ErzsYbE7UWvgCMQ?filter=clips&range=all&sort=time`, {
      headers: {
        'x-api-key': API_KEY,
        'Content-Type': 'application/json'
      }
    });

    console.log('Response:', response.data);
    return response.data;
  } catch (error) {
    console.error('Error:', error.response?.data || error.message);
  }
}

// Usage
scrape();

Step 3: Testing Your Code

API Parameters

This endpoint accepts the following parameters:

urlRequired(string)

Twitch clip URL

Example: https://www.twitch.tv/staryuuki/clip/CloudySavageMarjoramRuleFive--ErzsYbE7UWvgCMQ?filter=clips&range=all&sort=time

Run Your Code

Execute your script to test the API connection. You should see a JSON response with Twitch clips data.

✅ Success: You should receive a structured JSON response containing the requested data.

Expected Response

Here's an example of the JSON response you'll receive:

Sample Response
[
  {
    "data": {
      "clip": {
        "id": "387484507",
        "slug": "CloudySavageMarjoramRuleFive--ErzsYbE7UWvgCMQ",
        "url": "https://clips.twitch.tv/CloudySavageMarjoramRuleFive--ErzsYbE7UWvgCMQ",
        "embedURL": "https://clips.twitch.tv/embed?clip=CloudySavageMarjoramRuleFive--ErzsYbE7UWvgCMQ",
        "title": "un grande el mesero",
        "viewCount": 52441,
        "language": "ES",
        "isFeatured": true,
        "assets": [
          {
            "id": "AT-cm|W4NkMPhK87GGxO1Fr4AjEA",
            "aspectRatio": 1.7777777777777777,
            "type": "SOURCE",
            "createdAt": "2024-03-30T21:52:12.134391826Z",
            "creationState": "CREATED",
            "curator": {
              "id": "192477639",
              "login": "satagul_sy",
              "displayName": "Satagul_SY",
              "profileImageURL": "https://static-cdn.jtvnw.net/jtv_user_pictures/a7d1cf0c-6482-475c-a7ba-9fedf75f0149-profile_image-50x50.png",
              "__typename": "User"
            },
            "thumbnailURL": "https://clips-media-assets2.twitch.tv/W4NkMPhK87GGxO1Fr4AjEA/AT-cm%7CW4NkMPhK87GGxO1Fr4AjEA-preview-480x272.jpg",
            "videoQualities": [
              {
                "frameRate": 60.01382974851694,
                "quality": "1080",
                "sourceURL": "https://production.assets.clips.twitchcdn.net/W4NkMPhK87GGxO1Fr4AjEA/AT-cm%7CW4NkMPhK87GGxO1Fr4AjEA.mp4",
                "__typename": "ClipVideoQuality"
              },
              {
                "frameRate": 60.01382974851694,
                "quality": "720",
                "sourceURL": "https://production.assets.clips.twitchcdn.net/W4NkMPhK87GGxO1Fr4AjEA/AT-cm%7CW4NkMPhK87GGxO1Fr4AjEA-720.mp4",
                "__typename": "ClipVideoQuality"
              },
              {
                "frameRate": 30.025111911780762,
                "quality": "480",
                "sourceURL": "https://production.assets.clips.twitchcdn.net/W4NkMPhK87GGxO1Fr4AjEA/AT-cm%7CW4NkMPhK87GGxO1Fr4AjEA-480.mp4",
                "__typename": "ClipVideoQuality"
              },
              {
                "frameRate": 30.025111911780762,
                "quality": "360",
                "sourceURL": "https://production.assets.clips.twitchcdn.net/W4NkMPhK87GGxO1Fr4AjEA/AT-cm%7CW4NkMPhK87GGxO1Fr4AjEA-360.mp4",
                "__typename": "ClipVideoQuality"
              }
            ],
            "portraitMetadata": null,
            "__typename": "ClipAsset"
          }
        ],
        "curator": {
          "id": "192477639",
          "login": "satagul_sy",
          "displayName": "Satagul_SY",
          "profileImageURL": "https://static-cdn.jtvnw.net/jtv_user_pictures/a7d1cf0c-6482-475c-a7ba-9fedf75f0149-profile_image-70x70.png",
          "__typename": "User"
        },
        "game": {
          "id": "509672",
          "name": "IRL",
          "boxArtURL": "https://static-cdn.jtvnw.net/ttv-boxart/509672-52x72.jpg",
          "displayName": "IRL",
          "slug": "irl",
          "__typename": "Game"
        },
        "broadcast": {
          "id": "43930529883",
          "title": null,
          "__typename": "Broadcast"
        },
        "broadcaster": {
          "id": "167189231",
          "login": "staryuuki",
          "displayName": "Staryuuki",
          "primaryColorHex": "689AFF",
          "isPartner": true,
          "profileImageURL": "https://static-cdn.jtvnw.net/jtv_user_pictures/b45a3305-bc42-41cc-a754-e6679a2d9ef0-profile_image-70x70.png",
          "followers": {
            "totalCount": 3450065,
            "__typename": "FollowerConnection"
          },
          "stream": null,
          "lastBroadcast": {
            "id": "314597248121",
            "startedAt": "2025-01-23T06:52:10.179125Z",
            "__typename": "Broadcast"
          },
          "self": null,
          "__typename": "User"
        },
        "thumbnailURL": "https://clips-media-assets2.twitch.tv/W4NkMPhK87GGxO1Fr4AjEA/AT-cm%7CW4NkMPhK87GGxO1Fr4AjEA-preview-260x147.jpg",
        "createdAt": "2024-03-30T21:52:12Z",
        "isPublished": true,
        "durationSeconds": 27,
        "champBadge": null,
        "playbackAccessToken": {
          "signature": "43c84d015eddd8ebc145f914824caa1c37ff6559",
          "value": "{\"authorization\":{\"forbidden\":false,\"reason\":\"\"},\"clip_uri\":\"https://production.assets.clips.twitchcdn.net/W4NkMPhK87GGxO1Fr4AjEA/AT-cm%7CW4NkMPhK87GGxO1Fr4AjEA.mp4\",\"clip_slug\":\"CloudySavageMarjoramRuleFive--ErzsYbE7UWvgCMQ\",\"device_id\":\"gtd1TXg9937g0Ra59d6tJBe2f2vWobM7\",\"expires\":1737831991,\"user_id\":\"\",\"version\":2}",
          "__typename": "PlaybackAccessToken"
        },
        "video": null,
        "videoOffsetSeconds": null,
        "videoQualities": [
          {
            "sourceURL": "https://production.assets.clips.twitchcdn.net/W4NkMPhK87GGxO1Fr4AjEA/AT-cm%7CW4NkMPhK87GGxO1Fr4AjEA.mp4",
            "__typename": "ClipVideoQuality"
          },
          {
            "sourceURL": "https://production.assets.clips.twitchcdn.net/W4NkMPhK87GGxO1Fr4AjEA/AT-cm%7CW4NkMPhK87GGxO1Fr4AjEA-720.mp4",
            "__typename": "ClipVideoQuality"
          },
          {
            "sourceURL": "https://production.assets.clips.twitchcdn.net/W4NkMPhK87GGxO1Fr4AjEA/AT-cm%7CW4NkMPhK87GGxO1Fr4AjEA-480.mp4",
            "__typename": "ClipVideoQuality"
          },
          {
            "sourceURL": "https://production.assets.clips.twitchcdn.net/W4NkMPhK87GGxO1Fr4AjEA/AT-cm%7CW4NkMPhK87GGxO1Fr4AjEA-360.mp4",
            "__typename": "ClipVideoQuality"
          }
        ],
        "isViewerEditRestricted": true,
        "suggestedCropping": null,
        "__typename": "Clip",
        "videoURL": "https://production.assets.clips.twitchcdn.net/W4NkMPhK87GGxO1Fr4AjEA/AT-cm%7CW4NkMPhK87GGxO1Fr4AjEA.mp4?sig=43c84d015eddd8ebc145f914824caa1c37ff6559&token=%7B%22authorization%22%3A%7B%22forbidden%22%3Afalse%2C%22reason%22%3A%22%22%7D%2C%22clip_uri%22%3A%22https%3A%2F%2Fproduction.assets.clips.twitchcdn.net%2FW4NkMPhK87GGxO1Fr4AjEA%2FAT-cm%257CW4NkMPhK87GGxO1Fr4AjEA.mp4%22%2C%22clip_slug%22%3A%22CloudySavageMarjoramRuleFive--ErzsYbE7UWvgCMQ%22%2C%22device_id%22%3A%22gtd1TXg9937g0Ra59d6tJBe2f2vWobM7%22%2C%22expires%22%3A1737831991%2C%22user_id%22%3A%22%22%2C%22version%22%3A2%7D"
      }
    },
    "extensions": {
      "durationMilliseconds": 87,
      "operationName": "ShareClipRenderStatus",
      "requestID": "01JJD92A0J3G5ND9PWV2SSXCPC"
    }
  },
  {
    "data": {
      "user": {
        "id": "167189231",
        "clips": {
          "pageInfo": {
            "hasNextPage": true,
            "__typename": "PageInfo"
          },
          "edges": [
            {
              "cursor": null,
              "node": {
                "id": "2068359287",
                "slug": "AmusedDiligentDelicataJKanStyle",
                "url": "https://clips.twitch.tv/AmusedDiligentDelicataJKanStyle",
                "embedURL": "https://clips.twitch.tv/embed?clip=AmusedDiligentDelicataJKanStyle",
                "title": "uff",
                "viewCount": 134949,
                "language": "ES",
                "curator": {
                  "id": "106798576",
                  "login": "000pk",
                  "displayName": "000pk",
                  "__typename": "User"
                },
                "game": {
                  "id": "509658",
                  "slug": "just-chatting",
                  "name": "Just Chatting",
                  "boxArtURL": "https://static-cdn.jtvnw.net/ttv-boxart/509658-52x72.jpg",
                  "__typename": "Game"
                },
                "broadcaster": {
                  "id": "167189231",
                  "login": "staryuuki",
                  "displayName": "Staryuuki",
                  "profileImageURL": "https://static-cdn.jtvnw.net/jtv_user_pictures/b45a3305-bc42-41cc-a754-e6679a2d9ef0-profile_image-50x50.png",
                  "primaryColorHex": "689AFF",
                  "roles": {
                    "isPartner": true,
                    "__typename": "UserRoles"
                  },
                  "__typename": "User"
                },
                "thumbnailURL": "https://clips-media-assets2.twitch.tv/31012586624-offset-134-preview-260x147.jpg",
                "createdAt": "2018-10-30T16:52:07Z",
                "durationSeconds": 30,
                "champBadge": null,
                "isFeatured": false,
                "guestStarParticipants": null,
                "__typename": "Clip"
              },
              "__typename": "ClipEdge"
            },
            {
              "cursor": null,
              "node": {
                "id": "3014081212",
                "slug": "LuckyTardyChinchillaCopyThis",
                "url": "https://clips.twitch.tv/LuckyTardyChinchillaCopyThis",
                "embedURL": "https://clips.twitch.tv/embed?clip=LuckyTardyChinchillaCopyThis",
                "title": ".",
                "viewCount": 105199,
                "language": "ES",
                "curator": {
                  "id": "46575366",
                  "login": "acegickmo",
                  "displayName": "Acegickmo",
                  "__typename": "User"
                },
                "game": {
                  "id": "512927",
                  "slug": "just-dance-2020",
                  "name": "Just Dance 2020",
                  "boxArtURL": "https://static-cdn.jtvnw.net/ttv-boxart/512927_IGDB-52x72.jpg",
                  "__typename": "Game"
                },
                "broadcaster": {
                  "id": "167189231",
                  "login": "staryuuki",
                  "displayName": "Staryuuki",
                  "profileImageURL": "https://static-cdn.jtvnw.net/jtv_user_pictures/b45a3305-bc42-41cc-a754-e6679a2d9ef0-profile_image-50x50.png",
                  "primaryColorHex": "689AFF",
                  "roles": {
                    "isPartner": true,
                    "__typename": "UserRoles"
                  },
                  "__typename": "User"
                },
                "thumbnailURL": "https://clips-media-assets2.twitch.tv/AT-cm%7C923940524-preview-260x147.jpg",
                "createdAt": "2020-11-08T02:30:27Z",
                "durationSeconds": 39,
                "champBadge": null,
                "isFeatured": false,
                "guestStarParticipants": null,
                "__typename": "Clip"
              },
              "__typename": "ClipEdge"
            },
            {
              "cursor": null,
              "node": {
                "id": "4256707722",
                "slug": "PiliableAbstemiousElkYouWHY-msArgXHf2VklQRR6",
                "url": "https://clips.twitch.tv/PiliableAbstemiousElkYouWHY-msArgXHf2VklQRR6",
                "embedURL": "https://clips.twitch.tv/embed?clip=PiliableAbstemiousElkYouWHY-msArgXHf2VklQRR6",
                "title": "rompió la maquina xdd",
                "viewCount": 81131,
                "language": "ES",
                "curator": {
                  "id": "192477639",
                  "login": "satagul_sy",
                  "displayName": "Satagul_SY",
                  "__typename": "User"
                },
                "game": {
                  "id": "509671",
                  "slug": "fitness-and-health",
                  "name": "Fitness & Health",
                  "boxArtURL": "https://static-cdn.jtvnw.net/ttv-boxart/509671-52x72.jpg",
                  "__typename": "Game"
                },
                "broadcaster": {
                  "id": "167189231",
                  "login": "staryuuki",
                  "displayName": "Staryuuki",
                  "profileImageURL": "https://static-cdn.jtvnw.net/jtv_user_pictures/b45a3305-bc42-41cc-a754-e6679a2d9ef0-profile_image-50x50.png",
                  "primaryColorHex": "689AFF",
                  "roles": {
                    "isPartner": true,
                    "__typename": "UserRoles"
                  },
                  "__typename": "User"
                },
                "thumbnailURL": "https://clips-media-assets2.twitch.tv/OkjzuprAK4Fx39lZJUEUeg/AT-cm%7COkjzuprAK4Fx39lZJUEUeg-preview-260x147.jpg",
                "createdAt": "2024-02-19T23:31:56Z",
                "durationSeconds": 19,
                "champBadge": null,
                "isFeatured": true,
                "guestStarParticipants": null,
                "__typename": "Clip"
              },
              "__typename": "ClipEdge"
            },
            {
              "cursor": null,
              "node": {
                "id": "2209460644",
                "slug": "ThoughtfulPeacefulLlamaPanicVis",
                "url": "https://clips.twitch.tv/ThoughtfulPeacefulLlamaPanicVis",
                "embedURL": "https://clips.twitch.tv/embed?clip=ThoughtfulPeacefulLlamaPanicVis",
                "title": "pero que",
                "viewCount": 69120,
                "language": "ES",
                "curator": {
                  "id": "471714921",
                  "login": "sephtis25",
                  "displayName": "sephtis25",
                  "__typename": "User"
                },
                "game": {
                  "id": "509658",
                  "slug": "just-chatting",
                  "name": "Just Chatting",
                  "boxArtURL": "https://static-cdn.jtvnw.net/ttv-boxart/509658-52x72.jpg",
                  "__typename": "Game"
                },
                "broadcaster": {
                  "id": "167189231",
                  "login": "staryuuki",
                  "displayName": "Staryuuki",
                  "profileImageURL": "https://static-cdn.jtvnw.net/jtv_user_pictures/b45a3305-bc42-41cc-a754-e6679a2d9ef0-profile_image-50x50.png",
                  "primaryColorHex": "689AFF",
                  "roles": {
                    "isPartner": true,
                    "__typename": "UserRoles"
                  },
                  "__typename": "User"
                },
                "thumbnailURL": "https://clips-media-assets2.twitch.tv/40472010718-offset-10240-preview-260x147.jpg",
                "createdAt": "2020-11-14T02:38:55Z",
                "durationSeconds": 28,
                "champBadge": null,
                "isFeatured": false,
                "guestStarParticipants": null,
                "__typename": "Clip"
              },
              "__typename": "ClipEdge"
            },
            {
              "cursor": null,
              "node": {
                "id": "2292904553",
                "slug": "FuriousJazzyGoblinCurseLit",
                "url": "https://clips.twitch.tv/FuriousJazzyGoblinCurseLit",
                "embedURL": "https://clips.twitch.tv/embed?clip=FuriousJazzyGoblinCurseLit",
                "title": "jajaja se me fue el cochinito...!!!!",
                "viewCount": 55643,
                "language": "ES",
                "curator": {
                  "id": "246588214",
                  "login": "darkmoux",
                  "displayName": "DarkMoux",
                  "__typename": "User"
                },
                "game": {
                  "id": "509658",
                  "slug": "just-chatting",
                  "name": "Just Chatting",
                  "boxArtURL": "https://static-cdn.jtvnw.net/ttv-boxart/509658-52x72.jpg",
                  "__typename": "Game"
                },
                "broadcaster": {
                  "id": "167189231",
                  "login": "staryuuki",
                  "displayName": "Staryuuki",
                  "profileImageURL": "https://static-cdn.jtvnw.net/jtv_user_pictures/b45a3305-bc42-41cc-a754-e6679a2d9ef0-profile_image-50x50.png",
                  "primaryColorHex": "689AFF",
                  "roles": {
                    "isPartner": true,
                    "__typename": "UserRoles"
                  },
                  "__typename": "User"
                },
                "thumbnailURL": "https://clips-media-assets2.twitch.tv/AT-cm%7C948684283-preview-260x147.jpg",
                "createdAt": "2020-11-29T04:34:30Z",
                "durationSeconds": 4,
                "champBadge": null,
                "isFeatured": false,
                "guestStarParticipants": null,
                "__typename": "Clip"
              },
              "__typename": "ClipEdge"
            },
            {
              "cursor": null,
              "node": {
                "id": "1591728456",
                "slug": "DeadSecretiveDeerWutFace-3WsIhVfQTHpuRBOP",
                "url": "https://clips.twitch.tv/DeadSecretiveDeerWutFace-3WsIhVfQTHpuRBOP",
                "embedURL": "https://clips.twitch.tv/embed?clip=DeadSecretiveDeerWutFace-3WsIhVfQTHpuRBOP",
                "title": "se cayó en just dance xd",
                "viewCount": 52502,
                "language": "ES",
                "curator": {
                  "id": "192477639",
                  "login": "satagul_sy",
                  "displayName": "Satagul_SY",
                  "__typename": "User"
                },
                "game": {
                  "id": "509658",
                  "slug": "just-chatting",
                  "name": "Just Chatting",
                  "boxArtURL": "https://static-cdn.jtvnw.net/ttv-boxart/509658-52x72.jpg",
                  "__typename": "Game"
                },
                "broadcaster": {
                  "id": "167189231",
                  "login": "staryuuki",
                  "displayName": "Staryuuki",
                  "profileImageURL": "https://static-cdn.jtvnw.net/jtv_user_pictures/b45a3305-bc42-41cc-a754-e6679a2d9ef0-profile_image-50x50.png",
                  "primaryColorHex": "689AFF",
                  "roles": {
                    "isPartner": true,
                    "__typename": "UserRoles"
                  },
                  "__typename": "User"
                },
                "thumbnailURL": "https://clips-media-assets2.twitch.tv/UARiUN1rCIVX0Ex6bkQTjw/AT-cm%7CUARiUN1rCIVX0Ex6bkQTjw-preview-260x147.jpg",
                "createdAt": "2023-09-03T04:48:23Z",
                "durationSeconds": 11,
                "champBadge": null,
                "isFeatured": true,
                "guestStarParticipants": null,
                "__typename": "Clip"
              },
              "__typename": "ClipEdge"
            },
            {
              "cursor": null,
              "node": {
                "id": "387484507",
                "slug": "CloudySavageMarjoramRuleFive--ErzsYbE7UWvgCMQ",
                "url": "https://clips.twitch.tv/CloudySavageMarjoramRuleFive--ErzsYbE7UWvgCMQ",
                "embedURL": "https://clips.twitch.tv/embed?clip=CloudySavageMarjoramRuleFive--ErzsYbE7UWvgCMQ",
                "title": "un grande el mesero",
                "viewCount": 52441,
                "language": "ES",
                "curator": {
                  "id": "192477639",
                  "login": "satagul_sy",
                  "displayName": "Satagul_SY",
                  "__typename": "User"
                },
                "game": {
                  "id": "509672",
                  "slug": "irl",
                  "name": "IRL",
                  "boxArtURL": "https://static-cdn.jtvnw.net/ttv-boxart/509672-52x72.jpg",
                  "__typename": "Game"
                },
                "broadcaster": {
                  "id": "167189231",
                  "login": "staryuuki",
                  "displayName": "Staryuuki",
                  "profileImageURL": "https://static-cdn.jtvnw.net/jtv_user_pictures/b45a3305-bc42-41cc-a754-e6679a2d9ef0-profile_image-50x50.png",
                  "primaryColorHex": "689AFF",
                  "roles": {
                    "isPartner": true,
                    "__typename": "UserRoles"
                  },
                  "__typename": "User"
                },
                "thumbnailURL": "https://clips-media-assets2.twitch.tv/W4NkMPhK87GGxO1Fr4AjEA/AT-cm%7CW4NkMPhK87GGxO1Fr4AjEA-preview-260x147.jpg",
                "createdAt": "2024-03-30T21:52:12Z",
                "durationSeconds": 27,
                "champBadge": null,
                "isFeatured": true,
                "guestStarParticipants": null,
                "__typename": "Clip"
              },
              "__typename": "ClipEdge"
            },
            {
              "cursor": null,
              "node": {
                "id": "3175923537",
                "slug": "WonderfulEnchantingBeefNotLikeThis-HApoD6jPpOVCW2eB",
                "url": "https://clips.twitch.tv/WonderfulEnchantingBeefNotLikeThis-HApoD6jPpOVCW2eB",
                "embedURL": "https://clips.twitch.tv/embed?clip=WonderfulEnchantingBeefNotLikeThis-HApoD6jPpOVCW2eB",
                "title": "perfecto equilibrio",
                "viewCount": 51455,
                "language": "ES",
                "curator": {
                  "id": "192477639",
                  "login": "satagul_sy",
                  "displayName": "Satagul_SY",
                  "__typename": "User"
                },
                "game": {
                  "id": "509658",
                  "slug": "just-chatting",
                  "name": "Just Chatting",
                  "boxArtURL": "https://static-cdn.jtvnw.net/ttv-boxart/509658-52x72.jpg",
                  "__typename": "Game"
                },
                "broadcaster": {
                  "id": "167189231",
                  "login": "staryuuki",
                  "displayName": "Staryuuki",
                  "profileImageURL": "https://static-cdn.jtvnw.net/jtv_user_pictures/b45a3305-bc42-41cc-a754-e6679a2d9ef0-profile_image-50x50.png",
                  "primaryColorHex": "689AFF",
                  "roles": {
                    "isPartner": true,
                    "__typename": "UserRoles"
                  },
                  "__typename": "User"
                },
                "thumbnailURL": "https://clips-media-assets2.twitch.tv/D1kjFBwKaA-oz6TlQltngQ/AT-cm%7CD1kjFBwKaA-oz6TlQltngQ-preview-260x147.jpg",
                "createdAt": "2024-04-19T00:01:30Z",
                "durationSeconds": 17,
                "champBadge": null,
                "isFeatured": true,
                "guestStarParticipants": {
                  "guests": [],
                  "sessionIdentifier": "",
                  "__typename": "GuestStarParticipants"
                },
                "__typename": "Clip"
              },
              "__typename": "ClipEdge"
            },
            {
              "cursor": null,
              "node": {
                "id": "3676936393",
                "slug": "ColdNurturingCroissantVoteNay",
                "url": "https://clips.twitch.tv/ColdNurturingCroissantVoteNay",
                "embedURL": "https://clips.twitch.tv/embed?clip=ColdNurturingCroissantVoteNay",
                "title": "mmm que puede hacer xD",
                "viewCount": 46272,
                "language": "ES",
                "curator": {
                  "id": "47307721",
                  "login": "6alucard9",
                  "displayName": "6Alucard9",
                  "__typename": "User"
                },
                "game": {
                  "id": "512927",
                  "slug": "just-dance-2020",
                  "name": "Just Dance 2020",
                  "boxArtURL": "https://static-cdn.jtvnw.net/ttv-boxart/512927_IGDB-52x72.jpg",
                  "__typename": "Game"
                },
                "broadcaster": {
                  "id": "167189231",
                  "login": "staryuuki",
                  "displayName": "Staryuuki",
                  "profileImageURL": "https://static-cdn.jtvnw.net/jtv_user_pictures/b45a3305-bc42-41cc-a754-e6679a2d9ef0-profile_image-50x50.png",
                  "primaryColorHex": "689AFF",
                  "roles": {
                    "isPartner": true,
                    "__typename": "UserRoles"
                  },
                  "__typename": "User"
                },
                "thumbnailURL": "https://clips-media-assets2.twitch.tv/AT-cm%7C746191447-preview-260x147.jpg",
                "createdAt": "2020-06-11T01:48:09Z",
                "durationSeconds": 11,
                "champBadge": null,
                "isFeatured": false,
                "guestStarParticipants": null,
                "__typename": "Clip"
              },
              "__typename": "ClipEdge"
            },
            {
              "cursor": null,
              "node": {
                "id": "1408734293",
                "slug": "PlayfulPhilanthropicBaboonPRChase-LXqIzErAZRhhmYIm",
                "url": "https://clips.twitch.tv/PlayfulPhilanthropicBaboonPRChase-LXqIzErAZRhhmYIm",
                "embedURL": "https://clips.twitch.tv/embed?clip=PlayfulPhilanthropicBaboonPRChase-LXqIzErAZRhhmYIm",
                "title": "cual es el verdadero?",
                "viewCount": 42105,
                "language": "ES",
                "curator": {
                  "id": "192477639",
                  "login": "satagul_sy",
                  "displayName": "Satagul_SY",
                  "__typename": "User"
                },
                "game": {
                  "id": "509667",
                  "slug": "food-and-drink",
                  "name": "Food & Drink",
                  "boxArtURL": "https://static-cdn.jtvnw.net/ttv-boxart/509667-52x72.jpg",
                  "__typename": "Game"
                },
                "broadcaster": {
                  "id": "167189231",
                  "login": "staryuuki",
                  "displayName": "Staryuuki",
                  "profileImageURL": "https://static-cdn.jtvnw.net/jtv_user_pictures/b45a3305-bc42-41cc-a754-e6679a2d9ef0-profile_image-50x50.png",
                  "primaryColorHex": "689AFF",
                  "roles": {
                    "isPartner": true,
                    "__typename": "UserRoles"
                  },
                  "__typename": "User"
                },
                "thumbnailURL": "https://clips-media-assets2.twitch.tv/3GrinS16iMxKwGUYYZmCJg/AT-cm%7C3GrinS16iMxKwGUYYZmCJg-preview-260x147.jpg",
                "createdAt": "2024-09-19T01:52:29Z",
                "durationSeconds": 7,
                "champBadge": null,
                "isFeatured": true,
                "guestStarParticipants": {
                  "guests": [],
                  "sessionIdentifier": "",
                  "__typename": "GuestStarParticipants"
                },
                "__typename": "Clip"
              },
              "__typename": "ClipEdge"
            },
            {
              "cursor": null,
              "node": {
                "id": "4114267322",
                "slug": "PricklyMildSparrowBCWarrior-HROznIBydNqYgkL-",
                "url": "https://clips.twitch.tv/PricklyMildSparrowBCWarrior-HROznIBydNqYgkL-",
                "embedURL": "https://clips.twitch.tv/embed?clip=PricklyMildSparrowBCWarrior-HROznIBydNqYgkL-",
                "title": "modelando crocs",
                "viewCount": 41829,
                "language": "ES",
                "curator": {
                  "id": "192477639",
                  "login": "satagul_sy",
                  "displayName": "Satagul_SY",
                  "__typename": "User"
                },
                "game": {
                  "id": "509672",
                  "slug": "irl",
                  "name": "IRL",
                  "boxArtURL": "https://static-cdn.jtvnw.net/ttv-boxart/509672-52x72.jpg",
                  "__typename": "Game"
                },
                "broadcaster": {
                  "id": "167189231",
                  "login": "staryuuki",
                  "displayName": "Staryuuki",
                  "profileImageURL": "https://static-cdn.jtvnw.net/jtv_user_pictures/b45a3305-bc42-41cc-a754-e6679a2d9ef0-profile_image-50x50.png",
                  "primaryColorHex": "689AFF",
                  "roles": {
                    "isPartner": true,
                    "__typename": "UserRoles"
                  },
                  "__typename": "User"
                },
                "thumbnailURL": "https://clips-media-assets2.twitch.tv/fSGuvR0Ts5yAcnTamIJC_g/AT-cm%7CfSGuvR0Ts5yAcnTamIJC_g-preview-260x147.jpg",
                "createdAt": "2024-10-10T18:35:24Z",
                "durationSeconds": 9,
                "champBadge": null,
                "isFeatured": true,
                "guestStarParticipants": {
                  "guests": [],
                  "sessionIdentifier": "",
                  "__typename": "GuestStarParticipants"
                },
                "__typename": "Clip"
              },
              "__typename": "ClipEdge"
            },
            {
              "cursor": null,
              "node": {
                "id": "2236306000",
                "slug": "BlindingDelightfulDurianBloodTrail-K5hg3bGH94H_Xv2b",
                "url": "https://clips.twitch.tv/BlindingDelightfulDurianBloodTrail-K5hg3bGH94H_Xv2b",
                "embedURL": "https://clips.twitch.tv/embed?clip=BlindingDelightfulDurianBloodTrail-K5hg3bGH94H_Xv2b",
                "title": "Ahegao deforme o estornudo tímido jajaja",
                "viewCount": 40635,
                "language": "ES",
                "curator": null,
                "game": {
                  "id": "509658",
                  "slug": "just-chatting",
                  "name": "Just Chatting",
                  "boxArtURL": "https://static-cdn.jtvnw.net/ttv-boxart/509658-52x72.jpg",
                  "__typename": "Game"
                },
                "broadcaster": {
                  "id": "167189231",
                  "login": "staryuuki",
                  "displayName": "Staryuuki",
                  "profileImageURL": "https://static-cdn.jtvnw.net/jtv_user_pictures/b45a3305-bc42-41cc-a754-e6679a2d9ef0-profile_image-50x50.png",
                  "primaryColorHex": "689AFF",
                  "roles": {
                    "isPartner": true,
                    "__typename": "UserRoles"
                  },
                  "__typename": "User"
                },
                "thumbnailURL": "https://clips-media-assets2.twitch.tv/AT-cm%7C1112919636-preview-260x147.jpg",
                "createdAt": "2021-03-30T03:37:26Z",
                "durationSeconds": 7,
                "champBadge": null,
                "isFeatured": false,
                "guestStarParticipants": null,
                "__typename": "Clip"
              },
              "__typename": "ClipEdge"
            },
            {
              "cursor": null,
              "node": {
                "id": "3579719350",
                "slug": "CallousHonestMouseMVGame",
                "url": "https://clips.twitch.tv/CallousHonestMouseMVGame",
                "embedURL": "https://clips.twitch.tv/embed?clip=CallousHonestMouseMVGame",
                "title": "zfd",
                "viewCount": 40447,
                "language": "ES",
                "curator": null,
                "game": {
                  "id": "512927",
                  "slug": "just-dance-2020",
                  "name": "Just Dance 2020",
                  "boxArtURL": "https://static-cdn.jtvnw.net/ttv-boxart/512927_IGDB-52x72.jpg",
                  "__typename": "Game"
                },
                "broadcaster": {
                  "id": "167189231",
                  "login": "staryuuki",
                  "displayName": "Staryuuki",
                  "profileImageURL": "https://static-cdn.jtvnw.net/jtv_user_pictures/b45a3305-bc42-41cc-a754-e6679a2d9ef0-profile_image-50x50.png",
                  "primaryColorHex": "689AFF",
                  "roles": {
                    "isPartner": true,
                    "__typename": "UserRoles"
                  },
                  "__typename": "User"
                },
                "thumbnailURL": "https://clips-media-assets2.twitch.tv/AT-cm%7C867121828-preview-260x147.jpg",
                "createdAt": "2020-09-22T01:22:52Z",
                "durationSeconds": 29,
                "champBadge": null,
                "isFeatured": false,
                "guestStarParticipants": null,
                "__typename": "Clip"
              },
              "__typename": "ClipEdge"
            },
            {
              "cursor": null,
              "node": {
                "id": "3898454989",
                "slug": "ConfidentBigMushroomAliens",
                "url": "https://clips.twitch.tv/ConfidentBigMushroomAliens",
                "embedURL": "https://clips.twitch.tv/embed?clip=ConfidentBigMushroomAliens",
                "title": "Mirando a coscu sale mal xd",
                "viewCount": 39318,
                "language": "EN",
                "curator": {
                  "id": "193115944",
                  "login": "yuwa_",
                  "displayName": "Yuwa_",
                  "__typename": "User"
                },
                "game": {
                  "id": "509672",
                  "slug": "irl",
                  "name": "IRL",
                  "boxArtURL": "https://static-cdn.jtvnw.net/ttv-boxart/509672-52x72.jpg",
                  "__typename": "Game"
                },
                "broadcaster": {
                  "id": "167189231",
                  "login": "staryuuki",
                  "displayName": "Staryuuki",
                  "profileImageURL": "https://static-cdn.jtvnw.net/jtv_user_pictures/b45a3305-bc42-41cc-a754-e6679a2d9ef0-profile_image-50x50.png",
                  "primaryColorHex": "689AFF",
                  "roles": {
                    "isPartner": true,
                    "__typename": "UserRoles"
                  },
                  "__typename": "User"
                },
                "thumbnailURL": "https://clips-media-assets2.twitch.tv/28747232144-offset-16894-preview-260x147.jpg",
                "createdAt": "2018-05-19T05:28:15Z",
                "durationSeconds": 32,
                "champBadge": null,
                "isFeatured": false,
                "guestStarParticipants": null,
                "__typename": "Clip"
              },
              "__typename": "ClipEdge"
            },
            {
              "cursor": null,
              "node": {
                "id": "2374813344",
                "slug": "CoweringPrettiestCakeCopyThis-WRNpT04oyqLVGY5H",
                "url": "https://clips.twitch.tv/CoweringPrettiestCakeCopyThis-WRNpT04oyqLVGY5H",
                "embedURL": "https://clips.twitch.tv/embed?clip=CoweringPrettiestCakeCopyThis-WRNpT04oyqLVGY5H",
                "title": "saltando en la cama",
                "viewCount": 33939,
                "language": "ES",
                "curator": {
                  "id": "192477639",
                  "login": "satagul_sy",
                  "displayName": "Satagul_SY",
                  "__typename": "User"
                },
                "game": {
                  "id": "509672",
                  "slug": "irl",
                  "name": "IRL",
                  "boxArtURL": "https://static-cdn.jtvnw.net/ttv-boxart/509672-52x72.jpg",
                  "__typename": "Game"
                },
                "broadcaster": {
                  "id": "167189231",
                  "login": "staryuuki",
                  "displayName": "Staryuuki",
                  "profileImageURL": "https://static-cdn.jtvnw.net/jtv_user_pictures/b45a3305-bc42-41cc-a754-e6679a2d9ef0-profile_image-50x50.png",
                  "primaryColorHex": "689AFF",
                  "roles": {
                    "isPartner": true,
                    "__typename": "UserRoles"
                  },
                  "__typename": "User"
                },
                "thumbnailURL": "https://clips-media-assets2.twitch.tv/5qV-I1kTaU9OKMqi1RmORw/AT-cm%7C5qV-I1kTaU9OKMqi1RmORw-preview-260x147.jpg",
                "createdAt": "2024-05-10T15:16:29Z",
                "durationSeconds": 18,
                "champBadge": null,
                "isFeatured": true,
                "guestStarParticipants": {
                  "guests": [],
                  "sessionIdentifier": "",
                  "__typename": "GuestStarParticipants"
                },
                "__typename": "Clip"
              },
              "__typename": "ClipEdge"
            },
            {
              "cursor": null,
              "node": {
                "id": "3174101964",
                "slug": "TransparentWittyRhinocerosFrankerZ",
                "url": "https://clips.twitch.tv/TransparentWittyRhinocerosFrankerZ",
                "embedURL": "https://clips.twitch.tv/embed?clip=TransparentWittyRhinocerosFrankerZ",
                "title": "Esta noche película con subs !discord !cofres | CARTAS ON",
                "viewCount": 33458,
                "language": "ES",
                "curator": {
                  "id": "78073552",
                  "login": "el_penud0",
                  "displayName": "El_Penud0",
                  "__typename": "User"
                },
                "game": {
                  "id": "509658",
                  "slug": "just-chatting",
                  "name": "Just Chatting",
                  "boxArtURL": "https://static-cdn.jtvnw.net/ttv-boxart/509658-52x72.jpg",
                  "__typename": "Game"
                },
                "broadcaster": {
                  "id": "167189231",
                  "login": "staryuuki",
                  "displayName": "Staryuuki",
                  "profileImageURL": "https://static-cdn.jtvnw.net/jtv_user_pictures/b45a3305-bc42-41cc-a754-e6679a2d9ef0-profile_image-50x50.png",
                  "primaryColorHex": "689AFF",
                  "roles": {
                    "isPartner": true,
                    "__typename": "UserRoles"
                  },
                  "__typename": "User"
                },
                "thumbnailURL": "https://clips-media-assets2.twitch.tv/36404054512-offset-5484-preview-260x147.jpg",
                "createdAt": "2019-12-13T01:05:47Z",
                "durationSeconds": 26,
                "champBadge": null,
                "isFeatured": false,
                "guestStarParticipants": null,
                "__typename": "Clip"
              },
              "__typename": "ClipEdge"
            },
            {
              "cursor": null,
              "node": {
                "id": "2151493414",
                "slug": "FurtiveAuspiciousTireFloof-Pw_xt7OJ_L4dIo_t",
                "url": "https://clips.twitch.tv/FurtiveAuspiciousTireFloof-Pw_xt7OJ_L4dIo_t",
                "embedURL": "https://clips.twitch.tv/embed?clip=FurtiveAuspiciousTireFloof-Pw_xt7OJ_L4dIo_t",
                "title": "se quema xd",
                "viewCount": 31601,
                "language": "ES",
                "curator": {
                  "id": "192477639",
                  "login": "satagul_sy",
                  "displayName": "Satagul_SY",
                  "__typename": "User"
                },
                "game": {
                  "id": "509667",
                  "slug": "food-and-drink",
                  "name": "Food & Drink",
                  "boxArtURL": "https://static-cdn.jtvnw.net/ttv-boxart/509667-52x72.jpg",
                  "__typename": "Game"
                },
                "broadcaster": {
                  "id": "167189231",
                  "login": "staryuuki",
                  "displayName": "Staryuuki",
                  "profileImageURL": "https://static-cdn.jtvnw.net/jtv_user_pictures/b45a3305-bc42-41cc-a754-e6679a2d9ef0-profile_image-50x50.png",
                  "primaryColorHex": "689AFF",
                  "roles": {
                    "isPartner": true,
                    "__typename": "UserRoles"
                  },
                  "__typename": "User"
                },
                "thumbnailURL": "https://clips-media-assets2.twitch.tv/8Jy_aT8P8bezify-HSKP7Q/AT-cm%7C8Jy_aT8P8bezify-HSKP7Q-preview-260x147.jpg",
                "createdAt": "2023-09-08T05:21:25Z",
                "durationSeconds": 26,
                "champBadge": null,
                "isFeatured": true,
                "guestStarParticipants": null,
                "__typename": "Clip"
              },
              "__typename": "ClipEdge"
            },
            {
              "cursor": null,
              "node": {
                "id": "863173673",
                "slug": "TallSourPlumageKappaWealth-cYPgjmIKpKEtO2nM",
                "url": "https://clips.twitch.tv/TallSourPlumageKappaWealth-cYPgjmIKpKEtO2nM",
                "embedURL": "https://clips.twitch.tv/embed?clip=TallSourPlumageKappaWealth-cYPgjmIKpKEtO2nM",
                "title": "leche de que",
                "viewCount": 30095,
                "language": "ES",
                "curator": {
                  "id": "192477639",
                  "login": "satagul_sy",
                  "displayName": "Satagul_SY",
                  "__typename": "User"
                },
                "game": {
                  "id": "509658",
                  "slug": "just-chatting",
                  "name": "Just Chatting",
                  "boxArtURL": "https://static-cdn.jtvnw.net/ttv-boxart/509658-52x72.jpg",
                  "__typename": "Game"
                },
                "broadcaster": {
                  "id": "167189231",
                  "login": "staryuuki",
                  "displayName": "Staryuuki",
                  "profileImageURL": "https://static-cdn.jtvnw.net/jtv_user_pictures/b45a3305-bc42-41cc-a754-e6679a2d9ef0-profile_image-50x50.png",
                  "primaryColorHex": "689AFF",
                  "roles": {
                    "isPartner": true,
                    "__typename": "UserRoles"
                  },
                  "__typename": "User"
                },
                "thumbnailURL": "https://clips-media-assets2.twitch.tv/eyD6mHGD4I5iCqShLTtpzA/AT-cm%7CeyD6mHGD4I5iCqShLTtpzA-preview-260x147.jpg",
                "createdAt": "2023-08-26T02:24:31Z",
                "durationSeconds": 20,
                "champBadge": null,
                "isFeatured": true,
                "guestStarParticipants": null,
                "__typename": "Clip"
              },
              "__typename": "ClipEdge"
            },
            {
              "cursor": null,
              "node": {
                "id": "3580660760",
                "slug": "PuzzledMotionlessRatBrokeBack",
                "url": "https://clips.twitch.tv/PuzzledMotionlessRatBrokeBack",
                "embedURL": "https://clips.twitch.tv/embed?clip=PuzzledMotionlessRatBrokeBack",
                "title": "Cara jentai osiosi",
                "viewCount": 29295,
                "language": "ES",
                "curator": {
                  "id": "146446878",
                  "login": "yayomostacho23",
                  "displayName": "yayomostacho23",
                  "__typename": "User"
                },
                "game": {
                  "id": "509658",
                  "slug": "just-chatting",
                  "name": "Just Chatting",
                  "boxArtURL": "https://static-cdn.jtvnw.net/ttv-boxart/509658-52x72.jpg",
                  "__typename": "Game"
                },
                "broadcaster": {
                  "id": "167189231",
                  "login": "staryuuki",
                  "displayName": "Staryuuki",
                  "profileImageURL": "https://static-cdn.jtvnw.net/jtv_user_pictures/b45a3305-bc42-41cc-a754-e6679a2d9ef0-profile_image-50x50.png",
                  "primaryColorHex": "689AFF",
                  "roles": {
                    "isPartner": true,
                    "__typename": "UserRoles"
                  },
                  "__typename": "User"
                },
                "thumbnailURL": "https://clips-media-assets2.twitch.tv/AT-cm%7C920126991-preview-260x147.jpg",
                "createdAt": "2020-11-05T00:58:35Z",
                "durationSeconds": 4,
                "champBadge": null,
                "isFeatured": false,
                "guestStarParticipants": null,
                "__typename": "Clip"
              },
              "__typename": "ClipEdge"
            },
            {
              "cursor": "MjA=",
              "node": {
                "id": "140346618",
                "slug": "AlertCrispyWalrusTBTacoRight",
                "url": "https://clips.twitch.tv/AlertCrispyWalrusTBTacoRight",
                "embedURL": "https://clips.twitch.tv/embed?clip=AlertCrispyWalrusTBTacoRight",
                "title": "Cuando es tu primera vez en la cama xd",
                "viewCount": 29214,
                "language": "ES",
                "curator": {
                  "id": "463913453",
                  "login": "briefer331",
                  "displayName": "Briefer331",
                  "__typename": "User"
                },
                "game": {
                  "id": "509658",
                  "slug": "just-chatting",
                  "name": "Just Chatting",
                  "boxArtURL": "https://static-cdn.jtvnw.net/ttv-boxart/509658-52x72.jpg",
                  "__typename": "Game"
                },
                "broadcaster": {
                  "id": "167189231",
                  "login": "staryuuki",
                  "displayName": "Staryuuki",
                  "profileImageURL": "https://static-cdn.jtvnw.net/jtv_user_pictures/b45a3305-bc42-41cc-a754-e6679a2d9ef0-profile_image-50x50.png",
                  "primaryColorHex": "689AFF",
                  "roles": {
                    "isPartner": true,
                    "__typename": "UserRoles"
                  },
                  "__typename": "User"
                },
                "thumbnailURL": "https://clips-media-assets2.twitch.tv/40414694078-offset-5986-preview-260x147.jpg",
                "createdAt": "2020-11-10T01:44:34Z",
                "durationSeconds": 30,
                "champBadge": null,
                "isFeatured": false,
                "guestStarParticipants": null,
                "__typename": "Clip"
              },
              "__typename": "ClipEdge"
            }
          ],
          "__typename": "ClipConnection"
        },
        "__typename": "User"
      }
    },
    "extensions": {
      "durationMilliseconds": 76,
      "operationName": "ClipsCards__User",
      "requestID": "01JJD92A0J3G5ND9PWV2SSXCPC"
    }
  },
  {
    "data": {
      "user": null
    },
    "extensions": {
      "durationMilliseconds": 2,
      "operationName": "GetDisplayName",
      "requestID": "01JJD92A0J3G5ND9PWV2SSXCPC"
    }
  }
]

Verify Response Structure

Check that your response includes the expected fields:

  • 0(object)
  • 1(object)
  • 2(object)

Best Practices

1

Error Handling

Implement comprehensive error handling and retry logic for failed requests. Log errors properly for debugging.

2

Caching

Cache responses when possible to reduce API calls and improve performance. Consider data freshness requirements.

3

Security

Never expose your API key in client-side code. Use environment variables and secure key management practices.

Performance Tips

Batch Requests

When scraping multiple clips, consider batching requests to maximize throughput while staying within rate limits.

Async Processing

Use asynchronous processing in Node.js to handle multiple requests concurrently and improve overall performance.

Common Use Cases

Market Research

Analyze Twitch clips to understand market trends, competitor analysis, and audience insights.

Content Analytics

Track performance metrics, engagement rates, and content trends across Twitch clips.

Lead Generation

Identify potential customers and business opportunities throughTwitch data analysis.

Troubleshooting

Common Errors

401 Unauthorized

Check your API key is correct and properly formatted in the x-api-key header.

402 Payment Required

You ran out of credits and need to buy more.

404 Not Found

The resource might not exist or be private.

500 Server Error

Temporary server issue. Implement retry logic with exponential backoff.

Frequently Asked Questions

How much does it cost to scrape Twitch clips?

ScrapeCreators offers 100 free API calls to get started. After that, pricing starts at $10 for 5k requests with volume discounts available.

Is it legal to scrape Twitch data?

Scraping publicly available data is fair game, and we only collect public data. So anything that you can see in an incognito browser is what we collect.

How fast can I scrape Twitch clips?

There is no rate limit! So you can scrape as fast as you want!

What data format does the API return?

All API responses are returned in JSON format, making it easy to integrate with any programming language or application.

Can I use this with other Node.js frameworks?

Yes! This tutorial focuses on core Node.js HTTP concepts that work with any framework. The API calls remain the same regardless of your specific Node.js setup.

How do I handle large datasets?

For large datasets, implement pagination, use streaming responses where available, and consider storing data in a database for efficient querying.

Related Tutorials

Ready to Start Scraping?

Get started with 100 free API calls. No credit card required.