API recipes

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

Examples

Find basement homes in high flood risk zones

Programming language

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

Find basement homes in high flood risk zones
Combine basement_type with the flood risk score (0 to 10, where 0 and 1 are the highest risk) to surface at-risk properties. Useful for waterproofing contractors, sump pump installers, and flood insurance underwriting.
Request
Shell session
curl -X GET "https://api.houski.ca/properties?api_key=YOUR_API_KEY&basement_type_neq=None&city=winnipeg&country_abbreviation=ca&page=1&property_type_in=House,Townhouse&province_abbreviation=mb&results_per_page=5&score_flood_lte=1&select=address,basement_type,foundation_type,score_flood,floor_below_ground,construction_year,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('basement_type_neq', 'None');
    url.searchParams.set('city', 'winnipeg');
    url.searchParams.set('country_abbreviation', 'ca');
    url.searchParams.set('page', '1');
    url.searchParams.set('property_type_in', 'House,Townhouse');
    url.searchParams.set('province_abbreviation', 'mb');
    url.searchParams.set('results_per_page', '5');
    url.searchParams.set('score_flood_lte', '1');
    url.searchParams.set('select', 'address,basement_type,foundation_type,score_flood,floor_below_ground,construction_year,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.1,
  "data": [
    {
      "address": "137 Rowandale Crescent",
      "basement_type": "Full",
      "construction_year": 1960,
      "estimate_list_price": 648029,
      "floor_below_ground": 1,
      "foundation_type": "Wood",
      "property_id": "1022512ea36a6c5",
      "score_flood": 0
    },
    {
      "address": "941 Woodvale Street",
      "basement_type": "Full",
      "construction_year": 1955,
      "estimate_list_price": 517388,
      "floor_below_ground": 1,
      "foundation_type": "Wood",
      "property_id": "1025cfde2735fcfa",
      "score_flood": 0
    },
    {
      "address": "154 Greene Avenue",
      "basement_type": "Full",
      "construction_year": 1946,
      "estimate_list_price": 319021,
      "floor_below_ground": 1,
      "foundation_type": "Wood",
      "property_id": "10639d768117eb38",
      "score_flood": 1
    },
    {
      "address": "178 Oakview Avenue",
      "basement_type": "Full",
      "construction_year": 1927,
      "estimate_list_price": 311960,
      "floor_below_ground": 1,
      "foundation_type": "Wood",
      "property_id": "10a62cc8512576a0",
      "score_flood": 1
    },
    {
      "address": "1177 Kildonan Drive",
      "basement_type": "Full",
      "construction_year": 1952,
      "estimate_list_price": 394115,
      "floor_below_ground": 1,
      "foundation_type": "Wood",
      "property_id": "10c0e33b30c13d66",
      "score_flood": 1
    }
  ],
  "error": "",
  "pagination": {
    "current_page": 1,
    "has_next_page": true,
    "has_previous_page": false,
    "page_total": 23362
  },
  "price_quote": false,
  "result_total": 116807,
  "time_ms": 34,
  "ui_info": {
    "city": "Winnipeg",
    "city_id": "d1aab9c3a544b7b6",
    "city_link": "ca/mb/winnipeg",
    "city_slug": "winnipeg",
    "country": "Canada",
    "country_abbreviation": "CA",
    "country_abbreviation_id": "9ace2b6431b7f1be",
    "country_abbreviation_link": "ca",
    "country_slug": "canada",
    "province": "Manitoba",
    "province_abbreviation": "MB",
    "province_abbreviation_id": "cbb58e256d8f6973",
    "province_abbreviation_link": "ca/mb",
    "province_slug": "manitoba"
  }
}