1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "mode": "search",
12 "urls": [
13 "https://www.immoweb.be/en/search/house/for-sale?countries=BE&page=1&orderBy=newest",
14 "https://www.immoweb.be/en/search/house/for-sale?countries=BE&page=2&orderBy=newest",
15 "https://www.immoweb.be/en/search/house-and-apartment/for-rent?countries=BE&postalCodes=BE-1000&minPrice=500&maxPrice=1500&orderBy=cheapest",
16 "https://www.immoweb.be/nl/zoeken/huis/te-koop?countries=BE&page=1",
17 "https://www.immoweb.be/fr/recherche/maison/a-vendre?countries=BE&page=1",
18 "https://www.immoweb.be/en/search/apartment/for-sale/brussels/province?countries=BE",
19 "https://www.immoweb.be/en/search/house/for-sale/antwerpen/2000?countries=BE",
20 "https://www.immoweb.be/en/search/new-real-estate-project-houses/for-sale",
21 "https://www.immoweb.be/en/classified/apartment/for-sale/aalst-9300/9300/21925957",
22 "https://www.immoweb.be/en/classified/21925957",
23 "https://www.immoweb.be/en/agency/immo-bastogne-sa/318779"
24 ],
25 "proxyConfiguration": {
26 "useApifyProxy": true,
27 "apifyProxyGroups": []
28 },
29 "ignoreFieldsForChanges": []
30};
31
32
33const run = await client.actor("abotapi/immoweb-scraper").call(input);
34
35
36console.log('Results from dataset');
37console.log(`๐พ Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
38const { items } = await client.dataset(run.defaultDatasetId).listItems();
39items.forEach((item) => {
40 console.dir(item);
41});
42
43