API recipes

Practical examples for using the Houski API.

Examples

Get recent listings in specific communities

Programming language

Select the programming language you want to display the code examples in.

Get recent listings in specific city communities
Pull houses listed in the last 60 days in Calgary's Riverbend and McKenzie Towne communities. Community names must be capitalized and spelled correctly. The location endpoint can verify formatting. filter_expand_match=all returns only properties with listing data, selecting latitude, longitude, community, and interior size, 3 per page.
Request
Shell session
curl -X GET "http://127.0.0.1:8080/properties?api_key=YOUR_API_KEY&city=calgary&community_in=Riverbend,McKenzie Towne&country_abbreviation=ca&expand=listings&expand_listing_date_gt=2026-07-30&expand_listing_event_eq=Listed&filter_expand_match=all&page=1&province_abbreviation=ab&results_per_page=3&select=latitude,longitude,community,interior_sq_m"
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('http://127.0.0.1:8080/properties');
    url.searchParams.set('api_key', 'YOUR_API_KEY');
    url.searchParams.set('city', 'calgary');
    url.searchParams.set('community_in', 'Riverbend,McKenzie Towne');
    url.searchParams.set('country_abbreviation', 'ca');
    url.searchParams.set('expand', 'listings');
    url.searchParams.set('expand_listing_date_gt', '2026-07-30');
    url.searchParams.set('expand_listing_event_eq', 'Listed');
    url.searchParams.set('filter_expand_match', 'all');
    url.searchParams.set('page', '1');
    url.searchParams.set('province_abbreviation', 'ab');
    url.searchParams.set('results_per_page', '3');
    url.searchParams.set('select', 'latitude,longitude,community,interior_sq_m');

    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.8500000238418579,
  "data": [
    {
      "address": "4791 Elgin Avenue SE",
      "community": "McKenzie Towne",
      "interior_sq_m": 191.19287109375,
      "latitude": 50.908843994140625,
      "listings": [
        {
          "expand_estimate_list_price": 639900,
          "expand_listing_date": "2026-09-12",
          "expand_listing_event": "Listed",
          "property_id": "10f0b523e9ad6e90"
        },
        {
          "expand_estimate_list_price": 639900,
          "expand_listing_date": "2026-09-16",
          "expand_listing_event": "Listed",
          "property_id": "10f0b523e9ad6e90"
        }
      ],
      "longitude": -113.95560455322266,
      "property_id": "10f0b523e9ad6e90"
    },
    {
      "address": "15 Prestwick Place SE",
      "community": "McKenzie Towne",
      "interior_sq_m": 127.92642211914062,
      "latitude": 50.926387786865234,
      "listings": [
        {
          "expand_estimate_list_price": 539900,
          "expand_listing_date": "2026-08-27",
          "expand_listing_event": "Listed",
          "property_id": "170c26f78d4c5883"
        }
      ],
      "longitude": -113.96019744873048,
      "property_id": "170c26f78d4c5883"
    },
    {
      "address": "123 Prestwick Manor SE",
      "community": "McKenzie Towne",
      "interior_sq_m": 195.6521759033203,
      "latitude": 50.9244270324707,
      "listings": [
        {
          "expand_estimate_list_price": 719900,
          "expand_listing_date": "2026-08-29",
          "expand_listing_event": "Listed",
          "property_id": "17aa4338e21b99e9"
        }
      ],
      "longitude": -113.9709014892578,
      "property_id": "17aa4338e21b99e9"
    }
  ],
  "error": "",
  "pagination": {
    "current_page": 1,
    "has_next_page": true,
    "has_previous_page": false,
    "page_total": 26
  },
  "price_quote": false,
  "result_total": 78,
  "time_ms": 447,
  "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"
  }
}