1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "collectListings": true,
12 "locations": [
13 "Austin, TX"
14 ],
15 "maxListingsPerMarket": 10,
16 "maxListings": 15,
17 "includeHostDetails": false,
18 "collectHosts": false,
19 "hostLocations": [
20 "Austin, TX"
21 ],
22 "maxHosts": 10,
23 "enrichListings": false,
24 "listingUrls": [],
25 "maxListingsFromUrls": 10,
26 "checkIn": "",
27 "checkOut": "",
28 "adults": 2,
29 "maxItems": 100,
30 "maxRetries": 3,
31 "webhookUrl": "",
32 "webhookFormat": "json",
33 "proxyConfiguration": {
34 "useApifyProxy": true,
35 "apifyProxyGroups": [
36 "RESIDENTIAL"
37 ],
38 "apifyProxyCountry": "US"
39 }
40};
41
42
43const run = await client.actor("b2b_leads/airbnb-real-time-data").call(input);
44
45
46console.log('Results from dataset');
47console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
48const { items } = await client.dataset(run.defaultDatasetId).listItems();
49items.forEach((item) => {
50 console.dir(item);
51});
52
53