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 "searchQueries": [
13 "Paris, France"
14 ],
15 "listingUrls": [
16 "https://www.airbnb.com/rooms/1536119775792438782"
17 ],
18 "adults": 1,
19 "children": 0,
20 "infants": 0,
21 "pets": 0,
22 "currency": "USD",
23 "superhostOnly": false,
24 "instantBookOnly": false,
25 "guestFavoriteOnly": false,
26 "maxItems": 20,
27 "fetchDetails": false,
28 "includeReviews": false,
29 "maxReviewsPerListing": 20,
30 "incrementalMode": false,
31 "emitUnchanged": false,
32 "emitExpired": false,
33 "maxNotifyListings": 50,
34 "proxyConfiguration": {
35 "useApifyProxy": true
36 }
37};
38
39
40const run = await client.actor("abotapi/airbnb-stays-reviews-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