﻿---
title: PromQL reference
description: Query metrics in Elasticsearch time series data streams with PromQL through the ES|QL runtime and a Prometheus-compatible HTTP API.
url: https://www.elastic.co/elastic/docs-builder/docs/2927/reference/query-languages/promql
products:
  - Elasticsearch
applies_to:
  - Elastic Cloud Serverless: Preview
  - Elastic Stack: Preview since 9.4
---

# PromQL reference
The [Prometheus Query Language (PromQL)](https://prometheus.io/docs/prometheus/latest/querying/basics/) is a functional query language to select and aggregate metrics.
<warning>
  This functionality is in technical preview and might be changed or removed in a future release.
  Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.
</warning>


## What is PromQL in Elasticsearch?

Elasticsearch supports PromQL queries for metrics in [time series data streams](https://docs-v3-preview.elastic.dev/elastic/docs-builder/docs/2927/manage-data/data-store/data-streams/time-series-data-stream-tsds) (TSDS).
PromQL support is not limited to metrics ingested through [Prometheus remote write](https://docs-v3-preview.elastic.dev/elastic/docs-builder/docs/2927/manage-data/data-store/data-streams/tsds-ingest-prometheus-remote-write).
All TSDS are supported, including metrics ingested through [OpenTelemetry Protocol (OTLP)](https://docs-v3-preview.elastic.dev/elastic/docs-builder/docs/2927/manage-data/data-store/data-streams/tsds-ingest-otlp), and the [bulk API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-bulk).
Elasticsearch supports PromQL in two ways: through a [Prometheus-compatible HTTP API](https://www.elastic.co/elastic/docs-builder/docs/2927/reference/query-languages/promql/promql-http-api) (for Prometheus-compatible clients) and as a [`PROMQL` source command](https://www.elastic.co/elastic/docs-builder/docs/2927/reference/query-languages/esql/commands/promql) inside piped ES|QL queries that allow post-processing through regular ES|QL.

## How does it work?

When you use the Prometheus-compatible HTTP API or embed PromQL in an ES|QL query through the `PROMQL` source command, Elasticsearch parses PromQL into ES|QL logical plans and evaluates those plans against TSDS metrics.
Elasticsearch uses the same ES|QL compute engine for PromQL as for the [`TS` source command](https://www.elastic.co/elastic/docs-builder/docs/2927/reference/query-languages/esql/commands/ts).

## In this section

- [HTTP API](https://www.elastic.co/elastic/docs-builder/docs/2927/reference/query-languages/promql/promql-http-api): Prometheus-compatible `/_prometheus/` endpoints for queries and discovery.
- [Limitations](https://www.elastic.co/elastic/docs-builder/docs/2927/reference/query-languages/promql/promql-limitations): How behavior differs from Prometheus, including unsupported PromQL constructs, HTTP behavior, instant-query nuances, staleness semantics, exemplars, and related topics.