!

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


Get assessments for a community
In this example, we are retrieving all properties that have been assessed in the community of Riverbend in Calgary, for the year 2023. Setting 'filter_expand_match=all' ensures we only return properties that have assessment data. We are then limiting the results per each page to 3.
Request
Shell session
curl -X GET "https://api.houski.ca/properties?api_key=YOUR_API_KEY&city=calgary&community_eq=Riverbend&country_abbreviation=ca&expand=assessments&expand_assessment_year_eq=2023&filter_expand_match=all&province_abbreviation=ab&results_per_page=3"
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('city', 'calgary');
    url.searchParams.set('community_eq', 'Riverbend');
    url.searchParams.set('country_abbreviation', 'ca');
    url.searchParams.set('expand', 'assessments');
    url.searchParams.set('expand_assessment_year_eq', '2023');
    url.searchParams.set('filter_expand_match', 'all');
    url.searchParams.set('province_abbreviation', 'ab');
    url.searchParams.set('results_per_page', '3');

    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": 0.6299999952316284,
  "data": [
    {
      "address": "125 Riverview Court SE",
      "assessments": [
        {
          "expand_assessment_value": 564000,
          "expand_assessment_year": 2023,
          "property_id": "1003b80b5086a07"
        }
      ],
      "property_id": "1003b80b5086a07"
    },
    {
      "address": "61 Rivergreen Crescent SE",
      "assessments": [
        {
          "expand_assessment_value": 525500,
          "expand_assessment_year": 2023,
          "property_id": "1004738a9262a70d"
        }
      ],
      "property_id": "1004738a9262a70d"
    },
    {
      "address": "197 River Rock Place SE",
      "assessments": [
        {
          "expand_assessment_value": 518500,
          "expand_assessment_year": 2023,
          "property_id": "1016148ae2680e16"
        }
      ],
      "property_id": "1016148ae2680e16"
    }
  ],
  "error": "",
  "pagination": {
    "current_page": 1,
    "has_next_page": true,
    "has_previous_page": false,
    "page_total": 1195
  },
  "price_quote": false,
  "result_total": 3585,
  "time_ms": 275,
  "ui_info": {
    "city": "Calgary",
    "city_id": "6ec95b53075d062c",
    "city_link": "ca/ab/calgary",
    "city_slug": "calgary",
    "country": "Canada",
    "country_abbreviation": "CA",
    "country_abbreviation_id": "9ace2b6431b7f1be",
    "country_abbreviation_link": "ca",
    "country_slug": "canada",
    "province": "Alberta",
    "province_abbreviation": "AB",
    "province_abbreviation_id": "aae1f05a0f89d2c7",
    "province_abbreviation_link": "ca/ab",
    "province_slug": "alberta"
  }
}