---
title: "Get Datapoint Consumption by date range"
method: GET
path: "/api/v2/consumption"
tags: ["Consumption"]
---

# Get Datapoint Consumption by date range

`GET /api/v2/consumption`

Return the user's datapoint consumption within a date window and the user's effective monthly datapoint limit.

**Inputs**
- `start_at` and `end_at` are both dates (in format `YYYY-MM-DD`).
- Internally, `start_at` is expanded to the start of the day of that date in the current Django timezone; `end_at` is expanded to the end of the day of that date in the current Django timezone.

**Defaults**
- If `start_at` is omitted, it defaults to the first day of the current month at 00:00:00 (current timezone).
- If `end_at` is omitted, it defaults to now (the current datetime in the current timezone).

**Behavior**
- The window is inclusive: `start_at ≤ timestamp ≤ end_at`.

**Response**
- `monthly_limit` (string): `'Unlimited'` if there is no limit for the user, the numeric limit as a string otherwise.
- `consumption` (integer): total datapoints accessed in the window.
- `initial_date` / `final_date` (date): the date components of the resolved `start_at` and `end_at` values for the windows

## Query parameters

- `end_at` string, date
- `start_at` string, date

## Response `200`

- Consumption
  - `monthly_limit` string, required — Monthly datapoint consumption limit for the account
  - `consumption` integer, required — Number of datapoints consumed within the requested window
  - `initial_date` string, date, required — Start date used to calculate consumption
  - `final_date` string, date, required — End date used to calculate consumption

## Other responses

- `400`
- `401`
- `403`
- `429`

---

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