# Get Demand Data

## GET /v1/forecasts/models/{model\_id}/demand

> Get Demand Data

```json
{"openapi":"3.1.0","info":{"title":"PredictHQ Forecasts API (Public Preview)","version":"1.0.0"},"tags":[{"name":"Demand Data"}],"servers":[{"url":"https://api.predicthq.com"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"$API_KEY","description":"Enter your PredictHQ API key. The Bearer prefix is added automatically.\n\nWhen calling the API directly, send: `Authorization: Bearer <YOUR_API_KEY>` as documented at [https://docs.predicthq.com/api/overview/authenticating](https://docs.predicthq.com/api/overview/authenticating)\n"}},"parameters":{"LimitParam":{"name":"limit","in":"query","description":"Limit the number of results.","required":false,"schema":{"type":"integer","default":10}},"OffsetParam":{"name":"offset","in":"query","description":"Offset the results.","required":false,"schema":{"type":"integer","default":0}}},"schemas":{"SearchDemandResponse":{"properties":{"errors":{"items":{"type":"string"},"type":"array","title":"Errors","default":[]},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings","default":[]},"count":{"type":"integer","title":"Count"},"next":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next"},"previous":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Previous"},"results":{"items":{"$ref":"#/components/schemas/PublicDemand"},"type":"array","title":"Results"}},"type":"object","required":["count"],"title":"SearchDemandResponse"},"PublicDemand":{"properties":{"date":{"type":"string","format":"date","title":"Date"},"demand":{"type":"number","minimum":0,"title":"Demand"}},"type":"object","required":["date","demand"],"title":"PublicDemand"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/v1/forecasts/models/{model_id}/demand":{"get":{"tags":["Demand Data"],"summary":"Get Demand Data","operationId":"search_model_demand_models__model_id__demand_get","parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"string","title":"Model Id"}},{"name":"date.gt","in":"query","description":"Filters demand after the specified date (exclusive).\n\nExpected format: `YYYY-MM-DD`","required":false,"schema":{"type":"string","format":"date"}},{"name":"date.gte","in":"query","description":"Filters demand on or after the specified date.\n\nExpected format: `YYYY-MM-DD`.\n\nExample: `2025-01-01`","required":false,"schema":{"type":"string","format":"date"}},{"name":"date.lt","in":"query","description":"Filters demand before the specified date (exclusive).\n\nExpected format: `YYYY-MM-DD`.","required":false,"schema":{"type":"string","format":"date"}},{"name":"date.lte","in":"query","description":"Filters demand on or before the specified date.\n\nExpected format: `YYYY-MM-DD`.\n\nExample: `2025-01-07`","required":false,"schema":{"type":"string","format":"date"}},{"$ref":"#/components/parameters/LimitParam"},{"$ref":"#/components/parameters/OffsetParam"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchDemandResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## OpenAPI Spec

The OpenAPI spec for Forecasts API can be [found here](https://api.predicthq.com/docs/?urls.primaryName=Forecasts+API).

## Guides

* [Getting Started with Forecasts API](https://docs.predicthq.com/getting-started/guides/forecasts-api-guides/getting-started)
* [Understanding Forecast Accuracy Metrics](https://docs.predicthq.com/getting-started/guides/forecasts-api-guides/understanding-forecast-accuracy-metrics)
* [Troubleshooting Guide for Forecasts API](https://docs.predicthq.com/getting-started/guides/forecasts-api-guides/troubleshooting)
