!

Recipes

This page contains examples of common use cases for the Houski API.

You can copy and paste the code examples into your own application.

Programming language

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

Choose a recipe


Renovation opportunity properties
Gets properties needing renovation that may be priced below market value.
Request
Shell session
curl -X GET "https://api.houski.ca/properties?api_key=YOUR_API_KEY&country_abbreviation=ca&demographic_household_type_family_with_children_percent_gte=0.2&interior_sq_m_gte=100&list_price_vs_estimate_lte=0&need_roof_repair_eq=true&select=need_roof_repair,list_price_vs_estimate,interior_sq_m,demographic_household_type_family_with_children_percent,bedroom,den,bathroom_full,bathroom_half"
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('demographic_household_type_family_with_children_percent_gte', '0.2');
    url.searchParams.set('interior_sq_m_gte', '100');
    url.searchParams.set('list_price_vs_estimate_lte', '0');
    url.searchParams.set('need_roof_repair_eq', 'true');
    url.searchParams.set('select', 'need_roof_repair,list_price_vs_estimate,interior_sq_m,demographic_household_type_family_with_children_percent,bedroom,den,bathroom_full,bathroom_half');

    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": 6.000000953674316,
  "data": [
    {
      "address": "170 King Street",
      "bathroom_full": 2,
      "bathroom_half": 1,
      "bedroom": 4,
      "demographic_household_type_family_with_children_percent": 0.3571428656578064,
      "den": 0,
      "interior_sq_m": 112.2268295288086,
      "list_price_vs_estimate": -151996,
      "need_roof_repair": true,
      "property_id": "10555021df99c28c"
    },
    {
      "address": "2 1170 Lansdowne Drive",
      "bathroom_full": 1,
      "bathroom_half": 0,
      "bedroom": 3,
      "demographic_household_type_family_with_children_percent": 0.3499999940395355,
      "den": 0,
      "interior_sq_m": 122.90969848632812,
      "list_price_vs_estimate": -3837,
      "need_roof_repair": true,
      "property_id": "105f6fb84aceccf7"
    },
    {
      "address": "57 Manvers Drive",
      "bathroom_full": 1,
      "bathroom_half": 0,
      "bedroom": 3,
      "demographic_household_type_family_with_children_percent": 0.375,
      "den": 0,
      "interior_sq_m": 116.08138275146484,
      "list_price_vs_estimate": -18439,
      "need_roof_repair": true,
      "property_id": "107eda7755eef905"
    },
    {
      "address": "9915 100 Avenue",
      "bathroom_full": 2,
      "bathroom_half": 0,
      "bedroom": 4,
      "demographic_household_type_family_with_children_percent": 0.3214285671710968,
      "den": 0,
      "interior_sq_m": 133.77926635742188,
      "list_price_vs_estimate": -67381,
      "need_roof_repair": true,
      "property_id": "1143f8c2e071533"
    },
    {
      "address": "115 10091 156 Street",
      "bathroom_full": 2,
      "bathroom_half": 0,
      "bedroom": 3,
      "demographic_household_type_family_with_children_percent": 0.4606741666793823,
      "den": 0,
      "interior_sq_m": 143.99851989746094,
      "list_price_vs_estimate": -39584,
      "need_roof_repair": true,
      "property_id": "116899dc79a5672f"
    },
    {
      "address": "1835 Hycrest Place",
      "bathroom_full": 2,
      "bathroom_half": 0,
      "bedroom": 4,
      "demographic_household_type_family_with_children_percent": 0.20930232107639313,
      "den": 0,
      "interior_sq_m": 226.68153381347656,
      "list_price_vs_estimate": -76849,
      "need_roof_repair": true,
      "property_id": "11a4f86092a212be"
    }
  ],
  "error": "",
  "pagination": {
    "current_page": 1,
    "has_next_page": true,
    "has_previous_page": false,
    "page_total": 125
  },
  "price_quote": false,
  "result_total": 749,
  "time_ms": 80,
  "ui_info": {
    "country": "Canada",
    "country_abbreviation": "CA",
    "country_abbreviation_id": "9ace2b6431b7f1be",
    "country_abbreviation_link": "ca",
    "country_slug": "canada"
  }
}