---
search:
  tags:
    - Usage
    - GET
seo:
  description: >-
    Returns what was used and what it cost in US dollars, from a whole
    organisation down to one… Reference for the GET /_luna/usage endpoint in the
    Luna API.
sidebar:
  label: Get usage and its cost
  badge: GET
title: Get usage and its cost
type: openapi-operation
---
Returns what was used and what it cost in US dollars, from a whole organisation down to one luna. You choose what each row stands for with `by` and narrow the rows with the filters. Rows come a page at a time, the most costly first, with the total of every row there is. An account sees the organisations it belongs to. An API key or a token needs `usage:read` and sees what it reaches.

`GET /_luna/usage`

**Responses**

- `200` — A page of usage.
- `default` — The request failed. The status says how and \`error.message\` says why.

Response example, 200:

```json
{
  "since": 0,
  "until": 0,
  "by": "string",
  "rows": [
    {
      "org": "string",
      "project": "string",
      "environment": "string",
      "tenant": "string",
      "type": "string",
      "luna": "string",
      "key": {},
      "index": true,
      "usage": {
        "property1": 0,
        "property2": 0
      },
      "cost": {
        "property1": 0.1,
        "property2": 0.1
      },
      "costUsd": 0.1,
      "listUsd": 0.1
    }
  ],
  "total": {
    "usage": {
      "property1": 0,
      "property2": 0
    },
    "cost": {
      "property1": 0.1,
      "property2": 0.1
    },
    "costUsd": 0.1,
    "listUsd": 0.1
  },
  "indexes": [
    {
      "usage": {
        "property1": 0,
        "property2": 0
      },
      "cost": {
        "property1": 0.1,
        "property2": 0.1
      },
      "costUsd": 0.1,
      "listUsd": 0.1,
      "name": "string"
    }
  ],
  "meters": {
    "property1": {
      "unit": "string",
      "scale": 0.1,
      "rate": 0,
      "included": 0
    },
    "property2": {
      "unit": "string",
      "scale": 0.1,
      "rate": 0,
      "included": 0
    }
  },
  "next": "string"
}
```
