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 "name": "Bluewater Bistro",
14 "category": "Restaurant",
15 "city": "Seattle",
16 "website": "https://example-bistro.com"
17 },
18 {
19 "name": "Acme Payroll Co",
20 "category": "B2B services",
21 "city": "Chicago"
22 }
23 ],
24 "icpDescription": "Independent restaurants and bars in US metro areas — owner-operated, not chains — that would benefit from a modern point-of-sale system.",
25 "offerDescription": "We sell an all-in-one restaurant POS with free installation and 0% processing for the first 3 months."
26};
27
28
29const run = await client.actor("rook-data-tools/ai-lead-qualifier").call(input);
30
31
32console.log('Results from dataset');
33console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
34const { items } = await client.dataset(run.defaultDatasetId).listItems();
35items.forEach((item) => {
36 console.dir(item);
37});
38
39