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 "market": "sweden",
13 "location": "Stockholm",
14 "homeTypes": [],
15 "maxResults": 100,
16 "rentMin": 0,
17 "rentMax": 0,
18 "roomsMin": 0,
19 "roomsMax": 0,
20 "areaMin": 0,
21 "areaMax": 0,
22 "moveInFrom": "",
23 "minRentalMonths": 0,
24 "furnished": "any",
25 "petsAllowed": false,
26 "wheelchairAccessible": false,
27 "sharedHomes": "any",
28 "contractTypes": [],
29 "householdSize": 0,
30 "sort": "newest",
31 "includeDetails": false,
32 "listingUrls": [],
33 "searchUrls": []
34};
35
36
37const run = await client.actor("sian.agency/qasa-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