!

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


Medical professionals in high-income areas
Gets concentration of medical professionals in high-income areas of Ottawa.
Request
Shell session
curl -X GET "https://api.houski.ca/properties?api_key=YOUR_API_KEY&city=ottawa&country_abbreviation=ca&demographic_education_level_degree_in_medicine_dentistry_veterinary_medicine_or_optometry_percent_gt=0.1&demographic_employment_industries_health_care_and_social_assistance_percent_gte=0.1&demographic_income_150000_and_over_percent_gte=0.1&province_abbreviation=on&select=demographic_education_level_degree_in_medicine_dentistry_veterinary_medicine_or_optometry_percent,demographic_income_150000_and_over_percent,demographic_employment_industries_health_care_and_social_assistance_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('city', 'ottawa');
    url.searchParams.set('country_abbreviation', 'ca');
    url.searchParams.set('demographic_education_level_degree_in_medicine_dentistry_veterinary_medicine_or_optometry_percent_gt', '0.1');
    url.searchParams.set('demographic_employment_industries_health_care_and_social_assistance_percent_gte', '0.1');
    url.searchParams.set('demographic_income_150000_and_over_percent_gte', '0.1');
    url.searchParams.set('province_abbreviation', 'on');
    url.searchParams.set('select', 'demographic_education_level_degree_in_medicine_dentistry_veterinary_medicine_or_optometry_percent,demographic_income_150000_and_over_percent,demographic_employment_industries_health_care_and_social_assistance_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": 6.000000953674316,
  "data": [
    {
      "address": "44 Aleutian Road",
      "bathroom_full": 2,
      "bathroom_half": 1,
      "bedroom": 4,
      "demographic_education_level_degree_in_medicine_dentistry_veterinary_medicine_or_optometry_percent": 0.10638298094272614,
      "demographic_employment_industries_health_care_and_social_assistance_percent": 0.19117647409439087,
      "demographic_income_150000_and_over_percent": 0.2085561454296112,
      "den": 0,
      "interior_sq_m": 112.2268295288086,
      "property_id": "100233ee18bf009c"
    },
    {
      "address": "6 Aleutian Road",
      "bathroom_full": 2,
      "bathroom_half": 1,
      "bedroom": 4,
      "demographic_education_level_degree_in_medicine_dentistry_veterinary_medicine_or_optometry_percent": 0.10638298094272614,
      "demographic_employment_industries_health_care_and_social_assistance_percent": 0.19117647409439087,
      "demographic_income_150000_and_over_percent": 0.2085561454296112,
      "den": 0,
      "interior_sq_m": 112.2268295288086,
      "property_id": "1104a24293627286"
    },
    {
      "address": "10 Aleutian Road",
      "bathroom_full": 2,
      "bathroom_half": 1,
      "bedroom": 4,
      "demographic_education_level_degree_in_medicine_dentistry_veterinary_medicine_or_optometry_percent": 0.10638298094272614,
      "demographic_employment_industries_health_care_and_social_assistance_percent": 0.19117647409439087,
      "demographic_income_150000_and_over_percent": 0.2085561454296112,
      "den": 0,
      "interior_sq_m": 112.2268295288086,
      "property_id": "1285e8ca14093070"
    },
    {
      "address": "53 Okanagan Drive",
      "bathroom_full": 3,
      "bathroom_half": 1,
      "bedroom": 4,
      "demographic_education_level_degree_in_medicine_dentistry_veterinary_medicine_or_optometry_percent": 0.10638298094272614,
      "demographic_employment_industries_health_care_and_social_assistance_percent": 0.19117647409439087,
      "demographic_income_150000_and_over_percent": 0.2085561454296112,
      "den": 0,
      "interior_sq_m": 112.2268295288086,
      "property_id": "1442ad4695f14c58"
    },
    {
      "address": "7 Chinook Crescent",
      "bathroom_full": 2,
      "bathroom_half": 1,
      "bedroom": 4,
      "demographic_education_level_degree_in_medicine_dentistry_veterinary_medicine_or_optometry_percent": 0.10638298094272614,
      "demographic_employment_industries_health_care_and_social_assistance_percent": 0.19117647409439087,
      "demographic_income_150000_and_over_percent": 0.2085561454296112,
      "den": 0,
      "interior_sq_m": 112.2268295288086,
      "property_id": "17a9b6ef5c2af6fa"
    },
    {
      "address": "20 Qualicum Street",
      "bathroom_full": 3,
      "bathroom_half": 1,
      "bedroom": 4,
      "demographic_education_level_degree_in_medicine_dentistry_veterinary_medicine_or_optometry_percent": 0.10638298094272614,
      "demographic_employment_industries_health_care_and_social_assistance_percent": 0.19117647409439087,
      "demographic_income_150000_and_over_percent": 0.2085561454296112,
      "den": 0,
      "interior_sq_m": 112.2268295288086,
      "property_id": "183a55794b4e505a"
    }
  ],
  "error": "",
  "pagination": {
    "current_page": 1,
    "has_next_page": true,
    "has_previous_page": false,
    "page_total": 38
  },
  "price_quote": false,
  "result_total": 224,
  "time_ms": 293,
  "ui_info": {
    "city": "Ottawa",
    "city_id": "6c31d224cd6d3ad4",
    "city_link": "ca/on/ottawa",
    "city_slug": "ottawa",
    "country": "Canada",
    "country_abbreviation": "CA",
    "country_abbreviation_id": "9ace2b6431b7f1be",
    "country_abbreviation_link": "ca",
    "country_slug": "canada",
    "province": "Ontario",
    "province_abbreviation": "ON",
    "province_abbreviation_id": "146699ee774499d3",
    "province_abbreviation_link": "ca/on",
    "province_slug": "ontario"
  }
}