The /search endpoint provides fuzzy search functionality for properties, based on address information. It supports our standard selection functionality, allowing you to customize the fields returned for each property in the response. This enables efficient retrieval of relevant property data with flexible and forgiving search capabilities.
Name | Required | Type | Description |
---|---|---|---|
api_key | Yes | UUID v4 | Your API key for authorization |
query | No | String | The search query string |
max_results | No | Number (default: 10) | Maximum number of results per category (max: 10) |
Type declarations are available at the bottom of this page.
Field | Type | Description |
---|---|---|
cache_hit | Boolean | Indicates if the data was retrieved from cache |
cost_cents | Number | Cost of the API call in cents |
data | Array | Array of Property objects matching the search |
error | String | Error message (empty if no error) |
match_meta | Array | Array of objects |
price_quote | Boolean | Indicates if this is a price quote request |
result_total | Number | Total number of results |
time_ms | Number | Time taken for the request in milliseconds |
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&max_results=5&query=323 141 mountain green vale&select=address, city, province,province_abbreviation,country,country_abbreviation,address_link"
const houski_get_search = 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('max_results', '5'); url.searchParams.set('query', '323 141 mountain green vale'); url.searchParams.set('select', 'address, city, province,province_abbreviation,country,country_abbreviation,address_link'); const response = await fetch(url); const data = await response.json(); return data; } (async () => { let data: SearchResponse = await houski_get_search(); // Log the response console.log(data); })();
{ "cache_hit": false, "cost_cents": 4.000000476837158, "data": [ { "address": "3237 Green Mountain Circle", "address_link": "us/co/parker/beltline/3237-green-mountain-circle", "city": "Parker", "country": "United States", "country_abbreviation": "US", "property_id": "701f785824427fb6", "province": "Colorado", "province_abbreviation": "CO" }, { "address": "3208 Green Mountain Circle", "address_link": "us/co/parker/beltline/3208-green-mountain-circle", "city": "Parker", "country": "United States", "country_abbreviation": "US", "property_id": "3c0b2fc098cec31c", "province": "Colorado", "province_abbreviation": "CO" }, { "address": "341 Green Mountain Drive", "address_link": "us/co/eagle/beltline/341-green-mountain-drive", "city": "EAGLE", "country": "United States", "country_abbreviation": "US", "property_id": "4da2618b6ab2a304", "province": "Colorado", "province_abbreviation": "CO" }, { "address": "3293 Green Mountain Circle", "address_link": "us/co/parker/beltline/3293-green-mountain-circle", "city": "Parker", "country": "United States", "country_abbreviation": "US", "property_id": "52557c9b654acd3d", "province": "Colorado", "province_abbreviation": "CO" }, { "address": "323 12 Mountain View Street", "address_link": "us/co/grand-junction/beltline/323-12-mountain-view-street", "city": "GRAND JUNCTION", "country": "United States", "country_abbreviation": "US", "property_id": "71e9858a0ca7ed1b", "province": "Colorado", "province_abbreviation": "CO" } ], "error": "", "match_meta": [ { "match_value": 0.6071428656578064, "property_id": "701f785824427fb6" }, { "match_value": 0.5714285969734192, "property_id": "3c0b2fc098cec31c" }, { "match_value": 0.5714285969734192, "property_id": "4da2618b6ab2a304" }, { "match_value": 0.5714285969734192, "property_id": "52557c9b654acd3d" }, { "match_value": 0.5714285969734192, "property_id": "71e9858a0ca7ed1b" } ], "price_quote": false, "result_total": 5, "time_ms": 785 }
interface SearchResponse { cache_hit: boolean; cost_cents: number; data: Property[]; error: string; match_meta: SearchMatchMeta[]; price_quote: boolean; result_total: number; time_ms: number; } interface SearchMatchMeta { property_id: string; match_value: number; }