!

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


Outdoor living properties
Gets houses with backyards in areas with high nature scores.
Request
Shell session
curl -X GET "https://api.houski.ca/properties?api_key=YOUR_API_KEY&country_abbreviation=ca&has_backyard_eq=true&property_type_eq=House&score_nature_gte=7&select=has_backyard,score_nature,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('has_backyard_eq', 'true');
    url.searchParams.set('property_type_eq', 'House');
    url.searchParams.set('score_nature_gte', '7');
    url.searchParams.set('select', 'has_backyard,score_nature,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": 5.40000057220459,
  "data": [
    {
      "address": "16 Balloon Crescent",
      "bathroom_full": 5,
      "bathroom_half": 1,
      "bedroom": 5,
      "den": 3,
      "has_backyard": true,
      "interior_sq_m": 112.2268295288086,
      "property_id": "10000c1259c75058",
      "score_nature": 10
    },
    {
      "address": "415 475 Lancaster Drive",
      "bathroom_full": 2,
      "bathroom_half": 0,
      "bedroom": 2,
      "den": 2,
      "has_backyard": true,
      "interior_sq_m": 103.40022277832033,
      "property_id": "100016c94ed5b43",
      "score_nature": 10
    },
    {
      "address": "206 Wychwood Park",
      "bathroom_full": 2,
      "bathroom_half": 2,
      "bedroom": 4,
      "den": 0,
      "has_backyard": true,
      "interior_sq_m": 183.66778564453125,
      "property_id": "10001c0a409cb394",
      "score_nature": 10
    },
    {
      "address": "18 Griffen Place",
      "bathroom_full": 2,
      "bathroom_half": 1,
      "bedroom": 3,
      "den": 0,
      "has_backyard": true,
      "interior_sq_m": 139.260498046875,
      "property_id": "10002659edbb02b9",
      "score_nature": 10
    },
    {
      "address": "365 Alexander Crescent",
      "bathroom_full": 4,
      "bathroom_half": 0,
      "bedroom": 4,
      "den": 0,
      "has_backyard": true,
      "interior_sq_m": 213.6752166748047,
      "property_id": "1000473f3d2c7c63",
      "score_nature": 10
    },
    {
      "address": "2419 Lomond Place",
      "bathroom_full": 2,
      "bathroom_half": 0,
      "bedroom": 3,
      "den": 0,
      "has_backyard": true,
      "interior_sq_m": 144.9275360107422,
      "property_id": "10004d296b85e8d6",
      "score_nature": 10
    }
  ],
  "error": "",
  "pagination": {
    "current_page": 1,
    "has_next_page": true,
    "has_previous_page": false,
    "page_total": 244625
  },
  "price_quote": false,
  "result_total": 1467745,
  "time_ms": 276,
  "ui_info": {
    "country": "Canada",
    "country_abbreviation": "CA",
    "country_abbreviation_id": "9ace2b6431b7f1be",
    "country_abbreviation_link": "ca",
    "country_slug": "canada"
  }
}