Skip to content
DuckDB community extension

http_request

HTTP client extension for DuckDB with GET/POST/PUT/PATCH/DELETE and byte-range requests

01 / SETUP

Install and load

Run these commands in a Haybarn SQL session. The extension is available from the community repository.

Haybarn 2.0.0 · SQL
INSTALL http_request FROM community;
LOAD http_request FROM community;

Try it in a temporary SQL session with http_request already loaded. Queries run in this tab; examples using files or services need their own setup.

Using upstream DuckDB? Follow the maintainer’s installation instructions.

02 / QUERY

Usage example

Simple GET request

SQL
-- Simple GET request
SELECT http_get('https://example.com/');

-- Access response fields
SELECT
    r.status,
    r.content_type,
    r.content_length,
    r.cookies[1].name as first_cookie
FROM (SELECT http_get('https://example.com/') as r);

-- GET with custom headers
SELECT http_get('https://httpbin.org/get', headers := {'Accept': 'application/json'}).body;

-- Byte-range request for partial content
SELECT http_get(
    'https://example.com/largefile.gz',
    {'Range': byte_range(0, 1024)}
);

Provided by midwork-finds-jobs. Not yet verified on Haybarn 2.0.0.

Sample data & setup

About this extension

HTTP client extension providing scalar and table functions for making HTTP requests.

Project overview from the community descriptor.

Documentation and resources

Project and build details
Repository
midwork-finds-jobs/duckdb_http_request
License
MIT
Maintainers
onnimonni
Written in
C++
Build source
319d8af27df8
Build definition
Community descriptor