In this example we will pull detailed data from a single property, using the /properties endpoint.
Select the programming language you want to display the code examples in.
curl -X GET "https://api.houski.ca/properties?address=151-mckerrell-place-se&api_key=YOUR_API_KEY&city=calgary&country_abbreviation=ca&province_abbreviation=ab&results_per_page=3&select=bedroom,den,bathroom_full,bathroom_half"
const houski_properties_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('https://api.houski.ca/properties'); url.searchParams.set('address', '151-mckerrell-place-se'); url.searchParams.set('api_key', 'YOUR_API_KEY'); url.searchParams.set('city', 'calgary'); url.searchParams.set('country_abbreviation', 'ca'); url.searchParams.set('province_abbreviation', 'ab'); url.searchParams.set('results_per_page', '3'); url.searchParams.set('select', 'bedroom,den,bathroom_full,bathroom_half'); const response = await fetch(url); const data = await response.json(); return data; } (async () => { let data: PropertiesResponse = await houski_properties_data(); // Log the response console.log(data); })();
{ "cache_hit": false, "cost_cents": 0.6000000238418579, "data": [ { "address": "151 McKerrell Place SE", "bathroom_full": 2, "bathroom_half": 1, "bedroom": 4, "den": 1, "property_id": "1f6299f6f1616645" } ], "error": "", "pagination": { "current_page": 1, "has_next_page": false, "has_previous_page": false, "page_total": 1 }, "price_quote": false, "result_total": 1, "time_ms": 129, "ui_info": { "address": "151 McKerrell Place SE", "address_link": "ca/ab/calgary/mckenzie-lake/151-mckerrell-place-se", "address_slug": "151-mckerrell-place-se", "city": "Calgary", "city_id": "6ec95b53075d062c", "city_link": "ca/ab/calgary", "city_slug": "calgary", "community": "McKenzie Lake", "community_id": "6893f1425b51f7bb", "community_link": "ca/ab/calgary/mckenzie-lake", "community_slug": "mckenzie-lake", "country": "Canada", "country_abbreviation": "CA", "country_abbreviation_id": "9ace2b6431b7f1be", "country_abbreviation_link": "ca", "country_slug": "canada", "property_id": "1f6299f6f1616645", "province": "Alberta", "province_abbreviation": "AB", "province_abbreviation_id": "aae1f05a0f89d2c7", "province_abbreviation_link": "ca/ab", "province_slug": "alberta" } }
curl -X GET "https://api.houski.ca/properties?address=151-mckerrell-place-se&api_key=YOUR_API_KEY&city=calgary&country_abbreviation=ca&price_quote=true&province_abbreviation=ab&results_per_page=3"
const houski_properties_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('https://api.houski.ca/properties'); url.searchParams.set('address', '151-mckerrell-place-se'); url.searchParams.set('api_key', 'YOUR_API_KEY'); url.searchParams.set('city', 'calgary'); url.searchParams.set('country_abbreviation', 'ca'); url.searchParams.set('price_quote', 'true'); url.searchParams.set('province_abbreviation', 'ab'); url.searchParams.set('results_per_page', '3'); const response = await fetch(url); const data = await response.json(); return data; } (async () => { let data: PropertiesResponse = await houski_properties_data(); // Log the response console.log(data); })();
{ "cache_hit": false, "cost_cents": 0.20000000298023224, "data": [ {} ], "error": "", "pagination": { "current_page": 1, "has_next_page": false, "has_previous_page": false, "page_total": 1 }, "price_quote": true, "result_total": 1, "time_ms": 134, "ui_info": {} }