!

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 with high walkability
Gets properties with walkability scores greater than 80 in Vancouver, BC.
Request
Shell session
curl -X GET "https://api.houski.ca/properties?api_key=YOUR_API_KEY&country_abbreviation=ca&property_type_eq=House&score_walkability_gt=7&select=score_walkability,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('property_type_eq', 'House');
    url.searchParams.set('score_walkability_gt', '7');
    url.searchParams.set('select', 'score_walkability,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": "103 1780 Tougas Rue",
      "bathroom_full": 2,
      "bathroom_half": 0,
      "bedroom": 3,
      "den": 0,
      "interior_sq_m": 112.2268295288086,
      "property_id": "10000651ea96e24c",
      "score_walkability": 10
    },
    {
      "address": "313 285 Hymus Boulevard",
      "bathroom_full": 2,
      "bathroom_half": 0,
      "bedroom": 3,
      "den": 0,
      "interior_sq_m": 112.2268295288086,
      "property_id": "10000bf6366face5",
      "score_walkability": 10
    },
    {
      "address": "57 Ellen Street W",
      "bathroom_full": 2,
      "bathroom_half": 0,
      "bedroom": 3,
      "den": 0,
      "interior_sq_m": 112.2268295288086,
      "property_id": "10001a21157e0bf3",
      "score_walkability": 10
    },
    {
      "address": "206 Wychwood Park",
      "bathroom_full": 2,
      "bathroom_half": 2,
      "bedroom": 4,
      "den": 0,
      "interior_sq_m": 183.66778564453125,
      "property_id": "10001c0a409cb394",
      "score_walkability": 10
    },
    {
      "address": "6 2132 Galtcrescent Rue",
      "bathroom_full": 2,
      "bathroom_half": 0,
      "bedroom": 3,
      "den": 0,
      "interior_sq_m": 112.2268295288086,
      "property_id": "100020e698a2fb97",
      "score_walkability": 10
    },
    {
      "address": "434 25 Westhill Drive",
      "bathroom_full": 0,
      "bathroom_half": 0,
      "bedroom": 0,
      "den": 0,
      "interior_sq_m": 112.2268295288086,
      "property_id": "10002c548c70372e",
      "score_walkability": 10
    }
  ],
  "error": "",
  "pagination": {
    "current_page": 1,
    "has_next_page": true,
    "has_previous_page": false,
    "page_total": 368680
  },
  "price_quote": false,
  "result_total": 2212079,
  "time_ms": 124,
  "ui_info": {
    "country": "Canada",
    "country_abbreviation": "CA",
    "country_abbreviation_id": "9ace2b6431b7f1be",
    "country_abbreviation_link": "ca",
    "country_slug": "canada"
  }
}