1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "urls": [
12 "https://www.makemytrip.com/hotels/hotel-details/?hotelId=201107121143323974&_uCurrency=INR&checkin=11222025&checkout=12162025&city=CTKUU&country=IN&filterData=DPT_COLLECTIONS%7C8_FAMILY_FAVOURITES_KG%5EHOTEL_PRICE_BUCKET%7C0-4000&isCollectionListing=true&lat=32.22619&lng=77.18859&locusId=CTKUU&locusType=city&rank=2&reference=hotel&roomStayQualifier=2e0e&rsc=1e2e0e&searchText=Manali&type=city&mtkeys=undefined"
13 ],
14 "reviewsPerUrl": 30
15};
16
17
18const run = await client.actor("krazee_kaushik/makemytrip-hotel-reviews-scraper").call(input);
19
20
21console.log('Results from dataset');
22console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
23const { items } = await client.dataset(run.defaultDatasetId).listItems();
24items.forEach((item) => {
25 console.dir(item);
26});
27
28