!

/search

GET
https://api.houski.ca/search

Overview

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.

Request parameters

NameRequiredTypeDescription
api_keyYesUUID v4Authorization API key
queryNoStringThe search query string
max_resultsNoNumber (default: 10)Maximum number of results per category (max: 10)

Response object

Type declarations are available at the bottom of this page.

FieldTypeDescription
cache_hitBooleanIndicates if the data was retrieved from cache
cost_centsNumberCost of the API call in cents
dataArrayArray of Property objects matching the search
errorStringError message (empty if no error)
match_metaArrayArray of objects
price_quoteBooleanIndicates if this is a price quote request
result_totalNumberTotal number of results
time_msNumberTime taken for the request in milliseconds

Example requests and responses

Programming language

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

Search for properties by address

Get properties matching the search query '323 141 mountain green vale'.

Request
Shell session
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"
TypeScript code
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);
})();
Response
JSON
{
  "cache_hit": true,
  "cost_cents": 4.000000476837158,
  "data": [
    {
      "address": "171 Green Mountain Road East",
      "address_link": "ca/on/hamilton/unknown/171-green-mountain-road-east",
      "city": "Hamilton",
      "country": "Canada",
      "country_abbreviation": "CA",
      "property_id": "8293793ac85c0a6a",
      "province": "Ontario",
      "province_abbreviation": "ON"
    },
    {
      "address": "591 Green Mountain Road East",
      "address_link": "ca/on/hamilton/unknown/591-green-mountain-road-east",
      "city": "Hamilton",
      "country": "Canada",
      "country_abbreviation": "CA",
      "property_id": "5ee47c2c8b8a4942",
      "province": "Ontario",
      "province_abbreviation": "ON"
    },
    {
      "address": "251 Green Mountain Road E",
      "address_link": "ca/on/hamilton/unknown/251-green-mountain-road-e",
      "city": "Hamilton",
      "country": "Canada",
      "country_abbreviation": "CA",
      "property_id": "513c5298920ab4ef",
      "province": "Ontario",
      "province_abbreviation": "ON"
    },
    {
      "address": "521 Green Mountain Road East",
      "address_link": "ca/on/hamilton/unknown/521-green-mountain-road-east",
      "city": "Hamilton",
      "country": "Canada",
      "country_abbreviation": "CA",
      "property_id": "e802f6374bbed6e5",
      "province": "Ontario",
      "province_abbreviation": "ON"
    },
    {
      "address": "271 Green Mountain Road East",
      "address_link": "ca/on/hamilton/unknown/271-green-mountain-road-east",
      "city": "Hamilton",
      "country": "Canada",
      "country_abbreviation": "CA",
      "property_id": "7a0d60b40a4e7619",
      "province": "Ontario",
      "province_abbreviation": "ON"
    }
  ],
  "error": "",
  "match_meta": [
    {
      "match_value": 0.5,
      "property_id": "e802f6374bbed6e5"
    },
    {
      "match_value": 0.5,
      "property_id": "8293793ac85c0a6a"
    },
    {
      "match_value": 0.5,
      "property_id": "5ee47c2c8b8a4942"
    },
    {
      "match_value": 0.5,
      "property_id": "513c5298920ab4ef"
    },
    {
      "match_value": 0.5,
      "property_id": "7a0d60b40a4e7619"
    }
  ],
  "price_quote": false,
  "result_total": 5,
  "time_ms": 74
}

Response type declarations

TypeScript code
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;
}