ClickHouse ClickHouse HTTP Interface API

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

Operations 2

GET / Health check or execute query
POST / Execute query or insert data

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-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
    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
components:
  parameters:
    DatabaseParam:
      name: database
      in: query
      description: Default database
      schema:
        type: string
    Decompress:
      name: decompress
      in: query
      schema:
        type: integer
        enum:
        - 0
        - 1
    SessionTimeout:
      name: session_timeout
      in: query
      schema:
        type: integer
    SessionId:
      name: session_id
      in: query
      schema:
        type: string
    Compress:
      name: compress
      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
    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