/predict

GET
http://127.0.0.1:8080/predict
View the AVM information page for information on this endpoint's prediction accuracy.

Predict property metrics over time such as list price, sale price, and rent, on any date from January 2021 to today. The models are trained on sales, listings, and rents from January 2021 onward and do not forecast, so a request for a date outside that window is refused.

Supports single and batch requests. Batch mode predicts multiple properties at once, useful for portfolio trend analysis.

Override property characteristics via query parameters to test hypothetical scenarios - for example, predicting value changes from added bedrooms or square footage.

What this costs

$0.001 per predicted value for a typical field. One value is one field, on one date, for one property, so the cost is your field count times your date count times the number of properties matched. Two fields over twelve months for one property is 26 predicted values, $0.026.

A predicted value costs exactly what that field costs as stored data on the properties endpoint, so the price you already know for a field is the price you pay here. All three predictable fields, list price, sale price, and monthly rent, cost the same, and adding price_quote=true tells you the exact figure before you run it. For a full valuation with a report behind it, use the automated valuation model endpoint instead.

Example use cases

  1. Governments planning affordable housing initiatives
  2. Property managers setting competitive rent prices
  3. Buyers comparing an asking price against the predicted sale price
  4. Sellers setting a list price from the predicted list and sale prices
  5. Analysts feeding predictions into economic models
  6. Lenders evaluating default risk against current values
  7. Developers building real-time prediction features
  8. Researchers studying housing markets and urban risks

Request parameters

Note: Query parameters (bedroom, den, etc.) override 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_dateNo (default: today)StringStart date for prediction in YYYY-MM-DD format, from 2021-01-01 to today
fieldsYesStringAny predictable field
periodNo (default: month)StringThe time period for the predictions - day, week, month, year
nextNo (default: 0)IntegerHow many periods after the start_date to predict. Maximum 1000. A range that reaches past today is refused, because the models do not forecast.
lastNo (default: 0)IntegerHow many previous periods before the start_date to predict. Maximum 1000. A range that reaches before 2021-01-01 is refused.
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_centsFloatCost 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_totalIntegerNumber of properties found for the property_id values you sent
time_msIntegerTime taken for the request to complete in milliseconds

PredictData object

Per-property prediction data:

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

Prediction object

Each prediction point:

NameTypeDescription
dateStringDate of the prediction in YYYY-MM-DD format
estimate_list_priceFloat, omitted when not requestedEstimated listing price in dollars. Left out when the field was not requested in the fields parameter, or when the model could not produce a value
estimate_sale_priceFloat, omitted when not requestedEstimated sale price in dollars. Left out when the field was not requested in the fields parameter, or when the model could not produce a value
estimate_rent_monthlyFloat, omitted when not requestedEstimated monthly rent in dollars. Left out when the field was not requested in the fields parameter, or when the model could not produce a value

Example requests and responses

Property override example

Predict with modified characteristics:

http://127.0.0.1:8080/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 "http://127.0.0.1:8080/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('http://127.0.0.1:8080/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": true,
  "cost_cents": 1.399999976158142,
  "data": [
    {
      "predictions": [
        {
          "date": "2023-01-11",
          "estimate_list_price": 293540.59375,
          "estimate_sale_price": 237957.3125
        },
        {
          "date": "2023-01-18",
          "estimate_list_price": 293540.59375,
          "estimate_sale_price": 238551.484375
        },
        {
          "date": "2023-01-25",
          "estimate_list_price": 299312.78125,
          "estimate_sale_price": 238551.484375
        },
        {
          "date": "2023-02-01",
          "estimate_list_price": 299312.78125,
          "estimate_sale_price": 238590.15625
        },
        {
          "date": "2023-02-08",
          "estimate_list_price": 288472.5625,
          "estimate_sale_price": 238189.34375
        },
        {
          "date": "2023-02-15",
          "estimate_list_price": 291858.53125,
          "estimate_sale_price": 238189.34375
        },
        {
          "date": "2023-02-22",
          "estimate_list_price": 291858.53125,
          "estimate_sale_price": 238189.34375
        }
      ],
      "property_id": "bd9c6fb24c31c772"
    }
  ],
  "error": "",
  "price_quote": false,
  "result_total": 1,
  "time_ms": 97
}

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