1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "records": [
12 {
13 "company": "Northstar HVAC Supply",
14 "website": "https://northstarhvacsupply.example",
15 "email": "sales@northstarhvacsupply.example",
16 "phone": "+1 555 010 2210",
17 "city": "Dallas",
18 "state": "TX",
19 "description": "Commercial HVAC supplier serving contractors and property managers"
20 },
21 {
22 "company": "Metro Build Expo",
23 "url": "https://events.example/metro-build-expo",
24 "category": "Building & Construction",
25 "city": "Chicago",
26 "country": "US",
27 "estimatedVisitors": 8500
28 }
29 ],
30 "icpDescription": "B2B companies in construction, HVAC, industrial supply, manufacturing, trade shows, logistics, or services with a website and reachable sales/contact channel."
31};
32
33
34const run = await client.actor("leadops_lab/lead-intelligence-scorer-pro").call(input);
35
36
37console.log('Results from dataset');
38console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
39const { items } = await client.dataset(run.defaultDatasetId).listItems();
40items.forEach((item) => {
41 console.dir(item);
42});
43
44