> ## Documentation Index
> Fetch the complete documentation index at: https://docs.codex.io/llms.txt
> Use this file to discover all available pages before exploring further.

# UsageData

> Response returned by `usageData`: the compute units charged for the request that carried the field. UsageData type reference: every field and its type.

## GraphQL

```
type UsageData {
  items: [UsageDataItem!]!
  total: UsageDataMetrics!
}

type UsageDataMetrics {
  count: String!
  bytes: String!
  durationMs: String!
  computeUnits: String!
}

type UsageDataItem {
  resource: String!
  entityType: String
  metrics: UsageDataMetrics!
}
```

### Used By

**Returned by**

* [usageData](/api-reference/queries/usagedata.md): Returns the compute units charged for the request that carries this field, so you can see what a query costs before you run it at volume. Add it to any query; the field itself is free. `total` is the whole request; `items` lists each priced component. When the whole request was free (every root field errored), all values are zero.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.