---
title: Usage Metrics API
summary: Get information on billing usage metrics.
url: https://www.fastly.com/documentation/reference/api/account/billing-usage-metrics
---

Get information on billing usage metrics.

## Data model

| Field | Type | Description |
|-------|------|-------------|
| `customer_id` | string | Alphanumeric string identifying the customer. (Read-only) |
| `details` | array |  |
| `end_time` | string | Date and time (in ISO 8601 format) for termination point of a billing cycle, signifying the end of charges for a service or subscription. |
| `meta` | object | Pagination metadata. |
| `start_time` | string | Date and time (in ISO 8601 format) for initiation point of a billing cycle, signifying the start of charges for a service or subscription. |
| `unit` | string | The unit for the usage as shown on an invoice. If there is no explicit unit, this field will be "unit" (e.g., a request with <code>product_id</code> of 'cdn_usage' and <code>usage_type</code> of 'North America Requests' has no unit, and will return "unit"). |
| `usage_type` | string | The usage type identifier for the usage. This is a single, billable metric for the product. |
| `name` | string | Full name of the product usage type as it might appear on a customer's invoice. |
| `product_id` | string | The product identifier associated with the usage type. This corresponds to a Fastly product offering. |
| `limit` | integer | The number of invoices included in the response. |
| `next_cursor` | string | The token used to request the next set of results. |
| `sort` | string | The sort order of the invoices in the response. |
| `total` | integer | Total number of records available on the backend. |
| `last_updated_at` | string | The date when the usage metric was last updated. |
| `month` | string | The year and month of the usage element. |
| `quantity` | number | The quantity of the usage for the product. |
| `raw_quantity` | number | The raw units measured for the product. |
| `region` | string | The geographical area applicable for regionally based products. |

## API endpoints

### Retrieve service-level usage metrics for services with non-zero usage units

**GET** `/billing/v3/service-usage-metrics`

Returns product usage, broken down by service.

**Parameters:**

| Name | Type | In | Required | Description |
|------|------|----|---------|--------------|
| `cursor` | string | query | No | Cursor value from the <code>next_cursor</code> field of a previous response, used to retrieve the next page. To request the first page, this should be empty. |
| `end_month` | string | query | No | The end month for metrics. |
| `limit` | string | query | No | Number of results per page. The maximum is 10000. |
| `product_id` | string | query | No | The product identifier for the metrics returned (e.g., <code>cdn_usage</code>). This should be used along with <code>usage_type_name</code>. |
| `service` | string | query | No | The service identifier for the metrics being requested. |
| `start_month` | string | query | No | The start month for metrics. |
| `usage_type_name` | string | query | No | The usage type name for the metrics returned (e.g., <code>North America Requests</code>). This should be used along with <code>product_id</code>. |

### Get monthly usage metrics

**GET** `/billing/v3/usage-metrics`

Returns monthly usage metrics for customer by product.

**Parameters:**

| Name | Type | In | Required | Description |
|------|------|----|---------|--------------|
| `end_month` | string | query | Yes | The end month for metrics. |
| `start_month` | string | query | Yes | The start month for metrics. |

