---
title: Query data
description: Query data stored in InfluxDB 3 Clustered using InfluxQL via the v1-compatible /query endpoint. Use Flight+gRPC for SQL or InfluxQL queries with Arrow format output.
url: https://docs.influxdata.com/influxdb3/clustered/api/data-api/query-data/
estimated_tokens: 3529
product: InfluxDB Clustered
version: clustered
---

[Download Clustered Data API Spec](/openapi/influxdb-clustered-data-api.yml)

Query data stored in InfluxDB 3 Clustered using InfluxQL via the v1-compatible `/query` endpoint. Use Flight+gRPC for SQL or InfluxQL queries with Arrow format output.

GET `/query`

### Query using the InfluxDB v1 HTTP API

Queries InfluxDB using InfluxQL with InfluxDB v1 request and response formats.

#### Parameters

##### Query parameters

`u` string

The InfluxDB 1.x username to authenticate the request.

`p` string

The InfluxDB 1.x password to authenticate the request.

`db` required string

The [database](/influxdb3/clustered/admin/databases/) to query data from.

`rp` string

The retention policy to query data from. For more information, see [InfluxQL DBRP naming convention](/influxdb3/clustered/admin/databases/create/#influxql-dbrp-naming-convention).

`q` required string

The InfluxQL query to execute. To execute multiple queries, delimit queries with a semicolon (`;`).

`epoch` string

A unix timestamp precision. Formats timestamps as [unix (epoch) timestamps](/influxdb3/clustered/reference/glossary/#unix-timestamp) with the specified precision instead of [RFC3339 timestamps](/influxdb3/clustered/reference/glossary/#rfc3339-timestamp) with nanosecond precision.

Allowed values: `ns` , `u` , `µ` , `ms` , `s` , `m` , `h`

##### Header parameters

`Zap-Trace-Span` string

OpenTracing span context

`Accept` string

Allowed values: `application/json` , `application/csv` , `text/csv` , `application/x-msgpack`

Default: `application/json`

`Accept-Encoding` string

The content encoding (usually a compression algorithm) that the client can understand.

Allowed values: `gzip` , `identity`

Default: `identity`

`Content-Type` string

Allowed values: `application/json`

Example request [Ask AI about this](#)

```sh
curl --request GET \
  "https://cluster-host.com/query?db=DB&q=Q" \
  --header "Authorization: Bearer INFLUX_TOKEN"
```

#### Responses

200 Query results

`results` object\[\]

A resultset object that contains the `statement_id` and the `series` array.

Except for `statement_id`, all properties are optional and omitted if empty. If a property is not present, it is assumed to be `null`.

`error` string

`partial` boolean

True if the resultset is not complete–the response data is chunked; otherwise, false or omitted.

`series` object\[\]

An array of series objects–the results of the query. A series of rows shares the same group key returned from the execution of a statement.

If a property is not present, it is assumed to be `null`.

`columns` string\[\]

An array of column names

`name` string

The name of the series

`partial` boolean

True if the series is not complete–the response data is chunked; otherwise, false or omitted.

`tags` object

A map of tag key-value pairs. If a tag key is not present, it is assumed to be `null`.

`values` array\[\]

An array of rows, where each row is an array of values.

`statement_id` integer

An integer that represents the statement’s position in the query. If statement results are buffered in memory, `statement_id` is used to combine statement results.

429

Too many requests.

-   Returns this error if queriers are resource constrained.

default Error processing query

`code` required string

code is the machine-readable error code.

Allowed: `internal error` , `not implemented` , `not found` , `conflict` , `invalid` , `unprocessable entity` , `empty value` , `unavailable` , `forbidden` , `too many requests` , `unauthorized` , `method not allowed` , `request too large` , `unsupported media type`

`err` string

Stack of errors that occurred during processing of the request. Useful for debugging.

`message` string

Human-readable message.

`op` string

Describes the logical code operation when the error occurred. Useful for debugging.

#### Related

-   [Get started querying InfluxDB](/influxdb3/clustered/get-started/query/)
-   [Execute queries](/influxdb3/clustered/query-data/execute-queries/)
-   [InfluxDB 3 API client libraries](/influxdb3/clustered/reference/client-libraries/v3/)
