1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "searches": [
10 {
11 "transactionType": "sale",
12 "propertyType": "flat",
13 "locationPath": "mazowieckie/warszawa/warszawa/warszawa",
14 "maxPages": 2,
15 },
16 {
17 "transactionType": "rent",
18 "propertyType": "flat",
19 "locationPath": "mazowieckie/warszawa/warszawa/warszawa",
20 "maxPages": 2,
21 },
22 {
23 "transactionType": "sale",
24 "propertyType": "house",
25 "locationPath": "malopolskie/krakow/krakow/krakow",
26 "maxPages": 1,
27 },
28 {
29 "transactionType": "rent",
30 "propertyType": "flat",
31 "locationPath": "dolnoslaskie/wroclaw/wroclaw/wroclaw",
32 "maxPages": 1,
33 },
34 ],
35 "maxResults": 40,
36 "proxyConfiguration": {
37 "useApifyProxy": True,
38 "apifyProxyGroups": ["RESIDENTIAL"],
39 },
40}
41
42
43run = client.actor("devilscrapes/otodom-poland-real-estate-scraper").call(run_input=run_input)
44
45
46print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
47for item in client.dataset(run.default_dataset_id).iterate_items():
48 print(item)
49
50