Installation To use the DuckDB C API, download the
libduckdbarchive for your platform.The latest stable version of the DuckDB C API is 2.0.0.
DuckDB implements a custom C API modeled somewhat following the SQLite C API. The API is contained in the duckdb.h header. Continue to Startup & Shutdown to get started, or check out the Full API overview.
C API v2
Warning The C API v2 is not yet stable. Its interface may change in upcoming releases.
DuckDB 2.0 ships a revamped C API, which is considerably more powerful than its predecessor. Among others, it exposes components such as file systems and table functions to extensions.
The C API v2 is declared in the duckdb_v2.h header. Extensions that target it include duckdb_extension_v2.h instead of duckdb_extension.h; an extension targets either the v1 or the v2 C API, never both.
Before marking the C API v2 as stable, we would like to test it in the field. Please give it a try and send us your feedback!
Installation
The DuckDB C API can be installed as part of the libduckdb packages. Please see the installation page for details.