Practical examples for using the Houski API.
Select the programming language you want to display the code examples in.
curl -X GET "http://127.0.0.1:8080/properties?api_key=YOUR_API_KEY&cap_rate_gt=0.10&city=calgary&country_abbreviation=ca&page=1&property_type_eq=Apartment&province_abbreviation=ab&results_per_page=5&select=address,estimate_list_price,estimate_rent_monthly,cap_rate,cash_on_cash_return,maintenance_fee,property_taxes,interior_sq_m,bedroom_total"
const houski_recipe_data = async (): Promise<PropertiesResponse> => {
// You must copy the PropertiesResponse type declarations from the
// Houski API documentation to strongly type the response
const url = new URL('http://127.0.0.1:8080/properties');
url.searchParams.set('api_key', 'YOUR_API_KEY');
url.searchParams.set('cap_rate_gt', '0.10');
url.searchParams.set('city', 'calgary');
url.searchParams.set('country_abbreviation', 'ca');
url.searchParams.set('page', '1');
url.searchParams.set('property_type_eq', 'Apartment');
url.searchParams.set('province_abbreviation', 'ab');
url.searchParams.set('results_per_page', '5');
url.searchParams.set('select', 'address,estimate_list_price,estimate_rent_monthly,cap_rate,cash_on_cash_return,maintenance_fee,property_taxes,interior_sq_m,bedroom_total');
const response = await fetch(url);
const data = await response.json();
return data;
}
(async () => {
let data: PropertiesResponse = await houski_recipe_data();
// Log the response
console.log(data);
})();
{
"cache_hit": false,
"cost_cents": 4.100000381469727,
"data": [
{
"address": "6105 302 Skyview Ranch Drive NE",
"bedroom_total": 2,
"cap_rate": 0.10222046077251434,
"cash_on_cash_return": 0.19950376451015472,
"estimate_list_price": 225407,
"estimate_rent_monthly": 1630,
"interior_sq_m": 76.45856475830078,
"maintenance_fee": 393,
"property_id": "1001e5d457b46526",
"property_taxes": 1434
},
{
"address": "2 2022 11 Avenue SW",
"bedroom_total": 2,
"cap_rate": 0.15749934315681458,
"cash_on_cash_return": 0.42061924934387207,
"estimate_list_price": 160306,
"estimate_rent_monthly": 1750,
"interior_sq_m": 74.36857604980469,
"maintenance_fee": 519,
"property_id": "10027a59d3becf43",
"property_taxes": 961
},
{
"address": "606 2909 17 Avenue SW",
"bedroom_total": 3,
"cap_rate": 0.17488081753253937,
"cash_on_cash_return": 0.490145206451416,
"estimate_list_price": 207778,
"estimate_rent_monthly": 2509,
"interior_sq_m": 156.26161193847656,
"maintenance_fee": 460,
"property_id": "10044d3d0f4ecf10",
"property_taxes": 1406
},
{
"address": "628 Kingsmere Crescent SW",
"bedroom_total": 1,
"cap_rate": 0.10213568806648254,
"cash_on_cash_return": 0.19916468858718872,
"estimate_list_price": 290352,
"estimate_rent_monthly": 2098,
"interior_sq_m": 78.22435760498047,
"maintenance_fee": 491,
"property_id": "1004d7ca503f8990"
},
{
"address": "3101 10 Prestwick Bay SE",
"bedroom_total": 2,
"cap_rate": 0.10188618302345276,
"cash_on_cash_return": 0.1981666684150696,
"estimate_list_price": 266747,
"estimate_rent_monthly": 1923,
"interior_sq_m": 91.50949096679688,
"maintenance_fee": 467,
"property_id": "100717a322c86cb6",
"property_taxes": 1829
}
],
"error": "",
"pagination": {
"current_page": 1,
"has_next_page": true,
"has_previous_page": false,
"page_total": 8757
},
"price_quote": false,
"result_total": 43783,
"time_ms": 93,
"ui_info": {
"city": "Calgary",
"city_id": "6ec95b53075d062c",
"city_link": "ca/ab/calgary",
"city_slug": "calgary",
"country": "Canada",
"country_abbreviation": "CA",
"country_abbreviation_id": "9ace2b6431b7f1be",
"country_abbreviation_link": "ca",
"country_slug": "canada",
"province": "Alberta",
"province_abbreviation": "AB",
"province_abbreviation_id": "aae1f05a0f89d2c7",
"province_abbreviation_link": "ca/ab",
"province_slug": "alberta"
}
}