1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "locations": [
12 "Paris, France"
13 ],
14 "adults": 1,
15 "minPrice": 0,
16 "maxPrice": 0,
17 "minRating": 0,
18 "superhostOnly": false,
19 "minBeds": 0,
20 "roomType": "all",
21 "maxItemsPerLocation": 30,
22 "proxyConfiguration": {
23 "useApifyProxy": true
24 },
25 "maxExecutionTimeSecs": 75
26};
27
28
29const run = await client.actor("rbbscrap/airbnb-scraper").call(input);
30
31
32console.log('Results from dataset');
33console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
34const { items } = await client.dataset(run.defaultDatasetId).listItems();
35items.forEach((item) => {
36 console.dir(item);
37});
38
39