1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "places": [
12 "https://www.google.com/maps/place/?q=place_id:ChIJJ3SpfQsZTIYRIcqOUQVKF1M"
13 ],
14 "placeItems": [],
15 "runMode": "monitor",
16 "maxReviewsPerPlace": 20,
17 "maxPlacesPerRun": 50,
18 "sortBy": "newest",
19 "locale": "en-US",
20 "mapsHost": "www.google.com",
21 "languages": [],
22 "negativeRatingThreshold": 2,
23 "maxPriorityActionsPerPlace": 50,
24 "consecutiveMissThreshold": 3,
25 "historyStoreName": "google-maps-review-history",
26 "maxConcurrency": 1,
27 "delayBetweenPlacesMs": 1500,
28 "navigationTimeoutSecs": 35,
29 "maxRetriesPerPlace": 0,
30 "webhookUrls": [],
31 "alertEmails": [],
32 "emailMode": "digest",
33 "notifyOn": "priority_actions",
34 "minPriorityToNotify": "high"
35};
36
37
38const run = await client.actor("basta_compilar/google-maps-review-change-feed").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