µQuery in 90 seconds
Install µQuery with one line and start it with one command. Then POST a SQL query that reads a file on your machine, over HTTPS, in Amazon S3, in Google Cloud Storage or in an Iceberg catalog, and pick JSON, JSON Lines, CSV or Apache Arrow with the Accept header. Ship it as a single binary, a Docker image, on Kubernetes, AWS Lambda or Google Cloud Run.
Lightweight & Fast
µQuery was designed to be deployed on a serverless infrastructure.
Focus on performance
Written in Rust and optimized for performance. Query results are directly streamed back to the client.
Powered by DuckDB
Embeds DuckDB engine to use rich SQL features to query your data.
Run your first query
µQuery (uQuery) exposes a single POST / endpoint: send a SQL query as the request body and get the results back. This query reads a CSV file over HTTPS:
curl -X POST http://localhost:8080 \
-H "Accept: application/json" \
-H "Content-Type: text/plain" \
-d "select * from 'https://raw.githubusercontent.com/duckdb/duckdb-web/main/data/weather.csv'"
The response is a JSON array with one object per row. The file has no header row, so DuckDB names the columns column0 to column4:
[
{"column0":"San Francisco","column1":46,"column2":50,"column3":0.25,"column4":"1994-11-27"},
{"column0":"San Francisco","column1":43,"column2":57,"column3":0.0,"column4":"1994-11-29"},
{"column0":"Hayward","column1":37,"column2":54,"column4":"1994-11-29"}
]
Install µQuery and run this example in the Quick Start.
Use cases
Query remote files
Read files over HTTPS, in Amazon S3 or in Google Cloud Storage without downloading them first. The AWS and GCP credential chains handle authentication.
Query Iceberg tables
Attach an Iceberg REST catalog at startup, then query its tables directly by name.
Deploy serverless
Run µQuery on AWS Lambda or Google Cloud Run. The Rust binary comes with pre-loaded DuckDB extensions, so cold starts take milliseconds.
Pick a response format
Get JSON, JSON Lines, CSV or Apache Arrow IPC by setting the Accept header. Every format streams as soon as the first batch is ready.
Frequently asked questions
How do I install µQuery?
Run curl -fsSL https://install.uquery.dev | sh, use the fb64/uquery Docker image, download a prebuilt binary for Linux, macOS or Windows from GitHub Releases, or build it with cargo install. See Quick Start.
Which file formats can µQuery query?
CSV, JSON, Parquet, Excel and the other file formats DuckDB supports. Files can be local, on HTTPS, in Amazon S3 or in Google Cloud Storage, and you can also query the tables of an Iceberg catalog. See Query files.
Which response formats does µQuery support?
JSON (the default), JSON Lines, CSV and Apache Arrow IPC. Choose one with the Accept header. All formats are streamed, so large results start arriving right away. See Response formats.
How do I protect µQuery with an API key?
Start µQuery with --api-key <key> or set UQ_API_KEY. Clients then send the key as Authorization: Bearer <key> or X-API-Key: <key>, and requests without it get HTTP 401. Pass --api-key without a value to generate a random key at startup. See API key.
What can clients do with the default settings?
Only run single SELECT queries: other statements get HTTP 403 unless you add --allow-writes. Queries can read files in the current directory and remote https://, S3 and Google Cloud Storage URLs, which you can narrow with --allowed-directories and --allowed-urls. The binary only accepts local connections and rejects browser requests unless CORS is enabled. The query API is open until you set an API key. See Read-only queries.