> For the complete documentation index, see [llms.txt](https://doc.moost.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.moost.io/technical-integration/cloud-to-cloud-integration/intelligence-service-integration/energy-forecast.md).

# Energy Forecast

The forecast endpoint returns predicted energy values generated by MOOST's Machine Learning models. These forecasts enable forward-looking features in your Households Dashboard, such as "Low solar generation expected tomorrow" or consumption planning widgets.

## A building’s energy forecast data

> Get energy forecast data of a building.

```json
{"openapi":"3.0.3","info":{"title":"MOOST Public API","version":"latest"},"servers":[{"url":"https://api.moost.io"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","name":"bearerAuth","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"EnergyForecast":{"type":"object","properties":{"timestamp":{"type":"integer","format":"int64"},"forecastTimestamp":{"type":"integer","format":"int64"},"value":{"type":"number","format":"float"}}}}},"paths":{"/buildings/{customerBuildingId}/energy-forecast/v1":{"get":{"tags":["PublicAPI"],"summary":"A building’s energy forecast data","description":"Get energy forecast data of a building.","operationId":"getEnergyForecast","parameters":[{"name":"customerBuildingId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-zA-Z0-9:._-]{1,100}$"}},{"name":"eventType","in":"query","description":"Target energy forecast event type, which defines what data to select.\n","required":true,"schema":{"type":"string","enum":["ENERGY_CONSUMPTION_FORECAST_1H","ENERGY_CONSUMPTION_FORECAST_24H","ENERGY_CONSUMPTION_FORECAST_TOMORROW","ENERGY_CONSUMPTION_FORECAST_DAY_AFTER_TOMORROW","ENERGY_GENERATION_FORECAST_1H","ENERGY_GENERATION_FORECAST_24H","ENERGY_GENERATION_FORECAST_TOMORROW","ENERGY_GENERATION_FORECAST_DAY_AFTER_TOMORROW"]}},{"name":"from","in":"query","description":"The starting time (inclusive) in epoch seconds of the forecast time window.\n<br/>\nRemark: The time window between `from` and `to` must not exceed one month.\n","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"to","in":"query","description":"The final time (exclusive) in epoch seconds of the forecast time window.\n","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EnergyForecast"}}}}}}}}}}
```

## Relationship to Context Services

The energy forecasts exposed by this API are generated by MOOST's Context Services — specifically the **Power Consumption Forecast** and the **Solar Production Forecast** (also known as Power Generation Forecast). These services apply machine learning algorithms to historical data to produce their predictions.

The Context Services also generate power-level forecast events (e.g. `POWER_GENERATION_FORECAST_1H`, `POWER_CONSUMPTION_FORECAST_24H`) that are used internally by the rule engine for the Engagement Service. The energy-forecast API provides the energy-level equivalents in a format optimised for dashboard rendering.

{% hint style="info" %}
The Power Consumption Forecast and Power Generation Forecast are available in the **Premium** subscription. The Solar Production Forecast (weather-based) is available for all customers who provide a ZIP code and geolocation for their buildings.
{% endhint %}

## Dashboard Usage

Forecasts are typically rendered in the Households Dashboard as:

* **Generation forecast chart** — showing expected solar production for the next 1–2 days, helping users plan energy-intensive activities.
* **Consumption forecast chart** — showing expected household consumption, useful for alerting users to unusually high predicted consumption.
* **Combined outlook** — overlaying generation and consumption forecasts to visualise upcoming self-sufficiency or grid dependency periods.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://doc.moost.io/technical-integration/cloud-to-cloud-integration/intelligence-service-integration/energy-forecast.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
