!

API Recipes

Learn how to use the Houski API with practical examples.

Find family homes with 3+ bedrooms

Programming language

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

Find family homes with 3+ bedrooms
Search for houses with 3 or more bedrooms, perfect for families. Shows key property details including size and estimated price.
Request
Shell session
curl -X GET "https://api.houski.ca/properties?api_key=YOUR_API_KEY&bedroom_gte=3&city=calgary&country_abbreviation=ca&property_type_eq=House&province_abbreviation=ab&results_per_page=3&select=address,bedroom,bathroom_full,estimate_list_price,interior_sq_m,property_type"
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('bedroom_gte', '3');
    url.searchParams.set('city', 'calgary');
    url.searchParams.set('country_abbreviation', 'ca');
    url.searchParams.set('property_type_eq', 'House');
    url.searchParams.set('province_abbreviation', 'ab');
    url.searchParams.set('results_per_page', '3');
    url.searchParams.set('select', 'address,bedroom,bathroom_full,estimate_list_price,interior_sq_m,property_type');

    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": 2.1000001430511475,
  "data": [
    {
      "address": "6 1744 7 Street SW",
      "bathroom_full": 2,
      "bedroom": 3,
      "estimate_list_price": 1186037,
      "interior_sq_m": 109.99715423583984,
      "property_id": "10004f7afe0c1946",
      "property_type": "House"
    },
    {
      "address": "384 Copperpond Landng SE",
      "bathroom_full": 2,
      "bedroom": 3,
      "estimate_list_price": 702855,
      "interior_sq_m": 109.99715423583984,
      "property_id": "10007f9761f49940",
      "property_type": "House"
    },
    {
      "address": "239 Dalhurst Way NW",
      "bathroom_full": 2,
      "bedroom": 3,
      "estimate_list_price": 1279432,
      "interior_sq_m": 107.11631774902344,
      "property_id": "100086f6bc064d3f",
      "property_type": "House"
    }
  ],
  "error": "",
  "pagination": {
    "current_page": 1,
    "has_next_page": true,
    "has_previous_page": false,
    "page_total": 138832
  },
  "price_quote": false,
  "result_total": 416495,
  "time_ms": 105,
  "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"
  }
}