---
title: "Get nutrient intake history."
method: GET
path: "/v1/nutrition/history"
---

# Get nutrient intake history.

`GET /v1/nutrition/history`

## Request

- Base URL: `https://api.cortexplus.io`
- URL: `https://api.cortexplus.io/v1/nutrition/history`
- Auth: HTTP bearer

Nutrient intake from logged meals, aggregated by day, week or month. Weekly and monthly values are daily averages over days with meals. Health-tagged memories hidden from the credential are excluded.

## Query parameters

- `from` string, date, required
- `to` string, date, required
- `granularity` 'day' | 'week' | 'month'
- `timezone` string

## Response `200`

Successful response.

- object
  - `from` string, date, required
  - `to` string, date, required
  - `granularity` 'day' | 'week' | 'month', required
  - `timezone` string, required
  - `nutrients` object[], required
    - `key` string, required
    - `unit` string, required
  - `buckets` object[], required
    - `start` string, date, required
    - `end` string, date, required
    - `days` integer, required: Days with at least one meal.
    - `meals` integer, required
    - `average` object, required: Daily average over days with meals.
    - `total` object, required: Values keyed by `<nutrient>:<unit>`, e.g. `enerc:kcal`, `procnt:g`, `vitc:mg`.
  - `summary` object, required
    - `days` integer, required: Days with at least one meal.
    - `meals` integer, required
    - `average` object, required: Daily average over days with meals.
    - `total` object, required: Values keyed by `<nutrient>:<unit>`, e.g. `enerc:kcal`, `procnt:g`, `vitc:mg`.

## Other responses

- `default`: Request failed.

---

[API](https://skmtc.dev/cortexplus/apis/cortexplus-rest-api.md) · [All operations](https://skmtc.dev/cortexplus/apis/cortexplus-rest-api/llms.txt) · [OpenAPI document](https://skmtc.dev/cortexplus/apis/cortexplus-rest-api/revisions/2d04f1593663?raw)
