1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "startUrls": [
12 {
13 "url": "https://www.airbnb.com/rooms/36697362"
14 },
15 {
16 "url": "https://www.airbnb.com/rooms/1701622328401155281"
17 },
18 {
19 "url": "https://www.airbnb.com/rooms/1320256957672510175"
20 },
21 {
22 "url": "https://www.airbnb.com/rooms/1142938"
23 },
24 {
25 "url": "https://www.airbnb.com/rooms/23479454"
26 }
27 ],
28 "checkIn": "+90 days",
29 "checkOut": "+95 days",
30 "adults": 2,
31 "proxyConfiguration": {
32 "useApifyProxy": true
33 }
34};
35
36
37const run = await client.actor("deepmine/airbnb-listing-scraper").call(input);
38
39
40console.log('Results from dataset');
41console.log(`πΎ Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
42const { items } = await client.dataset(run.defaultDatasetId).listItems();
43items.forEach((item) => {
44 console.dir(item);
45});
46
47