!

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 permits, assessments and listings inside a polygon
In this example, we are retrieving properties that have permit data inside a geographic polygon. Properties with permit, assessment, or listing data will be returned when using the filter_expand_match_any parameter.
Request
Shell session
curl -X GET "https://api.houski.ca/properties?api_key=YOUR_API_KEY&country_abbreviation=ca&expand=permits,assessments,listings&filter_expand_match=any&polygon=51.0447_-114.0719,51.0544_-114.0719,51.0544_-114.0856,51.0452_-114.0856&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('country_abbreviation', 'ca');
    url.searchParams.set('expand', 'permits,assessments,listings');
    url.searchParams.set('filter_expand_match', 'any');
    url.searchParams.set('polygon', '51.0447_-114.0719,51.0544_-114.0719,51.0544_-114.0856,51.0452_-114.0856');
    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.9700000286102296,
  "data": [
    {
      "address": "2101 888 4 Avenue SW",
      "assessments": [
        {
          "expand_assessment_value": 1030000,
          "expand_assessment_year": 2011,
          "property_id": "100a3285ac5dd6b1"
        },
        {
          "expand_assessment_value": 1020000,
          "expand_assessment_year": 2012,
          "property_id": "100a3285ac5dd6b1"
        },
        {
          "expand_assessment_value": 1040000,
          "expand_assessment_year": 2013,
          "property_id": "100a3285ac5dd6b1"
        },
        {
          "expand_assessment_value": 1240000,
          "expand_assessment_year": 2015,
          "property_id": "100a3285ac5dd6b1"
        },
        {
          "expand_assessment_value": 1190000,
          "expand_assessment_year": 2016,
          "property_id": "100a3285ac5dd6b1"
        },
        {
          "expand_assessment_value": 1090000,
          "expand_assessment_year": 2017,
          "property_id": "100a3285ac5dd6b1"
        },
        {
          "expand_assessment_value": 992000,
          "expand_assessment_year": 2018,
          "property_id": "100a3285ac5dd6b1"
        },
        {
          "expand_assessment_value": 840000,
          "expand_assessment_year": 2019,
          "property_id": "100a3285ac5dd6b1"
        },
        {
          "expand_assessment_value": 781000,
          "expand_assessment_year": 2020,
          "property_id": "100a3285ac5dd6b1"
        },
        {
          "expand_assessment_value": 766500,
          "expand_assessment_year": 2021,
          "property_id": "100a3285ac5dd6b1"
        },
        {
          "expand_assessment_value": 750000,
          "expand_assessment_year": 2022,
          "property_id": "100a3285ac5dd6b1"
        },
        {
          "expand_assessment_value": 936500,
          "expand_assessment_year": 2023,
          "property_id": "100a3285ac5dd6b1"
        },
        {
          "expand_assessment_value": 1160000,
          "expand_assessment_year": 2024,
          "property_id": "100a3285ac5dd6b1"
        }
      ],
      "property_id": "100a3285ac5dd6b1"
    },
    {
      "address": "1702 909 7 Avenue SW",
      "assessments": [
        {
          "expand_assessment_value": 75000,
          "expand_assessment_year": 2005,
          "property_id": "10182bd1da061c7e"
        },
        {
          "expand_assessment_value": 66000,
          "expand_assessment_year": 2006,
          "property_id": "10182bd1da061c7e"
        },
        {
          "expand_assessment_value": 104500,
          "expand_assessment_year": 2007,
          "property_id": "10182bd1da061c7e"
        },
        {
          "expand_assessment_value": 108500,
          "expand_assessment_year": 2008,
          "property_id": "10182bd1da061c7e"
        },
        {
          "expand_assessment_value": 123500,
          "expand_assessment_year": 2009,
          "property_id": "10182bd1da061c7e"
        },
        {
          "expand_assessment_value": 103000,
          "expand_assessment_year": 2010,
          "property_id": "10182bd1da061c7e"
        },
        {
          "expand_assessment_value": 105500,
          "expand_assessment_year": 2011,
          "property_id": "10182bd1da061c7e"
        },
        {
          "expand_assessment_value": 106500,
          "expand_assessment_year": 2012,
          "property_id": "10182bd1da061c7e"
        },
        {
          "expand_assessment_value": 107500,
          "expand_assessment_year": 2013,
          "property_id": "10182bd1da061c7e"
        },
        {
          "expand_assessment_value": 111000,
          "expand_assessment_year": 2014,
          "property_id": "10182bd1da061c7e"
        },
        {
          "expand_assessment_value": 117500,
          "expand_assessment_year": 2015,
          "property_id": "10182bd1da061c7e"
        },
        {
          "expand_assessment_value": 116000,
          "expand_assessment_year": 2016,
          "property_id": "10182bd1da061c7e"
        },
        {
          "expand_assessment_value": 111000,
          "expand_assessment_year": 2017,
          "property_id": "10182bd1da061c7e"
        },
        {
          "expand_assessment_value": 103500,
          "expand_assessment_year": 2018,
          "property_id": "10182bd1da061c7e"
        },
        {
          "expand_assessment_value": 99000,
          "expand_assessment_year": 2019,
          "property_id": "10182bd1da061c7e"
        },
        {
          "expand_assessment_value": 91500,
          "expand_assessment_year": 2020,
          "property_id": "10182bd1da061c7e"
        },
        {
          "expand_assessment_value": 85500,
          "expand_assessment_year": 2021,
          "property_id": "10182bd1da061c7e"
        },
        {
          "expand_assessment_value": 84500,
          "expand_assessment_year": 2022,
          "property_id": "10182bd1da061c7e"
        },
        {
          "expand_assessment_value": 91000,
          "expand_assessment_year": 2023,
          "property_id": "10182bd1da061c7e"
        },
        {
          "expand_assessment_value": 107000,
          "expand_assessment_year": 2024,
          "property_id": "10182bd1da061c7e"
        }
      ],
      "property_id": "10182bd1da061c7e"
    },
    {
      "address": "2250 801 6 Avenue SW",
      "permits": [
        {
          "expand_permit_application_date": "2011-07-18",
          "expand_permit_content": "Status: Expired|Issued date: 2011-08-08T00:00:00.000|Completed date: 2012-07-18T00:00:00.000|Estimated project cost: 160000.0|Permit class: Commercial|Permit type: Commercial / Multi Family Project|Permit type mapped: Building|Work class: Alteration|Work class group: Improvement|Work class mapped: Existing|applicant: VENTURA CONTRACTING|contractor: VENTURA CONTRACTING|estimated project cost: 160000.0|Total square feet affected: N/A|Housing units affected: 0",
          "expand_permit_id": "BP2011-08710",
          "expand_permit_type": "Building",
          "property_id": "102adc4d244ed937"
        },
        {
          "expand_permit_application_date": "2005-06-23",
          "expand_permit_content": "Status: Completed|Issued date: 2005-07-04T00:00:00.000|Completed date: 2007-05-22T00:00:00.000|Estimated project cost: 37000.0|Permit class: Commercial|Permit type: Commercial / Multi Family Project|Permit type mapped: Building|Work class: Alteration|Work class group: Improvement|Work class mapped: Existing|applicant: PERSIMMON CONTRACTING|contractor: PERSIMMON CONTRACTING|estimated project cost: 37000.0|Total square feet affected: N/A|Housing units affected: 0",
          "expand_permit_id": "BP2005-09079",
          "expand_permit_type": "Building",
          "property_id": "102adc4d244ed937"
        },
        {
          "expand_permit_application_date": "2006-02-27",
          "expand_permit_content": "Status: Completed|Issued date: 2006-04-25T00:00:00.000|Completed date: 2007-05-08T00:00:00.000|Estimated project cost: 5000.0|Permit class: Commercial|Permit type: Commercial / Multi Family Project|Permit type mapped: Building|Work class: Alteration|Work class group: Improvement|Work class mapped: Existing|applicant: PERSIMMON CONTRACTING|contractor: PERSIMMON CONTRACTING|estimated project cost: 5000.0|Total square feet affected: N/A|Housing units affected: 0",
          "expand_permit_id": "BP2006-02980",
          "expand_permit_type": "Building",
          "property_id": "102adc4d244ed937"
        },
        {
          "expand_permit_application_date": "2015-05-07",
          "expand_permit_content": "Status: Completed|Issued date: 2015-05-27T00:00:00.000|Completed date: 2016-03-10T00:00:00.000|Estimated project cost: 31500.0|Permit class: Commercial|Permit type: Commercial / Multi Family Project|Permit type mapped: Building|Work class: Alteration|Work class group: Improvement|Work class mapped: Existing|applicant: VENTURA CONTRACTING|contractor: VENTURA CONTRACTING|estimated project cost: 31500.0|Total square feet affected: N/A|Housing units affected: 0",
          "expand_permit_id": "BP2015-05143",
          "expand_permit_type": "Building",
          "property_id": "102adc4d244ed937"
        }
      ],
      "property_id": "102adc4d244ed937"
    }
  ],
  "error": "",
  "pagination": {
    "current_page": 1,
    "has_next_page": true,
    "has_previous_page": false,
    "page_total": 1776
  },
  "price_quote": false,
  "result_total": 5328,
  "time_ms": 1592,
  "ui_info": {
    "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"
  }
}