---
title: "Tag Configuration Cardinality Estimator"
method: GET
path: "/api/v2/metrics/{metric_name}/estimate"
tags: ["Metrics"]
---

# Tag Configuration Cardinality Estimator

`GET /api/v2/metrics/{metric_name}/estimate`

## Request

- Base URL: `https://api.datadoghq.com`
- URL: `https://api.datadoghq.com/api/v2/metrics/{metric_name}/estimate`
- Auth: API key in header `DD-API-KEY` and API key in header `DD-APPLICATION-KEY`

Returns the estimated cardinality for a metric with a given tag, percentile and number of aggregations configuration using Metrics without Limits&trade;.

## Path parameters

- `metric_name` string, required

## Query parameters

- `filter[groups]` string
- `filter[hours_ago]` integer
- `filter[num_aggregations]` integer
- `filter[pct]` boolean
- `filter[timespan_h]` integer

## Response `200`

Success

- MetricEstimateResponse: Response object that includes metric cardinality estimates.
  - `data` MetricEstimate: Object for a metric cardinality estimate.
    - `attributes` MetricEstimateAttributes: Object containing the definition of a metric estimate attribute.
      - `estimate_type` 'count_or_gauge' | 'distribution' | 'percentile': Estimate type based on the queried configuration. By default, `count_or_gauge` is returned. `distribution` is returned for distribution metrics without percentiles enabled. Lastly, `percentile` is returned if `filter[pct]=true` is queried with a distribution metric.
      - `estimated_at` string, date-time: Timestamp when the cardinality estimate was requested.
      - `estimated_output_series` integer: Estimated cardinality of the metric based on the queried configuration.
    - `id` string: The metric name for this resource.
    - `type` 'metric_cardinality_estimate': The metric estimate resource type.

## Other responses

- `400`: API error response.
- `403`: API error response.
- `404`: API error response.
- `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)
