1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "searchMode": "location",
12 "locations": [
13 "Berlin"
14 ],
15 "realEstateType": "apartmentrent",
16 "maxResults": 3,
17 "includeDetails": true,
18 "sorting": "newest",
19 "minPrice": 0,
20 "maxPrice": 1000000,
21 "minLivingSpace": 0,
22 "maxLivingSpace": 10000,
23 "minRooms": 0,
24 "maxRooms": 100,
25 "minConstructionYear": 1000,
26 "maxConstructionYear": 2100,
27 "apartmentTypes": [],
28 "buildingTypes": [],
29 "energyEfficiencyClasses": [],
30 "equipment": [],
31 "heatingTypes": [],
32 "petsAllowed": "any",
33 "exclusionCriteria": [],
34 "osmTags": [],
35 "listingTags": [],
36 "fullText": "",
37 "publishedAfter": "1970-01-01"
38};
39
40
41const run = await client.actor("datascraperes/immoscout24-property-scraper").call(input);
42
43
44console.log('Results from dataset');
45console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
46const { items } = await client.dataset(run.defaultDatasetId).listItems();
47items.forEach((item) => {
48 console.dir(item);
49});
50
51