!

API recipes

Practical examples for using the Houski API.

Examples

Find homes backing onto water

Programming language

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

Find homes backing onto water
Waterfront properties (lakes, rivers, ocean) via the backs_onto field. Useful for luxury real estate marketing, marine services targeting, and vacation property investor lists.
Request
Shell session
curl -X GET "https://api.houski.ca/properties?api_key=YOUR_API_KEY&backs_onto_eq=Water&country_abbreviation=ca&page=1&province_abbreviation=bc&results_per_page=5&select=address,city,backs_onto,land_area_sq_m,interior_sq_m,bedroom_total,bathroom_total,estimate_list_price"
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('backs_onto_eq', 'Water');
    url.searchParams.set('country_abbreviation', 'ca');
    url.searchParams.set('page', '1');
    url.searchParams.set('province_abbreviation', 'bc');
    url.searchParams.set('results_per_page', '5');
    url.searchParams.set('select', 'address,city,backs_onto,land_area_sq_m,interior_sq_m,bedroom_total,bathroom_total,estimate_list_price');

    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": false,
  "cost_cents": 3.1500000953674316,
  "data": [
    {
      "address": "1283 6 Street",
      "backs_onto": "Water",
      "bathroom_total": 3,
      "bedroom_total": 3,
      "city": "Lake Country",
      "estimate_list_price": 1041809,
      "interior_sq_m": 134.98699951171875,
      "land_area_sq_m": 36696.6875,
      "property_id": "10001144b12008dd"
    },
    {
      "address": "12 650 Yorkshire Drive",
      "backs_onto": "Water",
      "bathroom_total": 2,
      "bedroom_total": 2,
      "city": "Campbell River",
      "estimate_list_price": 521351,
      "interior_sq_m": 145.02159118652344,
      "land_area_sq_m": 708.1995849609375,
      "property_id": "1000d1ed059f53ae"
    },
    {
      "address": "405 1434 Ironwood Street",
      "backs_onto": "Water",
      "bathroom_total": 2,
      "bedroom_total": 3,
      "city": "Campbell River",
      "estimate_list_price": 433117,
      "interior_sq_m": 121.51712799072266,
      "land_area_sq_m": 708.1995849609375,
      "property_id": "10018c9fd78f4401"
    },
    {
      "address": "1931 16 Avenue",
      "backs_onto": "Water",
      "bathroom_total": 1,
      "bedroom_total": 2,
      "city": "Campbell River",
      "estimate_list_price": 412828,
      "interior_sq_m": 62.80242919921875,
      "land_area_sq_m": 708.1995849609375,
      "property_id": "100379db4efba06d"
    },
    {
      "address": "301 Legacy Drive",
      "backs_onto": "Water",
      "bathroom_total": 3,
      "bedroom_total": 3,
      "city": "Campbell River",
      "estimate_list_price": 972228,
      "interior_sq_m": 200.2059783935547,
      "land_area_sq_m": 708.1995849609375,
      "property_id": "1003af235fa0c300"
    }
  ],
  "error": "",
  "pagination": {
    "current_page": 1,
    "has_next_page": true,
    "has_previous_page": false,
    "page_total": 6010
  },
  "price_quote": false,
  "result_total": 30049,
  "time_ms": 55,
  "ui_info": {
    "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"
  }
}