API recipes

Requests you can copy and run. Each one returns live data from the API.

A request that selects a field with a source column carries exclude=inferred, which leaves out the values Houski worked out, unless it looks up one named property. Remove it to get those values too.

Examples

Find properties with flood AND fire risk

Programming language

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

Find properties with combined flood AND fire risk
Stack score filters to find properties with top-tier flood AND fire risk. Essential for catastrophe modeling, reinsurance portfolio analysis, and multi-peril underwriting.
Request
Shell session
curl -X GET "https://api.houski.ca/properties?api_key=YOUR_API_KEY&country_abbreviation=ca&exclude=inferred&page=1&province_abbreviation=bc&results_per_page=5&score_fire_lte=2&score_flood_lte=1&select=address,city,score_flood,score_fire,score_earthquake,construction_year,foundation_type,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('country_abbreviation', 'ca');
    url.searchParams.set('exclude', 'inferred');
    url.searchParams.set('page', '1');
    url.searchParams.set('province_abbreviation', 'bc');
    url.searchParams.set('results_per_page', '5');
    url.searchParams.set('score_fire_lte', '2');
    url.searchParams.set('score_flood_lte', '1');
    url.searchParams.set('select', 'address,city,score_flood,score_fire,score_earthquake,construction_year,foundation_type,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,
  "checked_fields": [
    "construction_year"
  ],
  "cost_cents": 3.1499999,
  "data": [
    {
      "address": "11 77 Nelson Road",
      "city": "Lake Cowichan",
      "construction_year": 2020,
      "estimate_list_price": 501151,
      "foundation_type": "Poured concrete",
      "property_id": "4fe10f1fa7edcbd4",
      "score_earthquake": 6,
      "score_fire": 2,
      "score_flood": 1
    },
    {
      "address": "83 Somenos Street",
      "city": "Lake Cowichan",
      "construction_year": 1963,
      "estimate_list_price": 1013886,
      "foundation_type": "Poured concrete",
      "property_id": "b04a5e02f05aa7",
      "score_earthquake": 6,
      "score_fire": 2,
      "score_flood": 1
    },
    {
      "address": "413 Oak Avenue",
      "city": "Sicamous",
      "construction_year": 1978,
      "estimate_list_price": 515972,
      "foundation_type": "Poured concrete",
      "property_id": "a7291ecc25cad627",
      "score_earthquake": 7,
      "score_fire": 2,
      "score_flood": 1
    },
    {
      "address": "4 222 Temple Street",
      "city": "Sicamous",
      "construction_year": 2026,
      "estimate_list_price": 520109,
      "foundation_type": "Poured concrete",
      "property_id": "10863a4bf4df8c67",
      "score_earthquake": 7,
      "score_fire": 2,
      "score_flood": 1
    },
    {
      "address": "221 Temple Street",
      "city": "Sicamous",
      "construction_year": 1993,
      "estimate_list_price": 355901,
      "foundation_type": "Poured concrete",
      "property_id": "1259bae06a52a9a4",
      "score_earthquake": 7,
      "score_fire": 2,
      "score_flood": 1
    }
  ],
  "error": "",
  "pagination": {
    "current_page": 1,
    "has_next_page": true,
    "has_previous_page": false,
    "page_total": 192
  },
  "price_quote": false,
  "result_total": 960,
  "time_ms": 45,
  "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"
  }
}