!

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 large family households
Gets properties in areas with a high percentage of large family households with 5 or more people.
Request
Shell session
curl -X GET "https://api.houski.ca/properties?api_key=YOUR_API_KEY&country_abbreviation=ca&demographic_household_size_5_or_more_persons_percent_gt=0.20&select=demographic_household_size_5_or_more_persons_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_household_size_5_or_more_persons_percent_gt', '0.20');
    url.searchParams.set('select', 'demographic_household_size_5_or_more_persons_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": "16 Balloon Crescent",
      "bathroom_full": 5,
      "bathroom_half": 1,
      "bedroom": 5,
      "demographic_household_size_5_or_more_persons_percent": 0.5192307829856873,
      "den": 3,
      "interior_sq_m": 112.2268295288086,
      "property_id": "10000c1259c75058"
    },
    {
      "address": "70 Gallant Place",
      "bathroom_full": 4,
      "bathroom_half": 0,
      "bedroom": 4,
      "demographic_household_size_5_or_more_persons_percent": 0.24817518889904025,
      "den": 0,
      "interior_sq_m": 278.6138916015625,
      "property_id": "10001e50d0fd8d30"
    },
    {
      "address": "23 Silent Pond Crescent",
      "bathroom_full": 3,
      "bathroom_half": 0,
      "bedroom": 3,
      "demographic_household_size_5_or_more_persons_percent": 0.2647058963775635,
      "den": 1,
      "interior_sq_m": 139.260498046875,
      "property_id": "100029e8a35ad67"
    },
    {
      "address": "156 Agava Street",
      "bathroom_full": 2,
      "bathroom_half": 0,
      "bedroom": 3,
      "demographic_household_size_5_or_more_persons_percent": 0.2998678982257843,
      "den": 0,
      "interior_sq_m": 112.2268295288086,
      "property_id": "100038a9b8aed534"
    },
    {
      "address": "622 Highway Avenue",
      "bathroom_full": 2,
      "bathroom_half": 0,
      "bedroom": 3,
      "demographic_household_size_5_or_more_persons_percent": 0.22727273404598236,
      "den": 0,
      "interior_sq_m": 112.2268295288086,
      "property_id": "100044b2b8107ebb"
    },
    {
      "address": "1940 Book Road",
      "bathroom_full": 2,
      "bathroom_half": 0,
      "bedroom": 3,
      "demographic_household_size_5_or_more_persons_percent": 0.21875,
      "den": 0,
      "interior_sq_m": 112.2268295288086,
      "property_id": "100053c9fc991434"
    }
  ],
  "error": "",
  "pagination": {
    "current_page": 1,
    "has_next_page": true,
    "has_previous_page": false,
    "page_total": 146365
  },
  "price_quote": false,
  "result_total": 878187,
  "time_ms": 113,
  "ui_info": {
    "country": "Canada",
    "country_abbreviation": "CA",
    "country_abbreviation_id": "9ace2b6431b7f1be",
    "country_abbreviation_link": "ca",
    "country_slug": "canada"
  }
}