!

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


Remote worker suitable properties
Gets properties ideal for remote workers with good internet and space.
Request
Shell session
curl -X GET "https://api.houski.ca/properties?api_key=YOUR_API_KEY&country_abbreviation=ca&demographic_household_type_family_with_children_percent_gte=0.2&interior_sq_m_gte=100&score_internet_gt=8&score_quiet_gte=7&select=score_internet,score_quiet,interior_sq_m,demographic_household_type_family_with_children_percent,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_with_children_percent_gte', '0.2');
    url.searchParams.set('interior_sq_m_gte', '100');
    url.searchParams.set('score_internet_gt', '8');
    url.searchParams.set('score_quiet_gte', '7');
    url.searchParams.set('select', 'score_internet,score_quiet,interior_sq_m,demographic_household_type_family_with_children_percent,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": "113 Des Millesimes Rue",
      "bathroom_full": 2,
      "bathroom_half": 0,
      "bedroom": 3,
      "demographic_household_type_family_with_children_percent": 0.3660130798816681,
      "den": 0,
      "interior_sq_m": 112.2268295288086,
      "property_id": "100009fca69653c0",
      "score_internet": 10,
      "score_quiet": 10
    },
    {
      "address": "20 2880 De Darlington Place",
      "bathroom_full": 2,
      "bathroom_half": 0,
      "bedroom": 3,
      "demographic_household_type_family_with_children_percent": 0.2222222238779068,
      "den": 0,
      "interior_sq_m": 112.2268295288086,
      "property_id": "10000f273ba648",
      "score_internet": 10,
      "score_quiet": 10
    },
    {
      "address": "1165 Saintaubin Rue",
      "bathroom_full": 2,
      "bathroom_half": 0,
      "bedroom": 3,
      "demographic_household_type_family_with_children_percent": 0.3529411852359772,
      "den": 0,
      "interior_sq_m": 112.2268295288086,
      "property_id": "1000192535c67928",
      "score_internet": 10,
      "score_quiet": 10
    },
    {
      "address": "3 86 Meunier Rue E",
      "bathroom_full": 2,
      "bathroom_half": 0,
      "bedroom": 3,
      "demographic_household_type_family_with_children_percent": 0.2535211145877838,
      "den": 0,
      "interior_sq_m": 112.2268295288086,
      "property_id": "100020e4173d51c2",
      "score_internet": 10,
      "score_quiet": 10
    },
    {
      "address": "347 Regent Avenue W",
      "bathroom_full": 2,
      "bathroom_half": 0,
      "bedroom": 3,
      "demographic_household_type_family_with_children_percent": 0.25641027092933655,
      "den": 0,
      "interior_sq_m": 112.2268295288086,
      "property_id": "100032a1f7c76ddb",
      "score_internet": 10,
      "score_quiet": 10
    },
    {
      "address": "7050 Rue Monnier",
      "bathroom_full": 2,
      "bathroom_half": 0,
      "bedroom": 4,
      "demographic_household_type_family_with_children_percent": 0.4000000059604645,
      "den": 0,
      "interior_sq_m": 112.2268295288086,
      "property_id": "10004340174625e7",
      "score_internet": 10,
      "score_quiet": 10
    }
  ],
  "error": "",
  "pagination": {
    "current_page": 1,
    "has_next_page": true,
    "has_previous_page": false,
    "page_total": 228628
  },
  "price_quote": false,
  "result_total": 1371766,
  "time_ms": 380,
  "ui_info": {
    "country": "Canada",
    "country_abbreviation": "CA",
    "country_abbreviation_id": "9ace2b6431b7f1be",
    "country_abbreviation_link": "ca",
    "country_slug": "canada"
  }
}