v8

latestOpenAPI 3.0.0raw.githubusercontent.com2026-06-0931639.5 KB
SQL

Execute a read-only SQL query against ClickHouse

post/v0/sql

Request body

querystring required

Example request

{
  "query": "SELECT * FROM markets LIMIT 10"
}

Response

Query executed successfully

dataobject[]

Example response

{
  "data": [
    {
      "column1": "value1"
    }
  ],
  "meta": {
    "columns": [
      {
        "name": "column1",
        "type": "String"
      }
    ],
    "rows": 1,
    "statistics": {
      "elapsed": 0.005,
      "rows_read": 100,
      "bytes_read": 5000
    }
  }
}