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 "industry": "Financial Technology",
16 "companySize": "1001-5000",
17 "contactName": "Jane Smith",
18 "contactTitle": "VP of Engineering",
19 "email": "jane@stripe.com",
20 "emailStatus": "verified",
21 "phone": "+1-555-0123",
22 "linkedinUrl": "https://linkedin.com/in/janesmith",
23 "location": "San Francisco, CA",
24 "country": "US",
25 "leadScore": 88,
26 "dataCompleteness": 85,
27 "sources": [
28 "linkedin",
29 "crunchbase"
30 ],
31 "sourceCount": 2,
32 "tags": [
33 "hot-lead",
34 "enterprise"
35 ]
36 },
37 {
38 "companyName": "Acme Corp",
39 "domain": "acme.com",
40 "contactName": "Bob Jones",
41 "email": "bob@acme.com",
42 "emailStatus": "unverified",
43 "sources": [
44 "manual"
45 ],
46 "sourceCount": 1
47 },
48 {
49 "companyName": "TechStart",
50 "industry": "SaaS",
51 "contactTitle": "CEO",
52 "sources": [
53 "crunchbase"
54 ],
55 "sourceCount": 1
56 }
57 ],
58 "minConfidence": 0,
59 "includeDebugWeights": true
60};
61
62
63const run = await client.actor("automation-lab/lead-enrichment-confidence-scorer").call(input);
64
65
66console.log('Results from dataset');
67console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
68const { items } = await client.dataset(run.defaultDatasetId).listItems();
69items.forEach((item) => {
70 console.dir(item);
71});
72
73