!

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


Search for permits in a city
In this example, we are retrieving properties that have permit data in Calgary. To search through the permits, we are using a case insensitive regex search the informational content of the permit for the word 'secondary' or 'suite'. Only properties with permit data will be returned when using the filter_expand_match=all parameter. We are then limiting the results per each page to 3. Additionally by using the expand_permit_application_date_gt parameter, we are limiting our search only to permits that have been issued within the last 180 days.
Request
Shell session
curl -X GET "https://api.houski.ca/properties?api_key=YOUR_API_KEY&city=calgary&country_abbreviation=ca&expand=permits&expand_permit_application_date_gt=2024-11-02&expand_permit_content_regex=(?i)\b(secondary|suite)\b&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('country_abbreviation', 'ca');
    url.searchParams.set('expand', 'permits');
    url.searchParams.set('expand_permit_application_date_gt', '2024-11-02');
    url.searchParams.set('expand_permit_content_regex', '(?i)\b(secondary|suite)\b');
    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.6500000357627869,
  "data": [
    {
      "address": "7108 Hunterville Road NW",
      "permits": [
        {
          "expand_permit_application_date": "2025-01-29",
          "expand_permit_content": "Status: Issued Permit|Issued date: 2025-02-04T00:00:00.000|Completed date: N/A|Estimated project cost: 88557.86|Permit class: Secondary Suites|Permit type: Residential Improvement Project|Permit type mapped: Building|Work class: Alteration|Work class group: Improvement|Work class mapped: Existing|applicant: N/A|contractor: N/A|estimated project cost: 88557.86|Total square feet affected: N/A|Housing units affected: 1",
          "expand_permit_id": "BP2025-01630",
          "expand_permit_type": "Building",
          "property_id": "10318a64e17f233a"
        },
        {
          "expand_permit_application_date": "2025-01-20",
          "expand_permit_content": "Status: Cancelled|Category: Residential - Secondary Suite|Description: NEW: SECONDARY SUITE (BASEMENT) - PARKING STALL|Proposed use code: C2626|Proposed use description: SECONDARY SUITE|Permitted/discretionary: Permitted with a Relaxation|Land use district: R-CG|Land use district description: Residential - Grade-Oriented Infill|Concurrent LOC: N/A|Decision: N/A|Decision by: N/A|Decision date: N/A|Canceled/refused date: 2025-02-11|SDAB Number: N/A|SDAB hearing date: N/A|SDAB Decision: N/A|SDAB decision date: N/A",
          "expand_permit_id": "DP2025-00348",
          "expand_permit_type": "Development",
          "property_id": "10318a64e17f233a"
        }
      ],
      "property_id": "10318a64e17f233a"
    },
    {
      "address": "136 Edith Place NW",
      "permits": [
        {
          "expand_permit_application_date": "2024-11-05",
          "expand_permit_content": "Status: Issued Permit|Issued date: 2024-11-20T00:00:00.000|Completed date: N/A|Estimated project cost: 74841.81|Permit class: Secondary Suites|Permit type: Residential Improvement Project|Permit type mapped: Building|Work class: Alteration|Work class group: Improvement|Work class mapped: Existing|applicant: N/A|contractor: N/A|estimated project cost: 74841.81|Total square feet affected: N/A|Housing units affected: 1",
          "expand_permit_id": "BP2024-23481",
          "expand_permit_type": "Building",
          "property_id": "106bc135ac431cb1"
        }
      ],
      "property_id": "106bc135ac431cb1"
    },
    {
      "address": "1835 13 Avenue NW",
      "permits": [
        {
          "expand_permit_application_date": "2025-04-27",
          "expand_permit_content": "Status: Cancelled - Pending Refund|Category: Residential - Multi-Family|Description: NEW: ROWHOUSE BUILDING (2 BUILDING), SECONDARY SUITE (10 SUITES), 1 ACCESSORY RESIDENTIAL BUILDING (GARAGE), 10 BACKYARD SUITE (ABOVE GARAGE)|Proposed use code: C2540|Proposed use description: ROWHOUSE BUILDING|Permitted/discretionary: Discretionary|Land use district: R-CG|Land use district description: Residential - Grade-Oriented Infill|Concurrent LOC: N/A|Decision: N/A|Decision by: N/A|Decision date: N/A|Canceled/refused date: N/A|SDAB Number: N/A|SDAB hearing date: N/A|SDAB Decision: N/A|SDAB decision date: N/A",
          "expand_permit_id": "DP2025-02460",
          "expand_permit_type": "Development",
          "property_id": "106edb39875f4608"
        },
        {
          "expand_permit_application_date": "2025-04-26",
          "expand_permit_content": "Status: Hold|Category: Residential - Multi-Family|Description: NEW: ROWHOUSE BUILDING (2 BUILDINGS), SECONDARY SUITE (10 SUITES), ACCESSORY RESIDENTIAL BUILDING (GARAGE), BACKYARD SUITE (ATTACHED)|Proposed use code: C1175; C2540; C2626|Proposed use description: BACKYARD SUITE; ROWHOUSE BUILDING; SECONDARY SUITE|Permitted/discretionary: Discretionary|Land use district: R-CG|Land use district description: Residential - Grade-Oriented Infill|Concurrent LOC: N/A|Decision: N/A|Decision by: N/A|Decision date: N/A|Canceled/refused date: N/A|SDAB Number: N/A|SDAB hearing date: N/A|SDAB Decision: N/A|SDAB decision date: N/A",
          "expand_permit_id": "DP2025-02454",
          "expand_permit_type": "Development",
          "property_id": "106edb39875f4608"
        }
      ],
      "property_id": "106edb39875f4608"
    }
  ],
  "error": "",
  "pagination": {
    "current_page": 1,
    "has_next_page": true,
    "has_previous_page": false,
    "page_total": 505
  },
  "price_quote": false,
  "result_total": 1514,
  "time_ms": 2493,
  "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"
  }
}