1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "inputBusinesses": [
12 {
13 "businessName": "Hotel Nice",
14 "category": "hotel",
15 "location": "Sorrento",
16 "website": "http://www.hotelnicesorrento.com/"
17 }
18 ],
19 "locations": [
20 "Rimini",
21 "Sorrento",
22 "Desenzano del Garda"
23 ],
24 "businessTypes": [
25 "hotel",
26 "guest_house",
27 "restaurant"
28 ],
29 "overpassEndpoints": [
30 "https://overpass-api.de/api/interpreter",
31 "https://overpass.kumi.systems/api/interpreter"
32 ]
33};
34
35
36const run = await client.actor("viable_guard/italian-hospitality-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