1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "leads": [
12 {
13 "name": "Corner Restaurant",
14 "website": "https://www.cornerrestaurantaustin.com",
15 "phone": "+15126084488",
16 "address": "110 E 2nd St, Austin, TX",
17 "category": "Restaurant",
18 "rating": 4.8
19 },
20 {
21 "name": "Ember Kitchen",
22 "website": "https://www.emberatx.com",
23 "phone": "+15122916846",
24 "address": "800 W Cesar Chavez St, Austin, TX",
25 "category": "Restaurant",
26 "rating": 4.8
27 }
28 ]
29};
30
31
32const run = await client.actor("cancap/maps-leads-email-enricher").call(input);
33
34
35console.log('Results from dataset');
36console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
37const { items } = await client.dataset(run.defaultDatasetId).listItems();
38items.forEach((item) => {
39 console.dir(item);
40});
41
42