!

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


Commercial properties
Gets commercial properties.
Request
Shell session
curl -X GET "https://api.houski.ca/properties?api_key=YOUR_API_KEY&country_abbreviation=ca&property_type_eq=Commercial&select=commercial_use,property_type,interior_sq_m,bedroom,den,bathroom_full,bathroom_half"
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('property_type_eq', 'Commercial');
    url.searchParams.set('select', 'commercial_use,property_type,interior_sq_m,bedroom,den,bathroom_full,bathroom_half');

    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": 5.40000057220459,
  "data": [
    {
      "address": "4607 56A Avenue",
      "bathroom_full": 2,
      "bathroom_half": 0,
      "bedroom": 3,
      "commercial_use": "Place of worship",
      "den": 0,
      "interior_sq_m": 112.2268295288086,
      "property_id": "10004e7da41607c1",
      "property_type": "Commercial"
    },
    {
      "address": "3 12848 85 Avenue",
      "bathroom_full": 2,
      "bathroom_half": 0,
      "bedroom": 3,
      "den": 0,
      "interior_sq_m": 112.2268295288086,
      "property_id": "100121a8e6ab6499",
      "property_type": "Commercial"
    },
    {
      "address": "8 27272 Gloucester Way",
      "bathroom_full": 2,
      "bathroom_half": 0,
      "bedroom": 3,
      "den": 0,
      "interior_sq_m": 112.2268295288086,
      "property_id": "1001b2c5a20725a9",
      "property_type": "Commercial"
    },
    {
      "address": "207 9466 189 Street",
      "bathroom_full": 2,
      "bathroom_half": 0,
      "bedroom": 3,
      "den": 0,
      "interior_sq_m": 112.2268295288086,
      "property_id": "1001c1d36d967912",
      "property_type": "Commercial"
    },
    {
      "address": "2206 10 Avenue SW",
      "bathroom_full": 2,
      "bathroom_half": 0,
      "bedroom": 3,
      "den": 0,
      "interior_sq_m": 112.2268295288086,
      "property_id": "10023888bdd1ce5d",
      "property_type": "Commercial"
    },
    {
      "address": "6241 Chemin Hillsdale",
      "bathroom_full": 2,
      "bathroom_half": 0,
      "bedroom": 3,
      "den": 0,
      "interior_sq_m": 112.2268295288086,
      "property_id": "1002faec5fabe2d5",
      "property_type": "Commercial"
    }
  ],
  "error": "",
  "pagination": {
    "current_page": 1,
    "has_next_page": true,
    "has_previous_page": false,
    "page_total": 29749
  },
  "price_quote": false,
  "result_total": 178494,
  "time_ms": 41,
  "ui_info": {
    "country": "Canada",
    "country_abbreviation": "CA",
    "country_abbreviation_id": "9ace2b6431b7f1be",
    "country_abbreviation_link": "ca",
    "country_slug": "canada"
  }
}