---
title: Use the InfluxDB v1 HTTP query API and InfluxQL to query data
description: Use the InfluxDB v1 HTTP query API to query data in InfluxDB Cloud Dedicated with InfluxQL.
url: https://docs.influxdata.com/influxdb3/cloud-dedicated/query-data/execute-queries/influxdb-v1-api/
estimated_tokens: 710
product: InfluxDB 3 Cloud
version: cloud
publisher: InfluxData
canonical: https://docs.influxdata.com/influxdb3/cloud-dedicated/query-data/execute-queries/influxdb-v1-api/
date: '2026-05-15T15:46:14-06:00'
lastmod: '2026-05-15T15:46:14-06:00'
---

* InfluxQL

Use the InfluxDB v1 HTTP query API to query data in InfluxDB Cloud Dedicated
with InfluxQL.

The examples below use **cURL** to send HTTP requests to the InfluxDB v1 HTTP API,
but you can use any HTTP client.

#### InfluxQL feature support

InfluxQL is being rearchitected to work with the InfluxDB 3 storage engine.
This process is ongoing and some InfluxQL features are still being implemented.
For information about the current implementation status of InfluxQL features,
see [InfluxQL feature support](/influxdb3/cloud-dedicated/reference/influxql/feature-support/).

Use the v1 `/query` endpoint and the `GET` request method to query data with InfluxQL:

```
GET https://cluster-id.a.influxdb.io/query
```

Provide the following with your request:

* **Headers:**
  * **Authorization:** `Bearer DATABASE_TOKEN`

* **Query parameters:**
  * **db**: the database to query
  * **rp**: Optional: the retention policy to query
  * **q**: URL-encoded InfluxQL query

```sh
curl --get https://cluster-id.a.influxdb.io/query \
  --header "Authorization: Bearer DATABASE_TOKEN" \
  --data-urlencode "db=DATABASE_NAME" \
  --data-urlencode "q=SELECT * FROM home"
```

Replace the following configuration values:

* `DATABASE_NAME`:
  the name of the [database](/influxdb3/cloud-dedicated/admin/databases/) to query.
* `DATABASE_TOKEN`:
  a [database token](/influxdb3/cloud-dedicated/admin/tokens/#database-tokens)with *read* access to the specified database.

#### Authenticate with username and password

If using basic authentication or query string authentication (username and password)
to interact with the v1 HTTP query API, provide the following credentials:

* **username**: an arbitrary string *(InfluxDB Cloud Dedicated ignores the username)*
* **password**: a [database token](/influxdb3/cloud-dedicated/admin/tokens/#database-tokens)with *read* access to the specified database.

#### Basic Auth ####

```sh
curl --get https://cluster-id.a.influxdb.io/query \
  --header "Authorization: Basic ignored:DATABASE_TOKEN" \
  --data-urlencode "db=DATABASE_NAME" \
  --data-urlencode "q=SELECT * FROM home"
```

```sh
curl --get https://cluster-id.a.influxdb.io/query \
  --data-urlencode "u=ignored" \
  --data-urlencode "p=DATABASE_TOKEN" \
  --data-urlencode "db=DATABASE_NAME" \
  --data-urlencode "q=SELECT * FROM home"
```

## Return results as JSON or CSV

By default, the `/query` endpoint returns results in **JSON**, but it can also
return results in **CSV**. To return results as CSV, include the `Accept` header
with the `application/csv` or `text/csv` MIME type:

```sh
curl --get https://cluster-id.a.influxdb.io/query \
  --header "Authorization: Token DATABASE_TOKEN" \
  --header "Accept: application/csv" \
  --data-urlencode "db=DATABASE_NAME" \
  --data-urlencode "q=SELECT * FROM home"
```

#### Related
