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 "domain": "brightedge.com",
14 "companyName": "BrightEdge",
15 "industry": "Marketing Agency",
16 "services": [
17 "SEO",
18 "Content Marketing",
19 "Analytics"
20 ],
21 "companySize": "51-200",
22 "emails": [
23 "hello@brightedge.com"
24 ],
25 "contacts": [
26 {
27 "name": "Sarah Chen",
28 "title": "Head of SEO",
29 "email": "s.chen@brightedge.com"
30 }
31 ],
32 "phones": [
33 "+1 415-555-0182"
34 ],
35 "address": "1 Market St, San Francisco, CA",
36 "rating": 4.7,
37 "reviewCount": 143,
38 "hasChatWidget": true,
39 "hasContactForm": true,
40 "techStack": [
41 "HubSpot",
42 "Google Analytics",
43 "Salesforce"
44 ],
45 "foundedYear": 2011,
46 "description": "Enterprise SEO and content performance platform for B2B companies."
47 }
48 ],
49 "targetIndustries": [
50 "Marketing Agency",
51 "Digital Agency"
52 ],
53 "targetCompanySizes": [
54 "11-50",
55 "51-200"
56 ],
57 "targetServices": [
58 "SEO",
59 "Content Marketing"
60 ],
61 "targetTechStack": [
62 "HubSpot",
63 "Google Analytics"
64 ]
65};
66
67
68const run = await client.actor("ryanclinton/lead-scoring-engine").call(input);
69
70
71console.log('Results from dataset');
72console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
73const { items } = await client.dataset(run.defaultDatasetId).listItems();
74items.forEach((item) => {
75 console.dir(item);
76});
77
78