1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "businessRecords": [
12 {
13 "name": "Example Dental",
14 "website": "https://example.com/",
15 "category": "dentist",
16 "city": "Austin",
17 "state": "TX",
18 "rating": 3.8,
19 "reviewCount": 14
20 }
21 ],
22 "targetServices": [
23 "website redesign",
24 "local SEO",
25 "review management",
26 "online booking",
27 "lead generation"
28 ]
29};
30
31
32const run = await client.actor("knotted_tussock/local-business-lead-qualifier").call(input);
33
34
35console.log('Results from dataset');
36console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
37const { items } = await client.dataset(run.defaultDatasetId).listItems();
38items.forEach((item) => {
39 console.dir(item);
40});
41
42