1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "mode": "search",
12 "locations": [
13 "Dubai"
14 ],
15 "rooms": 1,
16 "adults": 2,
17 "currency": "USD",
18 "urls": [
19 "https://www.wego.com/en/hotels/searches/dxb/2026-10-01/2026-10-03?guests=2"
20 ],
21 "freeCancellationOnly": false,
22 "sortBy": "popularity",
23 "fetchDetails": true,
24 "fetchReviews": false,
25 "maxReviewsPerHotel": 20,
26 "maxItems": 20,
27 "incrementalMode": false,
28 "emitUnchanged": false,
29 "emitExpired": false,
30 "proxy": {
31 "useApifyProxy": true
32 }
33};
34
35
36const run = await client.actor("abotapi/wego-com-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