---
title: Use InfluxDB client libraries and SQL or InfluxQL to query data
description: Use the InfluxDB 3 client libraries with SQL or InfluxQL to query data stored in InfluxDB. InfluxDB 3 client libraries are language-specific packages that integrate with your application. Execute queries and retrieve data and metadata over the Flight+gRPC protocol, and then process data using tools in the language of your choice.
url: https://docs.influxdata.com/influxdb3/cloud-dedicated/query-data/execute-queries/client-libraries/
estimated_tokens: 2355
product: InfluxDB Cloud Dedicated
version: cloud-dedicated
---

# Use InfluxDB client libraries and SQL or InfluxQL to query data

Use the InfluxDB 3 client libraries with SQL or InfluxQL to query data stored in InfluxDB. InfluxDB 3 client libraries are language-specific packages that integrate with your application. Execute queries and retrieve data and metadata over the Flight+gRPC protocol, and then process data using tools in the language of your choice.

### [Use Go](/influxdb3/cloud-dedicated/query-data/execute-queries/client-libraries/go/)

Use the `influxdb3-go` Go package and SQL or InfluxQL to query data stored in InfluxDB. Execute queries and retrieve data over the Flight+gRPC protocol, and then process data using common Go tools.

```go
import (
  "context"
  "github.com/InfluxCommunity/influxdb3-go/v2/influxdb3"
)

func Query() error {
    client, err := influxdb3.New(influxdb3.ClientConfig{
        Host:       "https://cluster-id.a.influxdb.io",
        Token:      "DATABASE_TOKEN",
        Database:   "DATABASE_NAME",
    })

    defer func(client *influxdb3.Client) {
        err := client.Close()
        if err != nil {
            panic(err)
        }
    }(client)

    query := `SELECT *
        FROM home
        WHERE time >= '2022-01-02T08:00:00Z'
        AND time <= '2022-01-02T20:00:00Z'`

    iterator, err := client.Query(context.Background(), query)
    ...
}
```

### [Use Python](/influxdb3/cloud-dedicated/query-data/execute-queries/client-libraries/python/)

Use the `influxdb_client_3` Python module and SQL or InfluxQL to query data stored in InfluxDB. Execute queries and retrieve data over the Flight+gRPC protocol, and then process data using common Python tools.

```py
from influxdb_client_3 import InfluxDBClient3

# Instantiate an InfluxDB client
client = InfluxDBClient3(
    host='cluster-id.a.influxdb.io',
    token='DATABASE_TOKEN',
    database='DATABASE_NAME'
)

# Execute the query and return an Arrow table
table = client.query(
    query="SELECT * FROM home",
    language="sql"
)

# Return query results as a markdown table
print(table.to_pandas().to_markdown())
```

#### Related

-   [InfluxDB 3 API client libraries](/influxdb3/cloud-dedicated/reference/client-libraries/v3/)
