1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "mode": "channel",
12 "channels": [
13 "shroud"
14 ],
15 "gameSlug": "valorant",
16 "searchQuery": "valorant",
17 "videoIds": [
18 "2767213751"
19 ],
20 "urls": [
21 "https://www.twitch.tv/shroud",
22 "https://www.twitch.tv/directory/category/just-chatting",
23 "https://www.twitch.tv/directory/game/Valorant",
24 "https://www.twitch.tv/videos/2767213751",
25 "https://clips.twitch.tv/TangentialBillowingJalapenoYee-ccA2oB1pEYh4CHWJ",
26 "https://m.twitch.tv/ninja",
27 "https://www.twitch.tv/shroud/videos",
28 "https://www.twitch.tv/shroud/clips",
29 "https://www.twitch.tv/search?term=valorant",
30 "https://www.twitch.tv/directory"
31 ],
32 "proxyConfiguration": {
33 "useApifyProxy": true
34 },
35 "incrementalMode": false,
36 "emitUnchanged": false,
37 "emitExpired": false,
38 "ignoreFieldsForChanges": []
39};
40
41
42const run = await client.actor("abotapi/twitch-scraper").call(input);
43
44
45console.log('Results from dataset');
46console.log(`๐พ Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
47const { items } = await client.dataset(run.defaultDatasetId).listItems();
48items.forEach((item) => {
49 console.dir(item);
50});
51
52