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.
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"
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'); 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": true, "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": 96, "ui_info": {} }
You can get a price quote for any request by adding the price_quote
query parameter to the request.
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": true, "cost_cents": 0.20000000298023224, "data": [ {} ], "error": "", "pagination": { "current_page": 0, "has_next_page": false, "has_previous_page": false, "page_total": 0 }, "price_quote": true, "result_total": 0, "time_ms": 0, "ui_info": {} }