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.co.uk/Kastoria-Hotels-Hotel-Anastassiou.h6136437.Hotel-Information"
14 }
15 ],
16 "searchLocations": [
17 "New York, New York, United States of America"
18 ],
19 "searchSort": "RECOMMENDED",
20 "searchAmenities": [],
21 "excludeVacationRentals": true,
22 "sortBy": "newest",
23 "includeReviewPhotos": false,
24 "includeOwnerResponses": false,
25 "includeRoomRates": false,
26 "includeHotelInfo": false,
27 "includePropertyDetails": false,
28 "includeCategoryRatings": false,
29 "includeRatingDistribution": false,
30 "includePropertyImages": false,
31 "skipReviews": false,
32 "debug": false
33};
34
35
36const run = await client.actor("ahmed_jasarevic/expedia-reviews-scraper").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