1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "operation": "reviews",
12 "hotels": [
13 "https://www.hrs.com/en/hotel/519245",
14 "10369",
15 "Radisson Blu Hotel Bremen"
16 ],
17 "maxReviewsPerHotel": 200,
18 "travellerType": "ALLHRS",
19 "reviewsFrom": "",
20 "onlyWithText": false,
21 "includeHotelReplies": true,
22 "places": [
23 "Munich",
24 "Vienna"
25 ],
26 "maxHotelsPerPlace": 100
27};
28
29
30const run = await client.actor("sian.agency/hrs-hotel-reviews-scraper").call(input);
31
32
33console.log('Results from dataset');
34console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
35const { items } = await client.dataset(run.defaultDatasetId).listItems();
36items.forEach((item) => {
37 console.dir(item);
38});
39
40