1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "search_terms": [
12 "restaurant"
13 ],
14 "location": "New York, USA",
15 "max_results_per_search": 3,
16 "language": "en-US",
17 "extract_opening_hours": false,
18 "extract_images": false,
19 "image_limit": 6,
20 "extract_website_contacts": false,
21 "extract_social_profiles": false,
22 "max_concurrency": 1,
23 "proxySettings": {
24 "useApifyProxy": true
25 }
26};
27
28
29const run = await client.actor("morpheus26/google-maps-leads-engine").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