1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "locations": [{
10 "city": "Toronto",
11 "province": "ON",
12 }],
13 "urls": [
14 "https://www.realtor.ca/map#ZoomLevel=11&Center=43.718245%2C-79.376682&LatitudeMax=43.86034&LongitudeMax=-79.12303&LatitudeMin=43.57584&LongitudeMin=-79.63033&view=list&Sort=6-D&PGeoIds=g30_dpz89rm7&GeoName=Toronto%2C%20ON&PropertyTypeGroupID=1&TransactionTypeId=2&PropertySearchTypeId=1&Currency=CAD&IncludeHiddenListings=false",
15 "https://www.realtor.ca/bc/vancouver/real-estate",
16 "https://www.realtor.ca/on/toronto/apartments-for-rent",
17 ],
18 "proxyConfiguration": {
19 "useApifyProxy": True,
20 "apifyProxyGroups": ["RESIDENTIAL"],
21 "apifyProxyCountry": "CA",
22 },
23 "ignoreFieldsForChanges": [],
24}
25
26
27run = client.actor("abotapi/realtor-ca-scraper").call(run_input=run_input)
28
29
30print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
31for item in client.dataset(run.default_dataset_id).iterate_items():
32 print(item)
33
34