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

> ## Agent Instructions
> Automate.ax automations are TypeScript programs.
> Use Bun for installation and command examples.
> Use Automate.ax for the product name and automate.ax for the package, CLI, and domain.
> Treat documented public APIs as current; do not invent transitional or deprecated names.

# Search metrics

> Returns metric names associated with one exact observed tag value.

`axiom.searchMetrics` returns metric names associated with one exact observed tag value. Set `startTime` and `endTime` to bound discovery outside the default 30-minute window.

```ts automations/axiom-search-metrics.automation.ts theme={null}
import { automation, onHttpRequest } from "automate.ax"
import { axiom } from "automate.ax/axiom"

export default automation("Search metrics", () => {
  onHttpRequest({ scope: "automation" })
  axiom.searchMetrics({ datasetName: "metrics", value: "api" })
})
```

## Inputs

`datasetName` and the exact non-empty tag `value` are required. Omit `startTime` and `endTime` to search the previous 30 minutes, or provide RFC3339 timestamps for a fixed window. `edgeUrl` defaults to the US East 1 (AWS) edge at `"https://us-east-1.aws.edge.axiom.co"`. Set it to the edge that stores the dataset; a custom edge URL must use HTTPS on `*.edge.axiom.co`.

## Output

Returns the matching metric names as `string[]`. No metric associated with the value in the selected window returns `[]`.

## Permission and failures

The API token needs the dataset-level `query|read` capability for `datasetName`. Axiom returns an error when the metrics dataset is missing or inaccessible, and rejects invalid time windows. Request-rate limits return `429`, while exhausted query-cost limits return `430`. Automate.ax uses Axiom's reset timing when available.
