Get Forecast

Get forecast values for an existing model.

Please note that phq_features can only be retrieved if you have also purchased the Features product.

Get Forecast

get
Authorizations
Path parameters
model_idstringRequired
Query parameters
date.gtstring · dateOptional

Filters forecast results after the specified date (exclusive).

Expected format: YYYY-MM-DD

date.gtestring · dateOptional

Filters forecast results on or after the specified date.

Expected format: YYYY-MM-DD.

Example: 2025-01-01

date.ltstring · dateOptional

Filters forecast results before the specified date (exclusive).

Expected format: YYYY-MM-DD.

date.ltestring · dateOptional

Filters forecast results on or before the specified date.

Expected format: YYYY-MM-DD.

Example: 2025-01-07

limitintegerOptional

Limit the number of results.

Default: 10
offsetintegerOptional

Offset the results.

Default: 0
Responses
200
Successful Response
application/json
get
GET /v1/forecasts/models/{model_id}/forecast HTTP/1.1
Host: api.predicthq.com
Authorization: Bearer $API_KEY
Accept: */*
{
  "errors": [
    "text"
  ],
  "warnings": [
    "text"
  ],
  "count": 1,
  "next": "text",
  "previous": "text",
  "results": [
    {
      "date": "2025-07-05",
      "forecast": 1,
      "phq_explainability": {
        "events": [
          {
            "id": "text",
            "title": "text",
            "category": "text",
            "start_local": "2025-07-05T00:57:31.748Z",
            "end_local": "2025-07-05T00:57:31.748Z",
            "phq_rank": 1,
            "local_rank": 1
          }
        ]
      },
      "phq_features": [
        {
          "name": "text",
          "value": 1
        }
      ]
    }
  ]
}

OpenAPI Spec

The OpenAPI spec for Forecasts API can be found here.

Guides

Last updated

Was this helpful?