API recipes

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

Examples

Find houses with aging roofs (15+ years)

Programming language

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

Find houses with aging roofs (15+ years)
roof_material_install_year is recorded where a record exists and estimated elsewhere. Roofs 15+ years old are targets for roofing contractors, storm damage outreach and insurance inspection programs.
Request
Shell session
curl -X GET "https://api.houski.ca/properties?api_key=YOUR_API_KEY&city=calgary&country_abbreviation=ca&page=1&property_type_eq=House&province_abbreviation=ab&results_per_page=5&roof_material_install_year_lt=2011&select=address,roof_material,roof_material_install_year,construction_year,interior_sq_m,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('city', 'calgary');
    url.searchParams.set('country_abbreviation', 'ca');
    url.searchParams.set('page', '1');
    url.searchParams.set('property_type_eq', 'House');
    url.searchParams.set('province_abbreviation', 'ab');
    url.searchParams.set('results_per_page', '5');
    url.searchParams.set('roof_material_install_year_lt', '2011');
    url.searchParams.set('select', 'address,roof_material,roof_material_install_year,construction_year,interior_sq_m,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": 2.6,
  "data": [
    {
      "address": "24 Hoover Place SW",
      "construction_year": 1958,
      "estimate_list_price": 838816,
      "interior_sq_m": 95.03981,
      "property_id": "100a43bcbefcc557",
      "roof_material": "Asphalt",
      "roof_material_install_year": 2010
    },
    {
      "address": "63 Hogarth Crescent SW",
      "construction_year": 1958,
      "estimate_list_price": 687593,
      "interior_sq_m": 123.931625,
      "property_id": "10cc46ed3576b5c4",
      "roof_material": "Asphalt",
      "roof_material_install_year": 2010
    },
    {
      "address": "48 Haddock Road SW",
      "construction_year": 1958,
      "estimate_list_price": 583465,
      "interior_sq_m": 95.317726,
      "property_id": "115db63d076f3a98",
      "roof_material": "Asphalt",
      "roof_material_install_year": 2010
    },
    {
      "address": "35 Hanover Road SW",
      "construction_year": 1958,
      "estimate_list_price": 576140,
      "interior_sq_m": 99.03464,
      "property_id": "11aa7ac7d42d4e18",
      "roof_material": "Asphalt",
      "roof_material_install_year": 2010
    },
    {
      "address": "36 Hazelwood Crescent SW",
      "construction_year": 1958,
      "estimate_list_price": 558283,
      "interior_sq_m": 85.00558,
      "property_id": "122b2b7eb91fc179",
      "roof_material": "Asphalt",
      "roof_material_install_year": 2010
    }
  ],
  "error": "",
  "pagination": {
    "current_page": 1,
    "has_next_page": true,
    "has_previous_page": false,
    "page_total": 6789
  },
  "price_quote": false,
  "result_total": 33945,
  "time_ms": 29,
  "ui_info": {
    "city": "Calgary",
    "city_id": "6ec95b53075d062c",
    "city_link": "ca/ab/calgary",
    "city_slug": "calgary",
    "country": "Canada",
    "country_abbreviation": "CA",
    "country_abbreviation_id": "9ace2b6431b7f1be",
    "country_abbreviation_link": "ca",
    "country_slug": "canada",
    "province": "Alberta",
    "province_abbreviation": "AB",
    "province_abbreviation_id": "aae1f05a0f89d2c7",
    "province_abbreviation_link": "ca/ab",
    "province_slug": "alberta"
  }
}