1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "searchQueries": [
12 "dentists in Athens Greece"
13 ],
14 "startUrls": [],
15 "maxPlacesPerQuery": 3,
16 "language": "en",
17 "enrichWebsites": false,
18 "maxWebsitePages": 1,
19 "minimumRating": 0,
20 "minimumReviewCount": 0,
21 "requireWebsite": false,
22 "requirePhone": false,
23 "excludeClosed": true,
24 "monitorChanges": false,
25 "onlyChanges": false,
26 "forceRefresh": true,
27 "cacheTtlMinutes": 0,
28 "maxConcurrency": 1,
29 "pageTimeoutSeconds": 30,
30 "maxRequestsPerRun": 12,
31 "maxRetries": 1,
32 "retryBackoffSeconds": 1,
33 "maxProxyRotations": 1,
34 "proxyConfiguration": {
35 "useApifyProxy": true
36 }
37};
38
39
40const run = await client.actor("datahunter_labs/google-maps-lead-competitor-intelligence").call(input);
41
42
43console.log('Results from dataset');
44console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
45const { items } = await client.dataset(run.defaultDatasetId).listItems();
46items.forEach((item) => {
47 console.dir(item);
48});
49
50