!

/predict

GET
https://api.houski.ca/predict
View the AVM information page for information on this endpoint's prediction accuracy.

The predict endpoint is used for predicting various property metrics over time such as list prices, sale prices and rent prices.

This endpoint handles single and batch requests. Batch requests, which enable predictions for multiple properties at once, are useful for analyzing trends across a portfolio of properties.

Property characteristics can be overridden using query parameters to test hypothetical scenarios - for example, predicting how property values would change with additional bedrooms or square footage modifications.

Example use cases

  1. Local governments can anticipate housing market trends to plan for affordable housing initiatives
  2. Property managers can set competitive rent prices based on predicted market trends
  3. Home buyers can determine the best time to buy a property based on predicted sale prices
  4. Home sellers can decide when to put a property on the market for maximum profit
  5. Data analysts can integrate property prediction data into broader economic models or studies
  6. Mortgage lenders can evaluate the risk of mortgage default based on future property values
  7. App developers can integrate real-time property predictions into apps for various industries, such as finance or real estate
  8. Academic researchers can conduct studies on housing markets and urban development risks using predictive data

Request parameters

Note: Property characteristics can be overridden using query parameters (bedroom, den, etc.). Parameter-based overrides take precedence over both website data and existing property data.

NameRequiredTypeDescription
api_keyYesUUID v4Your API key for authorization
property_idYesStringThe target property's ID (for batch selection, separate ids by a comma)
start_dateYesStringStart date for prediction in YYYY-MM-DD format
fieldsYesStringAny predictable field
periodNo (default: week)StringThe time period for the predictions - day, week, month, year
nextNo (default: 0)IntegerHow many future periods after the start_date to predict
lastNo (default: 0)IntegerHow many previous periods before the start_date to predict
bedroomNoIntegerNumber of bedrooms (overrides property data when provided)
denNoIntegerNumber of dens (overrides property data when provided)
bathroom_fullNoIntegerNumber of full bathrooms (overrides property data when provided)
bathroom_halfNoIntegerNumber of half bathrooms (overrides property data when provided)
construction_yearNoIntegerYear the property was built (overrides property data when provided)
interior_sq_mNoFloatInterior square meters (overrides property data when provided)
property_typeNoStringProperty type (overrides property data when provided)
maintenance_feeNoFloatMonthly maintenance fee (overrides property data when provided)
garage_type_firstNoStringGarage type (overrides property data when provided)

Response object

Type declarations are available at the bottom of this page.

NameTypeDescription
cache_hitBooleanIndicates if the data was retrieved from the cache
cost_centsIntegerCost of the API call in cents
dataArray<PredictData>Array of prediction data for each property
errorStringDetails about the error. Empty if no error
price_quoteBooleanIndicates if this is a price quote request (no charge)
result_totalIntegerTotal number of results
time_msIntegerTime taken for the request to complete in milliseconds

PredictData object

Each property's prediction data contains:

NameTypeDescription
property_idStringUnique identifier for the property
predictionsArray<Prediction>Array of time-series predictions for the property

Prediction object

Each prediction point contains:

NameTypeDescription
dateStringDate of the prediction in YYYY-MM-DD format
estimate_list_priceFloat | nullEstimated listing price in dollars (only present if requested in fields parameter)
estimate_sale_priceFloat | nullEstimated sale price in dollars (only present if requested in fields parameter)
estimate_rent_monthlyFloat | nullEstimated monthly rent in dollars (only present if requested in fields parameter)

Example requests and responses

Property Override Example

Predicting with modified property characteristics:

https://api.houski.ca/predict?api_key=YOUR_API_KEY&property_id=bd9c6fb24c31c772&bedroom=5&bathroom_full=3&interior_sq_m=250&fields=estimate_sale_price&start_date=2024-01-01&next=12&period=month
Programming language

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

Predict a property's list and sale price with custom overrides
This example shows predictions with custom property characteristics - 4 bedrooms and 200.5 square meters - overriding the original property data.
Request
Shell session
curl -X GET "https://api.houski.ca/predict?api_key=YOUR_API_KEY&bedroom=4&fields=estimate_sale_price,estimate_list_price&interior_sq_m=200.5&last=3&next=3&period=week&property_id=bd9c6fb24c31c772&start_date=2023-02-01"
TypeScript code
const houski_predict_data = async (): Promise<PredictResponse> => {

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

    const url = new URL('https://api.houski.ca/predict');
    url.searchParams.set('api_key', 'YOUR_API_KEY');
    url.searchParams.set('bedroom', '4');
    url.searchParams.set('fields', 'estimate_sale_price,estimate_list_price');
    url.searchParams.set('interior_sq_m', '200.5');
    url.searchParams.set('last', '3');
    url.searchParams.set('next', '3');
    url.searchParams.set('period', 'week');
    url.searchParams.set('property_id', 'bd9c6fb24c31c772');
    url.searchParams.set('start_date', '2023-02-01');

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

    return data;
}

(async () => {
let data: PredictResponse = await houski_predict_data();

// Log the response
console.log(data);
})();
Response
JSON
{
  "cache_hit": false,
  "cost_cents": 0.14000000059604645,
  "data": [
    {
      "predictions": [
        {
          "date": "2023-01-11",
          "estimate_list_price": 260367.5625,
          "estimate_rent_monthly": 2334.0,
          "estimate_sale_price": 264862.0
        },
        {
          "date": "2023-01-18",
          "estimate_list_price": 260367.5625,
          "estimate_rent_monthly": 2334.0,
          "estimate_sale_price": 256847.75
        },
        {
          "date": "2023-01-25",
          "estimate_list_price": 257849.578125,
          "estimate_rent_monthly": 2334.0,
          "estimate_sale_price": 256847.75
        },
        {
          "date": "2023-02-01",
          "estimate_list_price": 256610.734375,
          "estimate_rent_monthly": 2334.0,
          "estimate_sale_price": 256847.75
        },
        {
          "date": "2023-02-08",
          "estimate_list_price": 259896.453125,
          "estimate_rent_monthly": 2334.0,
          "estimate_sale_price": 257757.625
        },
        {
          "date": "2023-02-15",
          "estimate_list_price": 264231.78125,
          "estimate_rent_monthly": 2334.0,
          "estimate_sale_price": 257757.625
        },
        {
          "date": "2023-02-22",
          "estimate_list_price": 264231.78125,
          "estimate_rent_monthly": 2334.0,
          "estimate_sale_price": 257757.625
        }
      ],
      "property_id": "bd9c6fb24c31c772"
    }
  ],
  "error": "",
  "price_quote": false,
  "result_total": 1,
  "time_ms": 2780
}

Response type declarations

TypeScript code
interface PredictResponse {
    cache_hit: boolean;
    cost_cents: number;
    data: PredictData[];
    error: string;
    price_quote: boolean;
    result_total: number;
    time_ms: number;
}

interface PredictData {
    property_id: string;
    predictions: Prediction[];
}

interface Prediction {
    date: string;
    estimate_list_price?: number | null;
    estimate_sale_price?: number | null;
    estimate_rent_monthly?: number | null;
}

interface Pagination {
    current_page: number;
    has_next_page: boolean;
    has_previous_page: boolean;
    page_total: number;
}