The search endpoint is used to fuzzy find properties by address, and communities, cities, provinces, and countries by name.
This endpoint conforms to Houski API's standard filtering and sorting functionality.
To see all the fields that can be filtered or sorted by, see the fields page.
This example search input utilizes this endpoint.
Name | Required | Type | Description |
---|---|---|---|
api_key | Yes | UUID v4 | Authorization API key |
query | Yes | String | The search query string |
Type declarations are available at the bottom of this page.
Name | Type | Description |
---|---|---|
cache_hit | Boolean | Indicates if the data was retrieved from the cache |
cost_cents | Number | Cost of the API call in cents |
data | Object | Contains the search result data |
error | String | Details about the error. Empty if no error |
price_quote | Boolean | Request is for a price quote |
time_ms | Number | Time taken for the request to complete in milliseconds |
Select the programming language you want to display the code examples in.
Select the programming language you want to display the code examples in.
curl -X GET "https://api.houski.ca/search?api_key=YOUR_API_KEY&query=155 riverside"
const houski_search_data = async (): Promise<SearchResponse> => { // You must copy the SearchResponse type declarations from the // Houski API documentation to strongly type the response const url = new URL('https://api.houski.ca/search'); url.searchParams.set('api_key', 'YOUR_API_KEY'); url.searchParams.set('query', '155 riverside'); const response = await fetch(url); const data = await response.json(); return data; } (async () => { let data: SearchResponse = await houski_search_data(); // Log the response console.log(data); })();
{ "cache_hit": true, "cost_cents": 0.009999999776482582, "data": { "cities": [], "communities": [], "countries": [], "properties": [ { "address": "155 Riverside Way SE", "address_link": "ca/ab/calgary/riverbend/155-riverside-way-se", "city": "Calgary", "country": "Canada", "country_abbreviation": "CA", "latitude": -114.0225601196289, "longitude": 50.98358917236328, "province": "Alberta", "province_abbreviation": "AB", "province_abbreviation_link": "ca/ab", "search_match_score": 1.0 }, { "address": "155 Riverside Close SE", "address_link": "ca/ab/calgary/riverbend/155-riverside-close-se", "city": "Calgary", "country": "Canada", "country_abbreviation": "CA", "latitude": -114.0279769897461, "longitude": 50.97563552856445, "province": "Alberta", "province_abbreviation": "AB", "province_abbreviation_link": "ca/ab", "search_match_score": 1.0 }, { "address": "155 Riverside Mews SE", "address_link": "ca/ab/calgary/riverbend/155-riverside-mews-se", "city": "Calgary", "country": "Canada", "country_abbreviation": "CA", "latitude": -114.0274887084961, "longitude": 50.979949951171875, "province": "Alberta", "province_abbreviation": "AB", "province_abbreviation_link": "ca/ab", "search_match_score": 1.0 }, { "address": "155 Riverside Parkway", "address_link": "ca/ns/new-glasgow/unknown/155-riverside-parkway", "city": "New Glasgow", "country": "Canada", "country_abbreviation": "CA", "latitude": 45.58757019042969, "longitude": -62.64662170410156, "province": "Nova Scotia", "province_abbreviation": "NS", "province_abbreviation_link": "ca/ns", "search_match_score": 1.0 }, { "address": "155 Riverside Drive", "address_link": "ca/on/greater-sudbury/unknown/155-riverside-drive", "city": "Greater Sudbury", "country": "Canada", "country_abbreviation": "CA", "latitude": 46.485389709472656, "longitude": -80.99884033203125, "province": "Ontario", "province_abbreviation": "ON", "province_abbreviation_link": "ca/on", "search_match_score": 1.0 }, { "address": "155 Riverside Drive", "address_link": "ca/on/vaughan/unknown/155-riverside-drive", "city": "Vaughan", "country": "Canada", "country_abbreviation": "CA", "latitude": 43.796749114990234, "longitude": -79.58148956298828, "province": "Ontario", "province_abbreviation": "ON", "province_abbreviation_link": "ca/on", "search_match_score": 1.0 }, { "address": "155 Riverside Drive West", "address_link": "ca/on/greater-sudbury/unknown/155-riverside-drive-west", "city": "Greater Sudbury", "country": "Canada", "country_abbreviation": "CA", "latitude": 46.59049987792969, "longitude": -81.34265899658203, "province": "Ontario", "province_abbreviation": "ON", "province_abbreviation_link": "ca/on", "search_match_score": 1.0 }, { "address": "155 Old Riverside Road", "address_link": "ca/ns/guysborough/unknown/155-old-riverside-road", "city": "Guysborough", "country": "Canada", "country_abbreviation": "CA", "latitude": 45.398868560791016, "longitude": -61.50994873046875, "province": "Nova Scotia", "province_abbreviation": "NS", "province_abbreviation_link": "ca/ns", "search_match_score": 0.9285714030265808 }, { "address": "1877 Riverside Road", "address_link": "ca/ns/riverside/unknown/1877-riverside-road", "city": "Riverside", "country": "Canada", "country_abbreviation": "CA", "latitude": 45.2072868347168, "longitude": -63.404258728027344, "province": "Nova Scotia", "province_abbreviation": "NS", "province_abbreviation_link": "ca/ns", "search_match_score": 0.7142857313156128 }, { "address": "2400 Riverside Drive W 2270 Riverside Drive W", "address_link": "ca/on/windsor/unknown/2400-riverside-drive-w-2270-riverside-drive-w", "city": "Windsor", "country": "Canada", "country_abbreviation": "CA", "latitude": 42.31119918823242, "longitude": -83.068603515625, "province": "Ontario", "province_abbreviation": "ON", "province_abbreviation_link": "ca/on", "search_match_score": 0.6428571343421936 } ], "provinces": [] }, "error": "", "price_quote": false, "time_ms": 344 }
interface SearchResponse { cache_hit: boolean; cost_cents: number; data: SearchData; error: string; price_quote: boolean; time_ms: number; } interface SearchData { properties: SearchProperty[]; communities: SearchCommunity[]; cities: SearchCity[]; provinces: SearchProvince[]; countries: SearchCountry[]; } interface SearchProperty { address_link: string; address: string; city: string; country_abbreviation: string; country: string; province_abbreviation_link: string; province_abbreviation: string; province: string; search_match_score: number; latitude: number; longitude: number; } interface SearchCountry { country_abbreviation_id: string; country_abbreviation_link: string; country_abbreviation: string; country: string; search_match_score: number; } interface SearchProvince { country_abbreviation_id: string; country_abbreviation_link: string; country_abbreviation: string; country: string; province_abbreviation_id: string; province_abbreviation_link: string; province_abbreviation: string; province: string; search_match_score: number; } interface SearchCity { city_id: string; city_link: string; city: string; country_abbreviation_id: string; country_abbreviation_link: string; country_abbreviation: string; country: string; province_abbreviation_id: string; province_abbreviation_link: string; province_abbreviation: string; province: string; search_match_score: number; } interface SearchCommunity { city_id: string; city_link: string; city: string; community_id: string; community_link: string; community: string; country_abbreviation_id: string; country_abbreviation_link: string; country_abbreviation: string; country: string; province_abbreviation_id: string; province_abbreviation_link: string; province_abbreviation: string; province: string; search_match_score: number; }