!

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


Get residential area context for an appraisal or AVM
This request returns houses within a 500 meter radius of the point (a property in Vancouver) with expansion of listing history.
Request
Shell session
curl -X GET "https://api.houski.ca/geocoding?api_key=YOUR_API_KEY&country_abbreviation=ca&expand=listings&has_expand_listings_eq=true&latitude=49.26249&longitude=-123.10659&property_type_eq=House&radius=0.5&results_per_page=1&select=latitude,longitude,interior_sq_m,bedroom,den,bathroom_full,bathroom_half,assessment_value,assessment_year&shape=circle"
TypeScript code
const houski_recipe_data = async (): Promise<GeocodingResponse> => {

    // You must copy the GeocodingResponse type declarations from the 
    // Houski API documentation to strongly type the response

    const url = new URL('https://api.houski.ca/geocoding');
    url.searchParams.set('api_key', 'YOUR_API_KEY');
    url.searchParams.set('country_abbreviation', 'ca');
    url.searchParams.set('expand', 'listings');
    url.searchParams.set('has_expand_listings_eq', 'true');
    url.searchParams.set('latitude', '49.26249');
    url.searchParams.set('longitude', '-123.10659');
    url.searchParams.set('property_type_eq', 'House');
    url.searchParams.set('radius', '0.5');
    url.searchParams.set('results_per_page', '1');
    url.searchParams.set('select', 'latitude,longitude,interior_sq_m,bedroom,den,bathroom_full,bathroom_half,assessment_value,assessment_year');
    url.searchParams.set('shape', 'circle');

    const response = await fetch(url);
    const data = await response.json();

    return data;
}

(async () => {
let data: GeocodingResponse = await houski_recipe_data();

// Log the response
console.log(data);
})();
Response
JSON
{
  "cache_hit": false,
  "cost_cents": 1.1500000953674316,
  "data": [
    {
      "address": "110 W 10 Avenue",
      "bathroom_full": 2,
      "bathroom_half": 0,
      "bedroom": 3,
      "den": 0,
      "interior_sq_m": 112.2268295288086,
      "latitude": 49.26184844970703,
      "listings": [
        {
          "expand_estimate_list_price": 16000000,
          "expand_listing_date": "2023-03-25",
          "expand_listing_event": "Listed",
          "property_id": "f751e8671955e254"
        },
        {
          "expand_estimate_list_price": 14000000,
          "expand_listing_date": "2024-05-03",
          "expand_listing_event": "Price decrease",
          "property_id": "f751e8671955e254"
        },
        {
          "expand_estimate_list_price": 14000000,
          "expand_listing_date": "2024-09-09",
          "expand_listing_event": "Unlisted",
          "property_id": "f751e8671955e254"
        },
        {
          "expand_estimate_list_price": 14000000,
          "expand_listing_date": "2025-01-27",
          "expand_listing_event": "Unlisted",
          "property_id": "f751e8671955e254"
        },
        {
          "expand_estimate_list_price": 12800000,
          "expand_listing_date": "2025-06-17",
          "expand_listing_event": "Price decrease",
          "property_id": "f751e8671955e254"
        }
      ],
      "longitude": -123.10713958740234,
      "property_id": "f751e8671955e254"
    }
  ],
  "error": "",
  "pagination": {
    "current_page": 1,
    "has_next_page": true,
    "has_previous_page": false,
    "page_total": 30
  },
  "price_quote": false,
  "result_total": 30,
  "time_ms": 48
}