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=vancouver&country_abbreviation=ca&for_rent_eq=true&page=1&province_abbreviation=bc&results_per_page=3&select=address,estimate_rent_monthly,bedroom_total,bathroom_total,property_type,interior_sq_m,estimate_days_on_market_until_rented"
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', 'vancouver');
url.searchParams.set('country_abbreviation', 'ca');
url.searchParams.set('for_rent_eq', 'true');
url.searchParams.set('page', '1');
url.searchParams.set('province_abbreviation', 'bc');
url.searchParams.set('results_per_page', '3');
url.searchParams.set('select', 'address,estimate_rent_monthly,bedroom_total,bathroom_total,property_type,interior_sq_m,estimate_days_on_market_until_rented');
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.5899999141693115,
"data": [
{
"address": "1336 W 14 Avenue",
"bathroom_total": 1,
"bedroom_total": 2,
"estimate_days_on_market_until_rented": 36,
"estimate_rent_monthly": 3509,
"interior_sq_m": 83.42689514160156,
"property_id": "12d9a9e0876ecf1",
"property_type": "Apartment"
},
{
"address": "1336 7 Avenue W",
"bathroom_total": 2,
"bedroom_total": 1,
"estimate_days_on_market_until_rented": 43,
"estimate_rent_monthly": 3801,
"interior_sq_m": 108.9752197265625,
"property_id": "148435ee397eece3",
"property_type": "Townhouse"
},
{
"address": "2468 Balaclava Street",
"bathroom_total": 2,
"bedroom_total": 3,
"estimate_days_on_market_until_rented": 31,
"estimate_rent_monthly": 3316,
"interior_sq_m": 90.30171966552734,
"property_id": "1800b9f2f1876795",
"property_type": "Apartment"
}
],
"error": "",
"pagination": {
"current_page": 1,
"has_next_page": true,
"has_previous_page": false,
"page_total": 39
},
"price_quote": false,
"result_total": 116,
"time_ms": 223,
"ui_info": {
"city": "Vancouver",
"city_id": "3d4b9ab2229768be",
"city_link": "ca/bc/vancouver",
"city_slug": "vancouver",
"country": "Canada",
"country_abbreviation": "CA",
"country_abbreviation_id": "9ace2b6431b7f1be",
"country_abbreviation_link": "ca",
"country_slug": "canada",
"province": "British Columbia",
"province_abbreviation": "BC",
"province_abbreviation_id": "84b27e64bc119a2",
"province_abbreviation_link": "ca/bc",
"province_slug": "british_columbia"
}
}