!

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


Teaching education areas
Gets properties in areas with high percentage of population with teaching degrees.
Request
Shell session
curl -X GET "https://api.houski.ca/properties?api_key=YOUR_API_KEY&country_abbreviation=ca&demographic_education_degree_teaching_percent_gt=0.1&select=demographic_education_degree_teaching_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_education_degree_teaching_percent_gt', '0.1');
    url.searchParams.set('select', 'demographic_education_degree_teaching_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": 4.800000190734863,
  "data": [
    {
      "address": "1675 4 Avenue",
      "bathroom_full": 2,
      "bathroom_half": 0,
      "bedroom": 3,
      "demographic_education_degree_teaching_percent": 0.17073170840740204,
      "den": 0,
      "interior_sq_m": 86.39979553222656,
      "property_id": "1000061296e4b4e5"
    },
    {
      "address": "24 Black Duck Street",
      "bathroom_full": 2,
      "bathroom_half": 0,
      "bedroom": 3,
      "demographic_education_degree_teaching_percent": 0.1071428582072258,
      "den": 0,
      "interior_sq_m": 112.2268295288086,
      "property_id": "10000a145755d43d"
    },
    {
      "address": "654 Avenue 2Ieme",
      "bathroom_full": 2,
      "bathroom_half": 0,
      "bedroom": 3,
      "demographic_education_degree_teaching_percent": 0.125,
      "den": 0,
      "interior_sq_m": 112.2268295288086,
      "property_id": "10001566d02aa8b5"
    },
    {
      "address": "504 35 Walmer Road",
      "bathroom_full": 4,
      "bathroom_half": 0,
      "bedroom": 3,
      "demographic_education_degree_teaching_percent": 0.10101009905338287,
      "den": 1,
      "interior_sq_m": 185.7116241455078,
      "property_id": "100016a8f4f4f1a9"
    },
    {
      "address": "415 475 Lancaster Drive",
      "bathroom_full": 2,
      "bathroom_half": 0,
      "bedroom": 2,
      "demographic_education_degree_teaching_percent": 0.14124293625354767,
      "den": 2,
      "interior_sq_m": 103.40022277832033,
      "property_id": "100016c94ed5b43"
    },
    {
      "address": "18 Griffen Place",
      "bathroom_full": 3,
      "bathroom_half": 1,
      "bedroom": 3,
      "demographic_education_degree_teaching_percent": 0.1111111119389534,
      "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": 542044
  },
  "price_quote": false,
  "result_total": 3252263,
  "time_ms": 73,
  "ui_info": {
    "country": "Canada",
    "country_abbreviation": "CA",
    "country_abbreviation_id": "9ace2b6431b7f1be",
    "country_abbreviation_link": "ca",
    "country_slug": "canada"
  }
}