Client APIs
API Reference Overview
> **Warning.  ** Deprecation notice. This method is scheduled for removal in a future release.  
Fetches a data chunk from the duckdb_result. This function should be called repeatedly until the result is exhausted.  
The result must be destroyed with `duckdb_destroy_data_chunk`.  
This function supersedes all `duckdb_value` functions, as well as the `duckdb_column_data` and `duckdb_nullmask_data`
functions. It results in significantly better performance, and should be preferred in newer code-bases.  
If this function is used, none of the other result functions can be used and vice versa (i.e., this function cannot be
mixed with the legacy result functions).  
Use `duckdb_result_chunk_count` to figure out how many chunks there are in the result.  
###### Syntax {#docs:api:c:types::syntax}  
```c
duckdb_data_chunk duckdb_result_get_chunk(
duckdb_result result,
idx_t chunk_index
);
```  
###### Parameters {#docs:api:c:types::parameters}  
* `result`: The result object to fetch the data chunk from.
* `chunk_index`: The chunk index to fetch from.  
###### Return Value {#docs:api:c:types::return-value}  
The resulting data chunk. Returns `NULL` if the chunk index is out of bounds.  
<br>