1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "apps": [
12 "570",
13 "Elden Ring",
14 "https://store.steampowered.com/app/413150/Stardew_Valley/"
15 ],
16 "charts": [
17 "most-played"
18 ],
19 "chartSize": 25,
20 "country": "us",
21 "language": "en",
22 "searchQueries": [],
23 "sortBy": "relevance",
24 "tagIds": [],
25 "maxResultsPerQuery": 50,
26 "onlyGames": true,
27 "includePlayerCount": true,
28 "includeSteamSpy": true,
29 "includeReviewSummary": true,
30 "enrichChartEntries": false,
31 "maxConcurrency": 3,
32 "proxyConfiguration": {
33 "useApifyProxy": true
34 }
35};
36
37
38const run = await client.actor("insight.solutions/steam-store-stats-api").call(input);
39
40
41console.log('Results from dataset');
42console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
43const { items } = await client.dataset(run.defaultDatasetId).listItems();
44items.forEach((item) => {
45 console.dir(item);
46});
47
48