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 "companyName": "Stripe",
14 "domain": "stripe.com",
15 "contactName": "Jane Smith",
16 "contactTitle": "VP of Engineering",
17 "email": "jane@stripe.com",
18 "phone": "+1-555-0123",
19 "location": "San Francisco, CA",
20 "source": "LinkedIn"
21 },
22 {
23 "companyName": "Notion",
24 "domain": "notion.so",
25 "contactName": "John Doe",
26 "contactTitle": "Product Manager",
27 "location": "New York, NY",
28 "source": "Conference"
29 },
30 {
31 "companyName": "Datadog",
32 "domain": "datadoghq.com",
33 "email": "sales@datadoghq.com",
34 "source": "Website"
35 }
36 ],
37 "maxLeads": 20
38};
39
40
41const run = await client.actor("automation-lab/multi-source-lead-enrichment").call(input);
42
43
44console.log('Results from dataset');
45console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
46const { items } = await client.dataset(run.defaultDatasetId).listItems();
47items.forEach((item) => {
48 console.dir(item);
49});
50
51