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 Jazz",
14 "category": "hotel",
15 "location": "Barcelona",
16 "website": "https://www.hoteljazz.com/"
17 },
18 {
19 "businessName": "Le Select",
20 "category": "restaurant",
21 "location": "Paris",
22 "website": "https://www.leselectmontparnasse.fr/"
23 }
24 ],
25 "country": "Spain",
26 "locations": [
27 "Barcelona",
28 "Nice",
29 "Lisbon"
30 ],
31 "businessTypes": [
32 "hotel",
33 "guest_house",
34 "apartment",
35 "restaurant",
36 "cafe"
37 ],
38 "overpassEndpoints": [
39 "https://overpass-api.de/api/interpreter",
40 "https://overpass.kumi.systems/api/interpreter"
41 ]
42};
43
44
45const run = await client.actor("viable_guard/hospitality-website-opportunity-scanner").call(input);
46
47
48console.log('Results from dataset');
49console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
50const { items } = await client.dataset(run.defaultDatasetId).listItems();
51items.forEach((item) => {
52 console.dir(item);
53});
54
55