!

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 "http://127.0.0.1:8080/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('http://127.0.0.1:8080/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": true,
  "cost_cents": 3.1500000953674316,
  "data": [
    {
      "address": "19 9750 McNaught Road",
      "backs_onto": "Water",
      "bathroom_total": 3,
      "bedroom_total": 3,
      "city": "Chilliwack",
      "estimate_list_price": 584627,
      "interior_sq_m": 137.1248321533203,
      "land_area_sq_m": 849.875,
      "property_id": "10000075ad647a6d"
    },
    {
      "address": "1283 6 Street",
      "backs_onto": "Water",
      "bathroom_total": 3,
      "bedroom_total": 3,
      "city": "Lake Country",
      "estimate_list_price": 972305,
      "interior_sq_m": 133.40870666503906,
      "land_area_sq_m": 1019.8087158203124,
      "property_id": "10001144b12008dd"
    },
    {
      "address": "7850 Nixon Road",
      "backs_onto": "Water",
      "bathroom_total": 3,
      "bedroom_total": 2,
      "city": "Chilliwack",
      "estimate_list_price": 1220638,
      "interior_sq_m": 189.1505126953125,
      "land_area_sq_m": 692.1300048828125,
      "property_id": "100053f16c7b9136"
    },
    {
      "address": "12 650 Yorkshire Drive",
      "backs_onto": "Water",
      "bathroom_total": 2,
      "bedroom_total": 2,
      "city": "Campbell River",
      "estimate_list_price": 511160,
      "interior_sq_m": 108.6965103149414,
      "land_area_sq_m": 683.9193115234375,
      "property_id": "1000d1ed059f53ae"
    },
    {
      "address": "405 1434 Ironwood Street",
      "backs_onto": "Water",
      "bathroom_total": 2,
      "bedroom_total": 3,
      "city": "Campbell River",
      "estimate_list_price": 439843,
      "interior_sq_m": 121.79583740234376,
      "land_area_sq_m": 683.9193115234375,
      "property_id": "10018c9fd78f4401"
    }
  ],
  "error": "",
  "pagination": {
    "current_page": 1,
    "has_next_page": true,
    "has_previous_page": false,
    "page_total": 14855
  },
  "price_quote": false,
  "result_total": 74275,
  "time_ms": 122,
  "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"
  }
}