1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "mode": "newHousingPriceIndex",
10 "geography": "Toronto, Ontario",
11 "housingStartsGeography": "Toronto, Ontario",
12 "buildingPermitsGeography": "Canada",
13 "priceIndexComponent": "Total (house and land)",
14 "housingEstimateType": "Housing starts",
15 "housingUnitType": "Total units",
16 "averageRentsGeography": "Toronto, Ontario",
17 "housingStartsByMarketGeography": "Toronto, Ontario",
18 "dwellingUnitType": "Total units",
19 "marketType": "Homeowner",
20 "rentStructureType": "Row and apartment structures of three units and over",
21 "rentUnitType": "Two bedroom units",
22 "vacancyRatesGeography": "Toronto, Ontario",
23 "permitStructureType": "Total residential and non-residential",
24 "permitTypeOfWork": "Types of work, total",
25 "permitVariable": "Value of permits",
26 "seasonalAdjustment": "Unadjusted, current",
27 "condoApartmentPriceIndexGeography": "Toronto, Ontario",
28 "housingStartsSAARGeography": "Canada",
29 "housingStartsSAARUnitType": "Total units",
30 "newlyCompletedUnoccupiedHousingGeography": "Toronto, Ontario",
31 "unoccupiedHousingUnitType": "Total units",
32 "absorptionsGeography": "Toronto, Ontario",
33 "absorptionsCAGeography": "All census agglomerations 50,000 and over",
34 "completedDwellingUnitsStatus": "Absorptions",
35 "absorptionsUnitType": "Total units",
36 "maxItems": 100,
37}
38
39
40run = client.actor("crawlerbros/statistics-canada-housing-scraper").call(run_input=run_input)
41
42
43print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
44for item in client.dataset(run.default_dataset_id).iterate_items():
45 print(item)
46
47