1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "items": [
12 {
13 "title": "Shopify",
14 "categoryName": "Software company",
15 "website": "https://www.shopify.com",
16 "phone": "+1 888-746-7439",
17 "url": "https://www.google.com/maps/place/Shopify"
18 },
19 {
20 "name": "HubSpot",
21 "email": "press@hubspot.com",
22 "phoneNumber": "+1 888-482-7768",
23 "link": "https://www.hubspot.com"
24 },
25 {
26 "companyName": "Zoom Video Communications",
27 "description": "Video conferencing platform. Contact us at info@zoom.us for enterprise sales.",
28 "domain": "zoom.us"
29 },
30 {
31 "title": "Shopify Inc",
32 "website": "https://shopify.com",
33 "phone": "+1 888-746-7439"
34 },
35 {
36 "title": "Stripe",
37 "categoryName": "Payment processor",
38 "website": "https://stripe.com",
39 "phone": "+1 888-926-2289",
40 "emails": [
41 "support@stripe.com"
42 ]
43 }
44 ],
45 "checks": [
46 "dedupe",
47 "email",
48 "domain",
49 "score"
50 ]
51};
52
53
54const run = await client.actor("zinin/lead-list-cleaner").call(input);
55
56
57console.log('Results from dataset');
58console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
59const { items } = await client.dataset(run.defaultDatasetId).listItems();
60items.forEach((item) => {
61 console.dir(item);
62});
63
64