1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "stores": [
12 "apple",
13 "google"
14 ],
15 "startUrls": [
16 {
17 "url": "https://apps.apple.com/us/app/whatsapp-messenger/id310633997"
18 },
19 {
20 "url": "https://play.google.com/store/apps/details?id=com.whatsapp"
21 }
22 ],
23 "appPairs": [
24 {
25 "name": "WhatsApp",
26 "appleId": "310633997",
27 "googleId": "com.whatsapp"
28 }
29 ],
30 "searchTerms": [
31 "vpn",
32 "photo editor"
33 ]
34};
35
36
37const run = await client.actor("crawloop/app-stores-scraper").call(input);
38
39
40console.log('Results from dataset');
41console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
42const { items } = await client.dataset(run.defaultDatasetId).listItems();
43items.forEach((item) => {
44 console.dir(item);
45});
46
47