1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "targetingMode": "search",
12 "searchQuery": "restaurant",
13 "locationQuery": "New York, USA",
14 "maxPlaces": 10,
15 "maxPlacesPerSearch": 20,
16 "moreSearchQueries": [],
17 "moreLocations": [],
18 "directPlaceTargets": [],
19 "language": "en",
20 "countryCode": "US",
21 "websitePresence": "any",
22 "minimumRating": 0,
23 "categoryKeywords": [],
24 "nameMustInclude": "",
25 "skipClosedPlaces": true
26};
27
28
29const run = await client.actor("luminar/google-maps-contact-website-opportunity-leads").call(input);
30
31
32console.log('Results from dataset');
33console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
34const { items } = await client.dataset(run.defaultDatasetId).listItems();
35items.forEach((item) => {
36 console.dir(item);
37});
38
39