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 "firstName": "John",
14 "lastName": "Doe",
15 "companyName": "Acme Corp",
16 "title": "VP of Sales",
17 "domain": "acme.com",
18 "email": "john@acme.com"
19 },
20 {
21 "firstName": "Jane",
22 "lastName": "Smith",
23 "companyName": "TechStart Inc",
24 "title": "CTO",
25 "linkedinUrl": "https://linkedin.com/in/janesmith"
26 },
27 {
28 "email": "support@example.com",
29 "firstName": "Support",
30 "companyName": "Example Inc"
31 }
32 ],
33 "csvText": ""
34};
35
36
37const run = await client.actor("luckborn/ai-lead-enrichment-pipeline").call(input);
38
39
40console.log('Results from dataset');
41console.log(`๐พ Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
42const { items } = await client.dataset(run.defaultDatasetId).listItems();
43items.forEach((item) => {
44 console.dir(item);
45});
46
47