!

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


Business/finance occupation areas
Gets areas with high percentage of population in business/finance occupations.
Request
Shell session
curl -X GET "https://api.houski.ca/properties?api_key=YOUR_API_KEY&country_abbreviation=ca&demographic_employment_occupations_business_finance_and_administration_occupations_percent_gt=0.15&select=demographic_employment_occupations_business_finance_and_administration_occupations_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_employment_occupations_business_finance_and_administration_occupations_percent_gt', '0.15');
    url.searchParams.set('select', 'demographic_employment_occupations_business_finance_and_administration_occupations_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": "1167 Notredame Rue",
      "bathroom_full": 2,
      "bathroom_half": 0,
      "bedroom": 3,
      "demographic_employment_occupations_business_finance_and_administration_occupations_percent": 0.1923076957464218,
      "den": 0,
      "interior_sq_m": 112.2268295288086,
      "property_id": "100000674098d664"
    },
    {
      "address": "4140 Adam Rue",
      "bathroom_full": 2,
      "bathroom_half": 0,
      "bedroom": 3,
      "demographic_employment_occupations_business_finance_and_administration_occupations_percent": 0.1587301641702652,
      "den": 0,
      "interior_sq_m": 112.2268295288086,
      "property_id": "1000019f9b0cf9c8"
    },
    {
      "address": "1132 De Lelite Rue",
      "bathroom_full": 2,
      "bathroom_half": 0,
      "bedroom": 3,
      "demographic_employment_occupations_business_finance_and_administration_occupations_percent": 0.2184873968362808,
      "den": 0,
      "interior_sq_m": 112.2268295288086,
      "property_id": "1000033f08439f97"
    },
    {
      "address": "1675 4 Avenue",
      "bathroom_full": 2,
      "bathroom_half": 0,
      "bedroom": 3,
      "demographic_employment_occupations_business_finance_and_administration_occupations_percent": 0.15789473056793213,
      "den": 0,
      "interior_sq_m": 86.39979553222656,
      "property_id": "1000061296e4b4e5"
    },
    {
      "address": "103 1780 Tougas Rue",
      "bathroom_full": 2,
      "bathroom_half": 0,
      "bedroom": 3,
      "demographic_employment_occupations_business_finance_and_administration_occupations_percent": 0.21739129722118375,
      "den": 0,
      "interior_sq_m": 112.2268295288086,
      "property_id": "10000651ea96e24c"
    },
    {
      "address": "150 Canada Ch",
      "bathroom_full": 2,
      "bathroom_half": 0,
      "bedroom": 3,
      "demographic_employment_occupations_business_finance_and_administration_occupations_percent": 0.17142857611179352,
      "den": 0,
      "interior_sq_m": 112.2268295288086,
      "property_id": "1000093e6d27e587"
    }
  ],
  "error": "",
  "pagination": {
    "current_page": 1,
    "has_next_page": true,
    "has_previous_page": false,
    "page_total": 2060959
  },
  "price_quote": false,
  "result_total": 12365750,
  "time_ms": 265,
  "ui_info": {
    "country": "Canada",
    "country_abbreviation": "CA",
    "country_abbreviation_id": "9ace2b6431b7f1be",
    "country_abbreviation_link": "ca",
    "country_slug": "canada"
  }
}