!

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


Luxury properties
Gets luxury houses in affluent neighborhoods.
Request
Shell session
curl -X GET "https://api.houski.ca/properties?api_key=YOUR_API_KEY&country_abbreviation=ca&demographic_income_150000_and_over_percent_gte=0.2&list_price_gte=1000000&property_type_eq=House&select=list_price,demographic_income_150000_and_over_percent,property_type,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_income_150000_and_over_percent_gte', '0.2');
    url.searchParams.set('list_price_gte', '1000000');
    url.searchParams.set('property_type_eq', 'House');
    url.searchParams.set('select', 'list_price,demographic_income_150000_and_over_percent,property_type,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": 6.000000953674316,
  "data": [
    {
      "address": "225 Glenrose Avenue",
      "bathroom_full": 2,
      "bathroom_half": 1,
      "bedroom": 4,
      "demographic_income_150000_and_over_percent": 0.29613733291625977,
      "den": 0,
      "interior_sq_m": 232.1627655029297,
      "list_price": 3499000,
      "property_id": "10020bd9e488465c",
      "property_type": "House"
    },
    {
      "address": "55 Edenvale Crescent",
      "bathroom_full": 6,
      "bathroom_half": 0,
      "bedroom": 5,
      "demographic_income_150000_and_over_percent": 0.23544304072856903,
      "den": 0,
      "interior_sq_m": 255.38833618164065,
      "list_price": 4195000,
      "property_id": "100d2d15da1bd0b7",
      "property_type": "House"
    },
    {
      "address": "2609 7 Avenue NW",
      "bathroom_full": 3,
      "bathroom_half": 1,
      "bedroom": 3,
      "demographic_income_150000_and_over_percent": 0.25,
      "den": 2,
      "interior_sq_m": 272.66815185546875,
      "list_price": 1895000,
      "property_id": "10177efba3636a6b",
      "property_type": "House"
    },
    {
      "address": "1459 Howes Crescent SW",
      "bathroom_full": 2,
      "bathroom_half": 1,
      "bedroom": 3,
      "demographic_income_150000_and_over_percent": 0.2067669183015823,
      "den": 0,
      "interior_sq_m": 278.706787109375,
      "list_price": 1059800,
      "property_id": "101b3100789d384a",
      "property_type": "House"
    },
    {
      "address": "19 1202 Street NW",
      "bathroom_full": 2,
      "bathroom_half": 0,
      "bedroom": 3,
      "demographic_income_150000_and_over_percent": 0.25609755516052246,
      "den": 0,
      "interior_sq_m": 112.2268295288086,
      "list_price": 1100000,
      "property_id": "1020f7c057e903e8",
      "property_type": "House"
    },
    {
      "address": "215 Patton Court SW",
      "bathroom_full": 5,
      "bathroom_half": 1,
      "bedroom": 5,
      "demographic_income_150000_and_over_percent": 0.2953367829322815,
      "den": 1,
      "interior_sq_m": 293.2924499511719,
      "list_price": 3750000,
      "property_id": "102c9f97f405db56",
      "property_type": "House"
    }
  ],
  "error": "",
  "pagination": {
    "current_page": 1,
    "has_next_page": true,
    "has_previous_page": false,
    "page_total": 1094
  },
  "price_quote": false,
  "result_total": 6562,
  "time_ms": 91,
  "ui_info": {
    "country": "Canada",
    "country_abbreviation": "CA",
    "country_abbreviation_id": "9ace2b6431b7f1be",
    "country_abbreviation_link": "ca",
    "country_slug": "canada"
  }
}