!

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


Properties rented within 60 days
Gets properties that were rented within 60 days of listing.
Request
Shell session
curl -X GET "https://api.houski.ca/properties?api_key=YOUR_API_KEY&country_abbreviation=ca&estimate_days_on_market_until_rented_lte=60&select=estimate_days_on_market_until_rented,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('estimate_days_on_market_until_rented_lte', '60');
    url.searchParams.set('select', 'estimate_days_on_market_until_rented,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,
      "den": 0,
      "interior_sq_m": 112.31973266601562,
      "property_id": "100000674098d664"
    },
    {
      "address": "19 9750 McNaught Road",
      "bathroom_full": 3,
      "bathroom_half": 0,
      "bedroom": 3,
      "den": 0,
      "interior_sq_m": 177.2575225830078,
      "property_id": "10000075ad647a6d"
    },
    {
      "address": "1 107 12 Fourth Avenue",
      "bathroom_full": 2,
      "bathroom_half": 0,
      "bedroom": 3,
      "den": 0,
      "interior_sq_m": 112.31973266601562,
      "property_id": "1000012a72a63be7"
    },
    {
      "address": "4140 Adam Rue",
      "bathroom_full": 2,
      "bathroom_half": 0,
      "bedroom": 3,
      "den": 0,
      "interior_sq_m": 112.31973266601562,
      "property_id": "1000019f9b0cf9c8"
    },
    {
      "address": "1132 De Lelite Rue",
      "bathroom_full": 2,
      "bathroom_half": 0,
      "bedroom": 3,
      "den": 0,
      "interior_sq_m": 112.31973266601562,
      "property_id": "1000033f08439f97"
    },
    {
      "address": "1675 4 Avenue",
      "bathroom_full": 2,
      "bathroom_half": 0,
      "bedroom": 3,
      "den": 0,
      "interior_sq_m": 86.39979553222656,
      "property_id": "1000061296e4b4e5"
    }
  ],
  "error": "",
  "pagination": {
    "current_page": 1,
    "has_next_page": true,
    "has_previous_page": false,
    "page_total": 3084284
  },
  "price_quote": false,
  "result_total": 18505702,
  "time_ms": 50,
  "ui_info": {
    "country": "Canada",
    "country_abbreviation": "CA",
    "country_abbreviation_id": "9ace2b6431b7f1be",
    "country_abbreviation_link": "ca",
    "country_slug": "canada"
  }
}