ClickHouse HTTP Interface API

The ClickHouse HTTP Interface API from ClickHouse — 1 operation(s) for clickhouse http interface.

Operations 2

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET / Run a read-only SQL query over HTTP GET · Health check or execute query #
Ask an LLM
“How do I run a SELECT against ClickHouse by putting the SQL in the URL?”
“Can I choose JSON or CSV output for a query sent as a GET request?”
Tell an agent
Run the query {query} through a GET request and return the rows.
Execute {query} against database {database} via the URL and format the result as {default_format}.
POST / Execute SQL or insert data via HTTP POST · Execute query or insert data #
Ask an LLM
“How do I insert rows into a ClickHouse table over HTTP by streaming them in the request body?”
“Can I send a long SQL statement in the POST body instead of the URL?”
Tell an agent
POST the statement {query} to the server and execute it, including writes like CREATE or INSERT.
Stream my data into the table using the partial insert {query} in database {database}.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/clickhouse:clickhouse-clickhouse-http-interface-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

clickhouse-clickhouse-http-interface-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: ClickHouse HTTP Interface API
  description: 'ClickHouse HTTP interface for executing SQL queries, inserting data, and

    monitoring server health. Authentication is performed with HTTP Basic, URL

    parameters, or the X-ClickHouse-User / X-ClickHouse-Key headers.'
  version: 1.0.0
servers:
- url: http://localhost:8123
  description: Default local ClickHouse HTTP listener
security:
- basicAuth: []
tags:
- name: ClickHouse HTTP Interface
paths:
  /:
    get:
      summary: Health check or execute query
      description: 'With no parameters returns "Ok." When a `query` parameter is supplied,

        executes the SQL statement and returns the result in the configured

        format.'
      parameters:
      - $ref: '#/components/parameters/QueryParam'
      - $ref: '#/components/parameters/DatabaseParam'
      - $ref: '#/components/parameters/Format'
      - $ref: '#/components/parameters/SessionId'
      - $ref: '#/components/parameters/SessionTimeout'
      - $ref: '#/components/parameters/Compress'
      responses:
        '200':
          description: Query result or health response
          content:
            text/plain:
              schema:
                type: string
            application/json:
              schema:
                type: object
      tags:
      - ClickHouse HTTP Interface
      operationId: getRoot
      x-operation-id-source: derived
    post:
      summary: Execute query or insert data
      description: 'Submit a SQL query in the request body, or stream data for INSERT with

        the partial query in the URL (e.g. `?query=INSERT INTO table FORMAT

        JSONEachRow`).'
      parameters:
      - $ref: '#/components/parameters/QueryParam'
      - $ref: '#/components/parameters/DatabaseParam'
      - $ref: '#/components/parameters/Format'
      - $ref: '#/components/parameters/Decompress'
      requestBody:
        required: false
        content:
          text/plain:
            schema:
              type: string
          application/octet-stream:
            schema:
              type: string
              format: binary
      responses:
        '200':
          description: Query result or insert acknowledgment
          content:
            text/plain:
              schema:
                type: string
            application/json:
              schema:
                type: object
      tags:
      - ClickHouse HTTP Interface
      operationId: postRoot
      x-operation-id-source: derived
components:
  parameters:
    SessionId:
      name: session_id
      in: query
      schema:
        type: string
    SessionTimeout:
      name: session_timeout
      in: query
      schema:
        type: integer
    Compress:
      name: compress
      in: query
      schema:
        type: integer
        enum:
        - 0
        - 1
    Decompress:
      name: decompress
      in: query
      schema:
        type: integer
        enum:
        - 0
        - 1
    Format:
      name: default_format
      in: query
      description: Output format (TabSeparated, JSON, CSV, Pretty, etc.)
      schema:
        type: string
    DatabaseParam:
      name: database
      in: query
      description: Default database
      schema:
        type: string
    QueryParam:
      name: query
      in: query
      description: SQL statement to execute
      schema:
        type: string
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
    clickhouseHeaders:
      type: apiKey
      in: header
      name: X-ClickHouse-User