1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "appleCharts": [
12 "us/top-free",
13 "us/top-grossing/6014"
14 ],
15 "chartSize": 50,
16 "googleCategories": [
17 "us/HEALTH_AND_FITNESS"
18 ],
19 "searchQueries": [
20 "meditation"
21 ],
22 "stores": [
23 "apple",
24 "google"
25 ],
26 "maxResultsPerQuery": 25,
27 "includeAppDetails": false,
28 "country": "us",
29 "language": "en",
30 "maxConcurrency": 3,
31 "maxRunSecs": 240,
32 "proxyConfiguration": {
33 "useApifyProxy": true
34 }
35};
36
37
38const run = await client.actor("insight.solutions/app-charts-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