!

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


Areas with high master's degree holders
Gets properties in areas with a high percentage of master's degree holders.
Request
Shell session
curl -X GET "https://api.houski.ca/properties?api_key=YOUR_API_KEY&country_abbreviation=ca&demographic_education_level_masters_degree_percent_gt=0.10&select=demographic_education_level_masters_degree_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_level_masters_degree_percent_gt', '0.10');
    url.searchParams.set('select', 'demographic_education_level_masters_degree_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": "1 107 12 Fourth Avenue",
      "bathroom_full": 2,
      "bathroom_half": 0,
      "bedroom": 3,
      "demographic_education_level_masters_degree_percent": 0.16447368264198303,
      "den": 0,
      "interior_sq_m": 112.2268295288086,
      "property_id": "1000012a72a63be7"
    },
    {
      "address": "41 2202 Rosemont Boulevard",
      "bathroom_full": 2,
      "bathroom_half": 0,
      "bedroom": 3,
      "demographic_education_level_masters_degree_percent": 0.17489711940288544,
      "den": 0,
      "interior_sq_m": 112.2268295288086,
      "property_id": "10000874d2ccb6ea"
    },
    {
      "address": "2202 62 Forest Manor Road",
      "bathroom_full": 2,
      "bathroom_half": 0,
      "bedroom": 1,
      "demographic_education_level_masters_degree_percent": 0.1854304671287537,
      "den": 1,
      "interior_sq_m": 74.22891235351562,
      "property_id": "10000a939ca95e87"
    },
    {
      "address": "313 285 Hymus Boulevard",
      "bathroom_full": 2,
      "bathroom_half": 0,
      "bedroom": 3,
      "demographic_education_level_masters_degree_percent": 0.1485714316368103,
      "den": 0,
      "interior_sq_m": 112.2268295288086,
      "property_id": "10000bf6366face5"
    },
    {
      "address": "16 Balloon Crescent",
      "bathroom_full": 5,
      "bathroom_half": 1,
      "bedroom": 5,
      "demographic_education_level_masters_degree_percent": 0.14465409517288208,
      "den": 3,
      "interior_sq_m": 112.2268295288086,
      "property_id": "10000c1259c75058"
    },
    {
      "address": "20 2880 De Darlington Place",
      "bathroom_full": 2,
      "bathroom_half": 0,
      "bedroom": 3,
      "demographic_education_level_masters_degree_percent": 0.13333334028720856,
      "den": 0,
      "interior_sq_m": 112.2268295288086,
      "property_id": "10000f273ba648"
    }
  ],
  "error": "",
  "pagination": {
    "current_page": 1,
    "has_next_page": true,
    "has_previous_page": false,
    "page_total": 961703
  },
  "price_quote": false,
  "result_total": 5770217,
  "time_ms": 123,
  "ui_info": {
    "country": "Canada",
    "country_abbreviation": "CA",
    "country_abbreviation_id": "9ace2b6431b7f1be",
    "country_abbreviation_link": "ca",
    "country_slug": "canada"
  }
}