---
title: "Get hourly usage by product family"
method: GET
path: "/api/v2/usage/hourly_usage"
tags: ["Usage Metering"]
---

# Get hourly usage by product family

`GET /api/v2/usage/hourly_usage`

## Request

- Base URL: `https://api.datadoghq.com`
- URL: `https://api.datadoghq.com/api/v2/usage/hourly_usage`
- Auth: one of:
  - API key in header `DD-API-KEY` and API key in header `DD-APPLICATION-KEY`
  - OAuth 2
    - Authorization code: `/oauth2/v1/authorize`
    - Token URL: `/oauth2/v1/token` scopes: `usage_read`

Get hourly usage by product family.

## Query parameters

- `filter[timestamp][start]` string, date-time, required
- `filter[timestamp][end]` string, date-time
- `filter[product_families]` string, required
- `filter[include_descendants]` boolean
- `filter[include_connected_accounts]` boolean
- `filter[include_breakdown]` boolean
- `filter[versions]` string
- `page[limit]` integer
- `page[next_record_id]` string

## Response `200`

OK

- HourlyUsageResponse: Hourly usage response.
  - `data` HourlyUsage[]: Response containing hourly usage.
    - `attributes` HourlyUsageAttributes: Attributes of hourly usage for a product family for an org for a time period.
      - `account_name` string: The account name.
      - `account_public_id` string: The account public ID.
      - `measurements` HourlyUsageMeasurement[]: List of the measured usage values for the product family for the org for the time period.
        - `usage_type` string: Type of usage.
        - `value` integer, nullable: Contains the number measured for the given usage_type during the hour.
      - `org_name` string: The organization name.
      - `product_family` string: The product for which usage is being reported.
      - `public_id` string: The organization public ID.
      - `region` string: The region of the Datadog instance that the organization belongs to.
      - `timestamp` string, date-time: Datetime in ISO-8601 format, UTC. The hour for the usage.
    - `id` string: Unique ID of the response.
    - `type` 'usage_timeseries': Type of usage data.
  - `meta` HourlyUsageMetadata: The object containing document metadata.
    - `pagination` HourlyUsagePagination: The metadata for the current pagination.
      - `next_record_id` string, nullable: The cursor to get the next results (if any). To make the next request, use the same parameters and add `next_record_id`.

## Other responses

- `400`: Bad Request
- `403`: Forbidden - User is not authorized
- `429`: Too many requests

---

[API](https://skmtc.dev/datadog/apis/datadog-api-v2-collection.md) - [All operations](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/llms.txt) - [OpenAPI document](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/revisions/da68bf029e4c?raw)
