1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "operation": "search",
10 "location": "Stockholm",
11 "propertyTypes": ["APARTMENTS"],
12 "maxResults": 100,
13 "soldSince": "12m",
14 "priceMin": 0,
15 "priceMax": 0,
16 "roomsMin": 0,
17 "roomsMax": 0,
18 "livingAreaMin": 0,
19 "livingAreaMax": 0,
20 "maxFee": 0,
21 "constructionYearMin": 0,
22 "includeDetails": False,
23 "listingUrls": [],
24 "searchUrls": [],
25 "locationIds": [],
26 "sort": "NEWEST",
27}
28
29
30run = client.actor("sian.agency/hemnet-property-scraper").call(run_input=run_input)
31
32
33print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
34for item in client.dataset(run.default_dataset_id).iterate_items():
35 print(item)
36
37