1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "startUrls": [
12 {
13 "url": "https://www.expedia.com/Prague-Hotels-Hotel-Krystal.h10966026.Hotel-Information",
14 "method": "GET",
15 "userData": {
16 "hotel": "Prague Hotel Krystal",
17 "doWeEndorseIt": "no opinion"
18 }
19 },
20 {
21 "url": "https://www.expedia.it/en/Berchtesgaden-Hotels-Alpensport-Hotel-Seimler.h2692552.Hotel-Information",
22 "method": "GET",
23 "userData": {
24 "your": [
25 "custom",
26 "data",
27 "goes",
28 "here"
29 ],
30 "doWeEndorseThisHotel": "no opinion"
31 }
32 }
33 ]
34};
35
36
37const run = await client.actor("tri_angle/expedia-hotels-com-reviews-scraper").call(input);
38
39
40console.log('Results from dataset');
41console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
42const { items } = await client.dataset(run.defaultDatasetId).listItems();
43items.forEach((item) => {
44 console.dir(item);
45});
46
47