1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "businesses": [
12 {
13 "name": "Evergreen Home Heating and Energy",
14 "website": "http://www.evergreenhomeheatingandenergy.com/",
15 "city": "Seattle",
16 "state": "WA",
17 "phone": "(206) 565-1455"
18 },
19 {
20 "name": "Linh's Hair Salon",
21 "website": "http://linhshairsalon.weebly.com/",
22 "city": "Seattle",
23 "state": "WA",
24 "phone": "(206) 760-2996"
25 }
26 ],
27 "proxyConfiguration": {
28 "useApifyProxy": true
29 }
30};
31
32
33const run = await client.actor("emulative_capeskin/google-maps-lead-enricher").call(input);
34
35
36console.log('Results from dataset');
37console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
38const { items } = await client.dataset(run.defaultDatasetId).listItems();
39items.forEach((item) => {
40 console.dir(item);
41});
42
43