> ## Documentation Index
> Fetch the complete documentation index at: https://docs.communityhub.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# GET /v1/variables/{dataHubId}/data — Retrieve Variable Data

> Retrieve time-series data for a single variable, with parameters for time range, resolution, units, and standardization.

<Warning>
  This page previously documented a `POST /query` SQL endpoint. That's not the real design — retrieval is a plain GET against a specific variable, not an arbitrary query language.
</Warning>

## Endpoint

```text theme={null}
GET /v1/variables/{dataHubId}/data
```

The organization is not part of the path — `dataHubId` alone identifies the variable, and access is governed by the requesting user's permissions rather than an org scoped to the token. See [Authentication](/api-reference/authentication).

## Parameters

| Parameter         | Description                                                                                           |
| ----------------- | ----------------------------------------------------------------------------------------------------- |
| `start`, `end`    | ISO 8601 timestamps bounding the requested range. Maximum range per request: 1 year.                  |
| `resolution`      | One of: raw, minute, 15-minute, hourly, daily, weekly, monthly, yearly.                               |
| `units`           | Optional unit conversion, limited to conversions Data Hub explicitly supports.                        |
| `standardization` | Optional standardization (e.g. per square foot, per occupant), limited to supported standardizations. |
| `format`          | `json` (only format at launch).                                                                       |

## Worked example

Request: hourly outdoor air temperature from a specific weather station, for a full semester, as JSON.

```bash theme={null}
curl "https://api.communityhub.cloud/dh/public/v1/variables/wx-002-temp-outdoor/data?start=2025-08-25T00:00:00Z&end=2025-12-19T00:00:00Z&resolution=hourly&format=json" \
  -H "Authorization: Bearer <token>"
```

Example response (abbreviated):

```json theme={null}
{
  "data_hub_id": "wx-002-temp-outdoor",
  "units": "degC",
  "resolution": "hourly",
  "data": [
    { "timestamp": "2025-08-25T00:00:00Z", "value": 21.4 },
    { "timestamp": "2025-08-25T01:00:00Z", "value": 20.9 }
  ]
}
```

<Note>
  This page is a stub for the exact error response shape — that hasn't been finalized in the source spec yet.
</Note>

See [Rate Limits](/api-reference/rate-limits) for the request budget (60 req/min per token, 1-year max range).
