1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "operation": "search",
12 "transaction": "buy",
13 "propertyType": "apartment",
14 "location": "luxembourg",
15 "bedrooms": "",
16 "maxResults": 100,
17 "minPrice": 0,
18 "maxPrice": 0,
19 "minSurface": 0,
20 "maxSurface": 0,
21 "minBedrooms": 0,
22 "maxBedrooms": 0,
23 "minRooms": 0,
24 "maxRooms": 0,
25 "sort": "",
26 "includeDetails": false,
27 "searchUrls": [],
28 "listingUrls": []
29};
30
31
32const run = await client.actor("sian.agency/athome-lu-property-scraper").call(input);
33
34
35console.log('Results from dataset');
36console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
37const { items } = await client.dataset(run.defaultDatasetId).listItems();
38items.forEach((item) => {
39 console.dir(item);
40});
41
42