Most of the endpoints on the Houski API allow you to filter the data returned by the API, by virtually any field. You can also filter properties geographically by specifying a bounding box, or polygon (scroll down on this page for examples).
Filtering is performed by adding query parameters to the request URL. For example, to filter the properties returned by the properties endpoint by the number of full bathrooms, you could do any of the following:
Filter | Name | Example |
---|---|---|
Greater than | gt | bathroom_full_gt=3 |
Greater than or equal to | gte | bathroom_full_gte=3 |
Less than | lt | bathroom_full_lt=3 |
Less than or equal to | lte | bathroom_full_lte=3 |
Equal to | eq | bathroom_full_eq=3 |
Not equal to | neq | bathroom_full_neq=3 |
In the given list | in | property_type_in=House,Apartment |
Matches a regular expression | regex | bathroom_full_regex=1|3 |
Does not match a regular expression | nregex | bathroom_full_nregex=1|3 |
Select the programming language you want to display the code examples in.
curl -X GET "https://api.houski.ca/properties?api_key=YOUR_API_KEY&bedroom_eq=3&country_abbreviation=ca&province_abbreviation=ab&results_per_page=3&select=bedroom,den,estimate_list_price,latitude,longitude"
const houski_properties_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_eq', '3'); url.searchParams.set('country_abbreviation', 'ca'); url.searchParams.set('province_abbreviation', 'ab'); url.searchParams.set('results_per_page', '3'); url.searchParams.set('select', 'bedroom,den,estimate_list_price,latitude,longitude'); const response = await fetch(url); const data = await response.json(); return data; } (async () => { let data: PropertiesResponse = await houski_properties_data(); // Log the response console.log(data); })();
{ "cache_hit": true, "cost_cents": 2.1000001430511475, "data": [ { "address": "16003 12 Avenue SW", "bedroom": 3, "den": 0, "estimate_list_price": 576084, "latitude": 53.422386169433594, "longitude": -113.59880065917967, "property_id": "1af866129da176c1" }, { "address": "11940 104 Street NW", "bedroom": 3, "den": 0, "estimate_list_price": 1638109, "latitude": 53.57329559326172, "longitude": -113.49976348876952, "property_id": "ac93798abc22b236" }, { "address": "4346 49 Street NW", "bedroom": 3, "den": 0, "estimate_list_price": 494085, "latitude": 53.48165512084961, "longitude": -113.41583251953124, "property_id": "1ea8e393fdcb7373" } ], "error": "", "pagination": { "current_page": 1, "has_next_page": true, "has_previous_page": false, "page_total": 402934 }, "price_quote": false, "result_total": 1208801, "time_ms": 56, "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" } }
A bounding box is a rectangular geographic region defined by two points: the northeast and southwest corners. The northeast corner is defined by the latitude and longitude of the top right corner of the box, and the southwest corner is defined by the latitude and longitude of the bottom left corner of the box.
These bounding box parameters can be used to filter requests. When used, requests will only include the properties that are located within the bounding box.
curl -X GET "https://api.houski.ca/properties?api_key=YOUR_API_KEY&bbox_ne_lat=51.1005&bbox_ne_lng=-113.508&bbox_sw_lat=50.6668&bbox_sw_lng=-114.4593&country_abbreviation=ca&province_abbreviation=ab&results_per_page=3&select=bedroom,den,estimate_list_price,latitude,longitude"
const houski_properties_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('bbox_ne_lat', '51.1005'); url.searchParams.set('bbox_ne_lng', '-113.508'); url.searchParams.set('bbox_sw_lat', '50.6668'); url.searchParams.set('bbox_sw_lng', '-114.4593'); url.searchParams.set('country_abbreviation', 'ca'); url.searchParams.set('province_abbreviation', 'ab'); url.searchParams.set('results_per_page', '3'); url.searchParams.set('select', 'bedroom,den,estimate_list_price,latitude,longitude'); const response = await fetch(url); const data = await response.json(); return data; } (async () => { let data: PropertiesResponse = await houski_properties_data(); // Log the response console.log(data); })();
{ "cache_hit": true, "cost_cents": 2.1000001430511475, "data": [ { "address": "1180 Cranbrook Garden SE", "bedroom": 3, "den": 0, "estimate_list_price": 830953, "latitude": 50.86390686035156, "longitude": -113.97894287109376, "property_id": "2187d710cad6d1b6" }, { "address": "99 Midpark Gardens Southeast", "bedroom": 3, "den": 0, "estimate_list_price": 911425, "latitude": 50.91322326660156, "longitude": -114.05998992919922, "property_id": "7d766b1b1dc70388" }, { "address": "4662 Marbank Drive NE", "bedroom": 3, "den": 2, "estimate_list_price": 564965, "latitude": 51.06364059448242, "longitude": -113.96501922607422, "property_id": "947040b0939bd4e6" } ], "error": "", "pagination": { "current_page": 1, "has_next_page": true, "has_previous_page": false, "page_total": 132492 }, "price_quote": false, "result_total": 397475, "time_ms": 98, "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" } }
A polygon is a geometric shape defined by a set of ordered points connected by straight lines. The polygon is defined by a set of latitude and longitude coordinates that create an arbitrary shape.
When using the polygon parameter in a request, only properties within the polygon will be returned.
The polygon parameter requires a string of latitude-longitude pairs that are separated by underscores, with each pair separated by a comma.
curl -X GET "https://api.houski.ca/properties?api_key=YOUR_API_KEY&country_abbreviation=ca&polygon=51.0447_-114.0719,51.0544_-114.0719,51.0544_-114.0856,51.0452_-114.0856&province_abbreviation=ab&results_per_page=3&select=bedroom,den,estimate_list_price,latitude,longitude"
const houski_properties_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('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'); url.searchParams.set('select', 'bedroom,den,estimate_list_price,latitude,longitude'); const response = await fetch(url); const data = await response.json(); return data; } (async () => { let data: PropertiesResponse = await houski_properties_data(); // Log the response console.log(data); })();
{ "cache_hit": true, "cost_cents": 2.1000001430511475, "data": [ { "address": "902 836 5 Avenue SW", "bedroom": 3, "den": 0, "estimate_list_price": 224699, "latitude": 51.04915618896485, "longitude": -114.0805206298828, "property_id": "1b0ade2d9f4b132c" }, { "address": "302E 500 Eau Claire Avenue SW", "bedroom": 2, "den": 0, "estimate_list_price": 573871, "latitude": 51.05312728881836, "longitude": -114.07257843017578, "property_id": "93525b1732af1c13" }, { "address": "1004 1088 6 Avenue SW", "bedroom": 3, "den": 0, "estimate_list_price": 451812, "latitude": 51.048343658447266, "longitude": -114.08546447753906, "property_id": "796838425267097c" } ], "error": "", "pagination": { "current_page": 1, "has_next_page": true, "has_previous_page": false, "page_total": 893 }, "price_quote": false, "result_total": 2679, "time_ms": 318, "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" } }