!

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


Large houses
Gets houses with interior size greater than 200 square meters.
Request
Shell session
curl -X GET "https://api.houski.ca/properties?api_key=YOUR_API_KEY&country_abbreviation=ca&interior_sq_m_gt=200&interior_sq_m_lte=500&property_type_eq=House&select=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('interior_sq_m_gt', '200');
    url.searchParams.set('interior_sq_m_lte', '500');
    url.searchParams.set('property_type_eq', 'House');
    url.searchParams.set('select', '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.200000286102295,
  "data": [
    {
      "address": "70 Gallant Place",
      "bathroom_full": 4,
      "bathroom_half": 0,
      "bedroom": 4,
      "den": 0,
      "interior_sq_m": 278.6138916015625,
      "property_id": "10001e50d0fd8d30"
    },
    {
      "address": "13264 15 Avenue",
      "bathroom_full": 2,
      "bathroom_half": 0,
      "bedroom": 3,
      "den": 0,
      "interior_sq_m": 284.6548156738281,
      "property_id": "10002c1a33507f4"
    },
    {
      "address": "365 Alexander Crescent",
      "bathroom_full": 4,
      "bathroom_half": 0,
      "bedroom": 4,
      "den": 0,
      "interior_sq_m": 213.6752166748047,
      "property_id": "1000473f3d2c7c63"
    },
    {
      "address": "564 Farwell Crescent",
      "bathroom_full": 3,
      "bathroom_half": 1,
      "bedroom": 4,
      "den": 0,
      "interior_sq_m": 232.1627655029297,
      "property_id": "1000613a7db55d16"
    },
    {
      "address": "54 Kanata Crescent",
      "bathroom_full": 2,
      "bathroom_half": 1,
      "bedroom": 3,
      "den": 0,
      "interior_sq_m": 204.3849945068359,
      "property_id": "1000c1721a5b4901"
    },
    {
      "address": "1 Muir Drive",
      "bathroom_full": 2,
      "bathroom_half": 1,
      "bedroom": 4,
      "den": 0,
      "interior_sq_m": 208.93719482421875,
      "property_id": "1000d1f0b9d3ea09"
    }
  ],
  "error": "",
  "pagination": {
    "current_page": 1,
    "has_next_page": true,
    "has_previous_page": false,
    "page_total": 109737
  },
  "price_quote": false,
  "result_total": 658421,
  "time_ms": 71,
  "ui_info": {
    "country": "Canada",
    "country_abbreviation": "CA",
    "country_abbreviation_id": "9ace2b6431b7f1be",
    "country_abbreviation_link": "ca",
    "country_slug": "canada"
  }
}