1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "offer": "Online booking and reminder system for beauty salons and clinics that still take appointments by phone.",
12 "idealCustomer": "Independent salons, spas and clinics with 1-3 branches. Not large chains.",
13 "leads": [
14 {
15 "name": "Kak Yah Beauty",
16 "category": "Beauty salon",
17 "city": "Shah Alam",
18 "phone": "+60 19-555 1212",
19 "rating": 4.1,
20 "reviewsCount": 12
21 },
22 {
23 "name": "Glow Facial Bar",
24 "category": "Facial spa",
25 "city": "Cheras",
26 "phone": "+60 11-2222 3333",
27 "website": "https://www.facebook.com/glowfacialbar"
28 }
29 ],
30 "websites": [
31 "https://example.com"
32 ]
33};
34
35
36const run = await client.actor("shariful-labs/lead-qualifier").call(input);
37
38
39console.log('Results from dataset');
40console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
41const { items } = await client.dataset(run.defaultDatasetId).listItems();
42items.forEach((item) => {
43 console.dir(item);
44});
45
46