# Get Forecast Aggregation

`GET /data/forecast/aggregations`

Get forecast aggregation data for up to 14 days of data at a time for a requested collection or aggregation.

## Parameters

### Query Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `hours` | integer (int32) | no | The number of hours to return in the response. |
| `period` | string | no | Length of the averaging period in ISO 8601 duration format. Default is PT30M. |
| `aggregation_id` | string | no | Unique identifier that belongs to the requested collection. |
| `collection_id` | string | no | Unique identifier for your collection. |
| `format` | string | no | Response format |
| `output_parameters` | string[] | no | The output parameters to include in the response. |

## Example request

### cURL

```bash
curl -X GET "https://api.solcast.com.au/data/forecast/aggregations?output_parameters=pv_estimate&collection_id=aust_state_total&aggregation_id=nsw" \
  -H "Authorization: Bearer $API_KEY"
```

### Python

```python
import requests

params = {
    "output_parameters": "pv_estimate",
}

response = requests.get(
    "https://api.solcast.com.au/data/forecast/aggregations", params=params,
    headers={"Authorization": "Bearer API_KEY"},
)
data = response.json()
```

## Example response (200)

```json
{
  "forecasts": [
    {
      "pv_estimate": 4445.5105,
      "period_end": "2026-07-30T01:00:00+00:00",
      "period": "PT60M"
    },
    {
      "pv_estimate": 4861.0085,
      "period_end": "2026-07-30T02:00:00+00:00",
      "period": "PT60M"
    },
    {
      "pv_estimate": 4882.349,
      "period_end": "2026-07-30T03:00:00+00:00",
      "period": "PT60M"
    }
  ]
}
```

## Responses

### 200 — OK

Schema: `ForecastAggregationResponse`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `forecasts` | object[] | no |  |

Source: /docs/section/grid-aggregations#getDataForecastAggregations
