---
title: "Chart data for current feed"
method: GET
path: "/{username}/feeds/{feed_key}/data/chart"
tags: ["Data"]
---

# Chart data for current feed

`GET /{username}/feeds/{feed_key}/data/chart`

The Chart API is what we use on io.adafruit.com to populate charts over varying timespans with a consistent number of data points. The maximum number of points returned is 480. This API works by aggregating slices of time into a single value by averaging.

All time-based parameters are optional, if none are given it will default to 1 hour at the finest-grained resolution possible.

## Path parameters

- `username` string, required
- `feed_key` string, required

## Query parameters

- `start_time` string, date-time
- `end_time` string, date-time
- `resolution` integer
- `hours` integer

## Response `200`

A JSON record containing chart data and the parameters used to generate it.

- object
  - `feed` object
    - `id` integer
    - `key` string
    - `name` string
  - `parameters` object
  - `columns` string[] — The names of the columns returned as data.
  - `data` array[] — The actual chart data.
    - string[]

## Other responses

- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `500` — Server Error

---

[API](https://skmtc.net/adafruit/apis/adafruit-io-rest-api.md) · [All operations](https://skmtc.net/adafruit/apis/adafruit-io-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/adafruit/adafruit-io-rest-api/versions/b16cd6123537/schema)
