!

API recipes

Practical examples for using the Houski API.

Examples

Find luxury homes over $1M with pools

Programming language

Select the programming language you want to display the code examples in.

Find luxury homes with specific features
Find Vancouver homes over $1M with pools.
Request
Shell session
curl -X GET "https://api.houski.ca/properties?api_key=YOUR_API_KEY&city=vancouver&country_abbreviation=ca&estimate_list_price_gte=1000000&has_private_outdoor_swimming_pool_eq=true&page=1&property_type_eq=House&province_abbreviation=bc&results_per_page=5&select=address,estimate_list_price,interior_sq_m,bedroom,bathroom_full"
TypeScript code
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('https://api.houski.ca/properties');
    url.searchParams.set('api_key', 'YOUR_API_KEY');
    url.searchParams.set('city', 'vancouver');
    url.searchParams.set('country_abbreviation', 'ca');
    url.searchParams.set('estimate_list_price_gte', '1000000');
    url.searchParams.set('has_private_outdoor_swimming_pool_eq', 'true');
    url.searchParams.set('page', '1');
    url.searchParams.set('property_type_eq', 'House');
    url.searchParams.set('province_abbreviation', 'bc');
    url.searchParams.set('results_per_page', '5');
    url.searchParams.set('select', 'address,estimate_list_price,interior_sq_m,bedroom,bathroom_full');

    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);
})();
Response
JSON
{
  "cache_hit": true,
  "cost_cents": 2.0999999046325684,
  "data": [
    {
      "address": "1350 W 32 Avenue",
      "bathroom_full": 8,
      "bedroom": 8,
      "estimate_list_price": 12626940,
      "interior_sq_m": 823.3927612304688,
      "property_id": "1191b00bec1043ab"
    },
    {
      "address": "1903 W 37 Avenue",
      "bathroom_full": 4,
      "bedroom": 6,
      "estimate_list_price": 3005517,
      "interior_sq_m": 275.2694091796875,
      "property_id": "1495f4f3ceb5aafa"
    },
    {
      "address": "1638 Marpole Avenue",
      "bathroom_full": 5,
      "bedroom": 5,
      "estimate_list_price": 11228426,
      "interior_sq_m": 494.2439880371094,
      "property_id": "15d460b578e6618b"
    },
    {
      "address": "5583 Cypress Street",
      "bathroom_full": 3,
      "bedroom": 5,
      "estimate_list_price": 4505010,
      "interior_sq_m": 302.02764892578125,
      "property_id": "1769767da99b3089"
    },
    {
      "address": "2709 W 49 Avenue",
      "bathroom_full": 8,
      "bedroom": 5,
      "estimate_list_price": 6494859,
      "interior_sq_m": 868.3574829101562,
      "property_id": "17b0f9267ef41b9c"
    }
  ],
  "error": "",
  "pagination": {
    "current_page": 1,
    "has_next_page": true,
    "has_previous_page": false,
    "page_total": 16
  },
  "price_quote": false,
  "result_total": 77,
  "time_ms": 54,
  "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"
  }
}