!

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


Finance industry concentration
Gets properties in areas with a high percentage of residents working in finance and insurance industries.
Request
Shell session
curl -X GET "https://api.houski.ca/properties?api_key=YOUR_API_KEY&country_abbreviation=ca&demographic_employment_industries_finance_and_insurance_percent_gt=0.1&select=demographic_employment_industries_finance_and_insurance_percent,demographic_employment_industries_real_estate_and_rental_and_leasing_percent,interior_sq_m,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_employment_industries_finance_and_insurance_percent_gt', '0.1');
    url.searchParams.set('select', 'demographic_employment_industries_finance_and_insurance_percent,demographic_employment_industries_real_estate_and_rental_and_leasing_percent,interior_sq_m,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": 5.40000057220459,
  "data": [
    {
      "address": "1675 4 Avenue",
      "bathroom_full": 2,
      "bathroom_half": 0,
      "bedroom": 3,
      "demographic_employment_industries_finance_and_insurance_percent": 0.1111111119389534,
      "demographic_employment_industries_real_estate_and_rental_and_leasing_percent": 0.0,
      "den": 0,
      "interior_sq_m": 86.39979553222656,
      "property_id": "1000061296e4b4e5"
    },
    {
      "address": "2202 62 Forest Manor Road",
      "bathroom_full": 2,
      "bathroom_half": 0,
      "bedroom": 1,
      "demographic_employment_industries_finance_and_insurance_percent": 0.1406649649143219,
      "demographic_employment_industries_real_estate_and_rental_and_leasing_percent": 0.040920715779066086,
      "den": 1,
      "interior_sq_m": 74.22891235351562,
      "property_id": "10000a939ca95e87"
    },
    {
      "address": "20 2880 De Darlington Place",
      "bathroom_full": 2,
      "bathroom_half": 0,
      "bedroom": 3,
      "demographic_employment_industries_finance_and_insurance_percent": 0.12195122241973876,
      "demographic_employment_industries_real_estate_and_rental_and_leasing_percent": 0.0,
      "den": 0,
      "interior_sq_m": 112.2268295288086,
      "property_id": "10000f273ba648"
    },
    {
      "address": "1159 Bridgeport Road E",
      "bathroom_full": 1,
      "bathroom_half": 0,
      "bedroom": 2,
      "demographic_employment_industries_finance_and_insurance_percent": 0.1304347813129425,
      "demographic_employment_industries_real_estate_and_rental_and_leasing_percent": 0.0,
      "den": 0,
      "interior_sq_m": 102.09959411621094,
      "property_id": "1000121070d57f61"
    },
    {
      "address": "577 Wingrove Crescent",
      "bathroom_full": 2,
      "bathroom_half": 0,
      "bedroom": 3,
      "demographic_employment_industries_finance_and_insurance_percent": 0.1147540956735611,
      "demographic_employment_industries_real_estate_and_rental_and_leasing_percent": 0.032786883413791656,
      "den": 0,
      "interior_sq_m": 112.2268295288086,
      "property_id": "1000163bfa743f6"
    },
    {
      "address": "18 Griffen Place",
      "bathroom_full": 2,
      "bathroom_half": 1,
      "bedroom": 3,
      "demographic_employment_industries_finance_and_insurance_percent": 0.12765957415103912,
      "demographic_employment_industries_real_estate_and_rental_and_leasing_percent": 0.0,
      "den": 0,
      "interior_sq_m": 139.260498046875,
      "property_id": "10002659edbb02b9"
    }
  ],
  "error": "",
  "pagination": {
    "current_page": 1,
    "has_next_page": true,
    "has_previous_page": false,
    "page_total": 227588
  },
  "price_quote": false,
  "result_total": 1365528,
  "time_ms": 53,
  "ui_info": {
    "country": "Canada",
    "country_abbreviation": "CA",
    "country_abbreviation_id": "9ace2b6431b7f1be",
    "country_abbreviation_link": "ca",
    "country_slug": "canada"
  }
}