1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "destinations": [
12 "Austin"
13 ],
14 "destinationType": "CITY",
15 "adults": 2,
16 "rooms": 1,
17 "children": 0,
18 "refundableOnly": false,
19 "noPrepaymentOnly": false,
20 "mealPlanFilter": "any",
21 "minStars": 0,
22 "minReviewScore": "any",
23 "minDiscountPercent": 0,
24 "sortBy": "price",
25 "maxPropertiesPerDestination": 100,
26 "emitMarketRefundabilityRow": true,
27 "maxRequests": 800,
28 "maxConcurrency": 4,
29 "currency": "USD",
30 "language": "en-us"
31};
32
33
34const run = await client.actor("apt_marble/booking-room-offers-scraper").call(input);
35
36
37console.log('Results from dataset');
38console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
39const { items } = await client.dataset(run.defaultDatasetId).listItems();
40items.forEach((item) => {
41 console.dir(item);
42});
43
44