---
title: "Retrieve usage"
method: GET
path: "/usage"
tags: ["usage"]
---

# Retrieve usage

`GET /usage`

## Request

- Base URL: `http://localhost:3030`
- URL: `http://localhost:3030/usage`
- Auth: HTTP bearer

Returns requests and credits used in the period, in total and by day, endpoint and API key.

## Query parameters

- `days` integer: Number of days to include, ending now, between 1 and 365. Defaults to 30.

## Response `200`

The usage summary.

- UsageSummary: Requests and credits over a period.
  - `object` 'usage_summary', required: The object's type. Always `usage_summary`.
  - `organization_id` string, required: The organization's id.
  - `since` string, date-time, required: The start of the period.
  - `until` string, date-time, required: The end of the period: the time of the request.
  - `requests` integer, required: Requests made in the period.
  - `credits_spent` integer, required: Credits spent in the period.
  - `free_requests` integer, required: Successful requests that cost no credits: free endpoints, repeat requests within a day, empty results and reads in Explorer.
  - `credit_balance` integer, required: The current credit balance.
  - `included_credits` integer, required: Credits included with the plan each billing period. `0` without a plan.
  - `daily` UsagePoint[], required: Requests and credits by day, oldest first.
    - `day` string, date-time, required: The day, at midnight UTC.
    - `requests` integer, required: Requests made that day.
    - `credits` integer, required: Credits spent that day.
  - `by_endpoint` Breakdown[], required: Requests and credits by endpoint, most credits first. At most 20.
    - `name` string, required: The endpoint, such as `/v1/parcel`, or the API key's name. `Console`, `MCP` or `OAuth` for requests made without an API key.
    - `requests` integer, required: Requests made.
    - `credits` integer, required: Credits spent.
  - `by_key` Breakdown[], required: Requests and credits by API key, most credits first. At most 20. Requests made without a key are grouped as `Console`, `MCP` or `OAuth`.
    - `name` string, required: The endpoint, such as `/v1/parcel`, or the API key's name. `Console`, `MCP` or `OAuth` for requests made without an API key.
    - `requests` integer, required: Requests made.
    - `credits` integer, required: Credits spent.

## Other responses

- `401`: `credential_missing`, `credential_invalid` or `credential_expired`. The request has no valid credential.
- `422`: `parameter_invalid`, `id_malformed` or a cursor code. A parameter is missing or invalid. `errors` lists each one.

---

[API](https://skmtc.dev/placestack/apis/placestack-api.md) · [All operations](https://skmtc.dev/placestack/apis/placestack-api/llms.txt) · [OpenAPI document](https://skmtc.dev/placestack/apis/placestack-api/revisions/0ccdf0882668?raw)
