Skip to main content
chDB provides a native C/C++ API for embedding ClickHouse functionality directly into your applications. The API supports both simple queries and advanced features like persistent connections and streaming query results.

Installation

1

Install libchdb

Install the chDB library on your system:
2

Include headers

Include the chDB header in your project:

C Examples

Basic connection and queries

Streaming queries

Working with different data formats

C++ example

Error handling best practices

GitHub repository

Last modified on July 13, 2026