!

API recipes

Practical examples for using the Houski API.

Examples

Rental income historical trend

Programming language

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

View rental income trend
Historical monthly rental income estimates over the past 24 months. Useful for rental market trends and seasonal variation.
Request
Shell session
curl -X GET "https://api.houski.ca/predict?api_key=YOUR_API_KEY&fields=estimate_rent_monthly&last=24&period=month&property_id=10004f7afe0c1946&start_date=2025-07-01"
TypeScript code
const houski_recipe_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('fields', 'estimate_rent_monthly');
    url.searchParams.set('last', '24');
    url.searchParams.set('period', 'month');
    url.searchParams.set('property_id', '10004f7afe0c1946');
    url.searchParams.set('start_date', '2025-07-01');

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

    return data;
}

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

// Log the response
console.log(data);
})();
Response
JSON
{
  "cache_hit": true,
  "cost_cents": 0.25,
  "data": [
    {
      "predictions": [
        {
          "date": "2023-07-12",
          "estimate_rent_monthly": 3150.5224609375
        },
        {
          "date": "2023-08-11",
          "estimate_rent_monthly": 3150.5224609375
        },
        {
          "date": "2023-09-10",
          "estimate_rent_monthly": 3150.5224609375
        },
        {
          "date": "2023-10-10",
          "estimate_rent_monthly": 3247.3828125
        },
        {
          "date": "2023-11-09",
          "estimate_rent_monthly": 3247.3828125
        },
        {
          "date": "2023-12-09",
          "estimate_rent_monthly": 3247.3828125
        },
        {
          "date": "2024-01-08",
          "estimate_rent_monthly": 3247.3828125
        },
        {
          "date": "2024-02-07",
          "estimate_rent_monthly": 3247.3828125
        },
        {
          "date": "2024-03-08",
          "estimate_rent_monthly": 3247.3828125
        },
        {
          "date": "2024-04-07",
          "estimate_rent_monthly": 3247.3828125
        },
        {
          "date": "2024-05-07",
          "estimate_rent_monthly": 3247.3828125
        },
        {
          "date": "2024-06-06",
          "estimate_rent_monthly": 3247.3828125
        },
        {
          "date": "2024-07-06",
          "estimate_rent_monthly": 3150.5224609375
        },
        {
          "date": "2024-08-05",
          "estimate_rent_monthly": 3247.3828125
        },
        {
          "date": "2024-09-04",
          "estimate_rent_monthly": 3247.3828125
        },
        {
          "date": "2024-10-04",
          "estimate_rent_monthly": 3247.3828125
        },
        {
          "date": "2024-11-03",
          "estimate_rent_monthly": 3247.3828125
        },
        {
          "date": "2024-12-03",
          "estimate_rent_monthly": 3247.3828125
        },
        {
          "date": "2025-01-02",
          "estimate_rent_monthly": 3247.3828125
        },
        {
          "date": "2025-02-01",
          "estimate_rent_monthly": 3247.3828125
        },
        {
          "date": "2025-03-03",
          "estimate_rent_monthly": 3247.3828125
        },
        {
          "date": "2025-04-02",
          "estimate_rent_monthly": 3247.3828125
        },
        {
          "date": "2025-05-02",
          "estimate_rent_monthly": 3247.3828125
        },
        {
          "date": "2025-06-01",
          "estimate_rent_monthly": 3247.3828125
        },
        {
          "date": "2025-07-01",
          "estimate_rent_monthly": 3247.3828125
        }
      ],
      "property_id": "10004f7afe0c1946"
    }
  ],
  "error": "",
  "price_quote": false,
  "result_total": 1,
  "time_ms": 33
}