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&city=calgary&country_abbreviation=ca&expand=assessments&expand_assessment_value_gte=500000&expand_assessment_value_lte=600000&filter_expand_match=all&page=1&property_type_eq=House&province_abbreviation=ab&results_per_page=3&select=city,province,community,interior_sq_m"
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('city', 'calgary');
url.searchParams.set('country_abbreviation', 'ca');
url.searchParams.set('expand', 'assessments');
url.searchParams.set('expand_assessment_value_gte', '500000');
url.searchParams.set('expand_assessment_value_lte', '600000');
url.searchParams.set('filter_expand_match', 'all');
url.searchParams.set('page', '1');
url.searchParams.set('property_type_eq', 'House');
url.searchParams.set('province_abbreviation', 'ab');
url.searchParams.set('results_per_page', '3');
url.searchParams.set('select', 'city,province,community,interior_sq_m');
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": true,
"cost_cents": 1.25,
"data": [
{
"address": "239 Dalhurst Way NW",
"assessments": [
{
"expand_assessment_value": 554000,
"expand_assessment_year": 2007,
"property_id": "100086f6bc064d3f"
},
{
"expand_assessment_value": 591000,
"expand_assessment_year": 2008,
"property_id": "100086f6bc064d3f"
},
{
"expand_assessment_value": 592000,
"expand_assessment_year": 2009,
"property_id": "100086f6bc064d3f"
},
{
"expand_assessment_value": 565000,
"expand_assessment_year": 2010,
"property_id": "100086f6bc064d3f"
}
],
"city": "Calgary",
"community": "Dalhousie",
"interior_sq_m": 112.41268157958984,
"property_id": "100086f6bc064d3f",
"province": "Alberta"
},
{
"address": "52 Cedargrove Way SW",
"assessments": [
{
"expand_assessment_value": 529000,
"expand_assessment_year": 2024,
"property_id": "1000c277cd905d3b"
},
{
"expand_assessment_value": 516500,
"expand_assessment_year": 2014,
"property_id": "1000c277cd905d3b"
}
],
"city": "Calgary",
"community": "Cedarbrae",
"interior_sq_m": 119.8449249267578,
"property_id": "1000c277cd905d3b",
"province": "Alberta"
},
{
"address": "28 Sundown Gr SE",
"assessments": [
{
"expand_assessment_value": 521500,
"expand_assessment_year": 2023,
"property_id": "1001109ab2aebbc0"
},
{
"expand_assessment_value": 573500,
"expand_assessment_year": 2024,
"property_id": "1001109ab2aebbc0"
}
],
"city": "Calgary",
"community": "Sundance",
"interior_sq_m": 177.81494140625,
"property_id": "1001109ab2aebbc0",
"province": "Alberta"
}
],
"error": "",
"pagination": {
"current_page": 1,
"has_next_page": true,
"has_previous_page": false,
"page_total": 78425
},
"price_quote": false,
"result_total": 235273,
"time_ms": 3675,
"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"
}
}