!

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


Couples without children areas
Gets properties in areas with high percentage of couples without children.
Request
Shell session
curl -X GET "https://api.houski.ca/properties?api_key=YOUR_API_KEY&country_abbreviation=ca&demographic_household_type_family_without_children_percent_gt=0.30&select=demographic_household_type_family_without_children_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_type_family_without_children_percent_gt', '0.30');
    url.searchParams.set('select', 'demographic_household_type_family_without_children_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_household_type_family_without_children_percent": 0.35087719559669495,
      "den": 0,
      "interior_sq_m": 112.2268295288086,
      "property_id": "1000012a72a63be7"
    },
    {
      "address": "113 Des Millesimes Rue",
      "bathroom_full": 2,
      "bathroom_half": 0,
      "bedroom": 3,
      "demographic_household_type_family_without_children_percent": 0.3202614486217499,
      "den": 0,
      "interior_sq_m": 112.2268295288086,
      "property_id": "100009fca69653c0"
    },
    {
      "address": "5313 Township Road 522",
      "bathroom_full": 2,
      "bathroom_half": 0,
      "bedroom": 3,
      "demographic_household_type_family_without_children_percent": 0.4390243887901306,
      "den": 0,
      "interior_sq_m": 112.2268295288086,
      "property_id": "10000ac3e3c04e78"
    },
    {
      "address": "595 352 Route",
      "bathroom_full": 2,
      "bathroom_half": 0,
      "bedroom": 2,
      "demographic_household_type_family_without_children_percent": 0.35849055647850037,
      "den": 0,
      "interior_sq_m": 112.2268295288086,
      "property_id": "10000b85beec2abb"
    },
    {
      "address": "1 410 Pine Grove Avenue",
      "bathroom_full": 2,
      "bathroom_half": 0,
      "bedroom": 3,
      "demographic_household_type_family_without_children_percent": 0.3214285671710968,
      "den": 0,
      "interior_sq_m": 112.2268295288086,
      "property_id": "10000e5c7395578a"
    },
    {
      "address": "31 Hawkside Park NW",
      "bathroom_full": 2,
      "bathroom_half": 1,
      "bedroom": 1,
      "demographic_household_type_family_without_children_percent": 0.3513513505458832,
      "den": 1,
      "interior_sq_m": 112.87625122070312,
      "property_id": "10000f97f5cb7b9f"
    }
  ],
  "error": "",
  "pagination": {
    "current_page": 1,
    "has_next_page": true,
    "has_previous_page": false,
    "page_total": 1159842
  },
  "price_quote": false,
  "result_total": 6959050,
  "time_ms": 4033,
  "ui_info": {
    "country": "Canada",
    "country_abbreviation": "CA",
    "country_abbreviation_id": "9ace2b6431b7f1be",
    "country_abbreviation_link": "ca",
    "country_slug": "canada"
  }
}