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 "location": "Rome, Italy",
13 "experienceUrls": [],
14 "startUrls": [],
15 "category": "any",
16 "goodFor": "any",
17 "timeOfDay": "any",
18 "language": "any",
19 "accessibility": "any",
20 "experienceType": "all",
21 "adults": 1,
22 "children": 0,
23 "infants": 0,
24 "locale": "en",
25 "currency": "USD",
26 "sortBy": "recommended",
27 "maxItems": 2,
28 "maxPages": 1,
29 "includeDetails": true,
30 "includeAvailability": true,
31 "availabilityDays": 7,
32 "maxAvailabilitySlots": 3,
33 "includePreviewReviews": true,
34 "includeReviewRecords": false,
35 "maxReviewsPerExperience": 5,
36 "reviewSort": "mostRelevant"
37};
38
39
40const run = await client.actor("xyrelith-data/airbnb-experiences-scraper").call(input);
41
42
43console.log('Results from dataset');
44console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
45const { items } = await client.dataset(run.defaultDatasetId).listItems();
46items.forEach((item) => {
47 console.dir(item);
48});
49
50