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 "locations": [
13 "Brussels"
14 ],
15 "propertyType": "house",
16 "transactionType": "for-sale",
17 "maxResults": 100,
18 "sort": "newest",
19 "language": "en",
20 "includeDetails": false,
21 "minPrice": 0,
22 "maxPrice": 0,
23 "minBedroomCount": 0,
24 "minSurface": 0,
25 "minLandSurface": 0,
26 "epcScores": [],
27 "buildingCondition": "any",
28 "hasGarden": false,
29 "hasTerrace": false,
30 "hasSwimmingPool": false,
31 "isNewlyBuilt": false,
32 "searchUrls": [],
33 "listingUrls": []
34};
35
36
37const run = await client.actor("sian.agency/immoweb-be-property-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