API recipes

Requests you can copy and run. Each one returns live data from the API.

Examples

Find homes with many schools nearby

Programming language

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

Find homes with many schools nearby
score_education counts the schools near the home and how close they are, not their quality. Combine it with score_family and score_safety for family services and child care site selection.
Request
Shell session
curl -X GET "https://api.houski.ca/properties?api_key=YOUR_API_KEY&city=vancouver&country_abbreviation=ca&page=1&property_type_in=House,Townhouse&province_abbreviation=bc&results_per_page=5&score_education_gte=8&select=address,score_education,score_family,score_safety,bedroom_total,estimate_list_price,demographic_household_type_family_with_children_percent"
TypeScript code
const houski_recipe_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('city', 'vancouver');
    url.searchParams.set('country_abbreviation', 'ca');
    url.searchParams.set('page', '1');
    url.searchParams.set('property_type_in', 'House,Townhouse');
    url.searchParams.set('province_abbreviation', 'bc');
    url.searchParams.set('results_per_page', '5');
    url.searchParams.set('score_education_gte', '8');
    url.searchParams.set('select', 'address,score_education,score_family,score_safety,bedroom_total,estimate_list_price,demographic_household_type_family_with_children_percent');

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

    return data;
}

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

// Log the response
console.log(data);
})();
Response
JSON
{
  "cache_hit": true,
  "cost_cents": 3.1,
  "data": [
    {
      "address": "2122 47 Avenue W",
      "bedroom_total": 4,
      "demographic_household_type_family_with_children_percent": 0.3181818,
      "estimate_list_price": 2593511,
      "property_id": "1033e36d67d07c8e",
      "score_education": 8,
      "score_family": 6,
      "score_safety": 8
    },
    {
      "address": "6037 Adera Street",
      "bedroom_total": 5,
      "demographic_household_type_family_with_children_percent": 0.27272728,
      "estimate_list_price": 4486560,
      "property_id": "10340a19466d7f18",
      "score_education": 8,
      "score_family": 5,
      "score_safety": 8
    },
    {
      "address": "6626 Laburnum Street",
      "bedroom_total": 5,
      "demographic_household_type_family_with_children_percent": 0.48,
      "estimate_list_price": 3209490,
      "property_id": "103a31168b06b1b2",
      "score_education": 8,
      "score_family": 9,
      "score_safety": 8
    },
    {
      "address": "117 1550 49 Avenue W",
      "bedroom_total": 4,
      "demographic_household_type_family_with_children_percent": 0.37037036,
      "estimate_list_price": 4093889,
      "property_id": "103a3b744130852a",
      "score_education": 8,
      "score_family": 7,
      "score_safety": 8
    },
    {
      "address": "302 2120 44 Avenue W",
      "bedroom_total": 5,
      "demographic_household_type_family_with_children_percent": 0.118644066,
      "estimate_list_price": 2155962,
      "property_id": "10472f0bcf2a23ef",
      "score_education": 8,
      "score_family": 1,
      "score_safety": 7
    }
  ],
  "error": "",
  "pagination": {
    "current_page": 1,
    "has_next_page": true,
    "has_previous_page": false,
    "page_total": 27460
  },
  "price_quote": false,
  "result_total": 137296,
  "time_ms": 3483,
  "ui_info": {
    "city": "Vancouver",
    "city_id": "3d4b9ab2229768be",
    "city_link": "ca/bc/vancouver",
    "city_slug": "vancouver",
    "country": "Canada",
    "country_abbreviation": "CA",
    "country_abbreviation_id": "9ace2b6431b7f1be",
    "country_abbreviation_link": "ca",
    "country_slug": "canada",
    "province": "British Columbia",
    "province_abbreviation": "BC",
    "province_abbreviation_id": "84b27e64bc119a2",
    "province_abbreviation_link": "ca/bc",
    "province_slug": "british_columbia"
  }
}