[hypequery](https://hypequery.com/) › hypequery | Embedded analytics on ClickHouse
Index for agents: https://hypequery.com/llms.txt
Canonical page: https://hypequery.com/

> hypequery (not hyperquery) is an open-source embedded analytics toolkit for ClickHouse: define metrics once in TypeScript or Python, serve dashboards, APIs and agents.

[npmdownloads / month228.1K](https://www.npmjs.com/org/hypequery)

[Open sourceApache 2.0](https://github.com/hypequery/hypequery)

# Connect ClickHouse. Ship analytics.

Embedded analytics and agents on a semantic layer you define in code. Run it in your own backend today. hypequery cloud, the hosted option, is in early access.

[Get started](https://hypequery.com/docs)

## Give your agents numbers you can trust.

[Read why](https://hypequery.com/blog/seven-companies-one-pattern-why-every-scaled-clickhouse-deployment-looks-the-same) Uber, Cloudflare, and Instacart each built their own analytics layer on ClickHouse. hypequery gives you that layer as code you own.

## One model behind every answer

Your dashboards, APIs and agents like Claude all query the same model, with the same tenant rules.

ClickHouse Cloud, chDB, or self-hosted

Published v1 · orders, customers, refunds, events

### APIs

Every dataset is an authenticated endpoint with OpenAPI, for any frontend, mobile app or service.

POST /api/analytics/datasets/orders/query

```
{
  "dimensions": ["country"],
  "measures": ["revenue"],
  "filters": [{ "field": "month",
    "operator": "eq", "value": "2026-09" }]
}
```

200 OKapplication/json

```
{ "data": [
  { "country": "GB", "revenue": "64000.00" },
  { "country": "US", "revenue": "48000.00" },
  { "country": "DE", "revenue": "16000.00" }
] }
```

[Read more](https://hypequery.com/docs/http-openapi)

### Embedded analytics

Ship embedded analytics with typed React hooks and your own components.

Revenue

$128,000USD

1 Sep30 Sep

By country

GB$64,000

US$48,000

DE$16,000

[Read more](https://hypequery.com/docs/react/getting-started)

### AI agents

Connect Claude, ChatGPT, or your favourite model over MCP. They only see what you publish.

claude

Claude Code

hypequery MCP connected

\~/northwind-app

\>

? for shortcuts

[Read more](https://hypequery.com/docs/mcp/overview)

### Embedded chat

Coming soon

Let your customers ask questions about their own data, inside your app. Chat answers from the same model as your dashboards, APIs and agents: the same question gets the same number everywhere.

Northwind Analytics

Ask about your data…

## Runs where your app runs

hypequery is a library, not another service to deploy. Mount it in the framework you already use, in TypeScript or Python. Same datasets, same endpoints, same tenant rules.

TypeScript

- [Next.jsRoute handler](https://hypequery.com/docs/nextjs)
- [React RouterResource route](https://hypequery.com/docs/fetch#react-router)
- [SvelteKitServer route](https://hypequery.com/docs/fetch#sveltekit)
- [ExpressBeside your routes](https://hypequery.com/docs/nodejs#express)
- [FastifyEncapsulated plugin](https://hypequery.com/docs/nodejs#fastify)
- [HonoCatch-all route](https://hypequery.com/docs/fetch#hono)
- [Cloudflare WorkersFetch handler](https://hypequery.com/docs/fetch#cloudflare-workers)
- [Bun and DenoBuilt-in servers](https://hypequery.com/docs/fetch#bun-and-deno)
- [Node jobsIn-process, no HTTP](https://hypequery.com/docs/embedded-runtime)

Python

- [FastAPIMounted ASGI app](https://hypequery.com/docs/python/fastapi)
- [DjangoURLconf, sync or async](https://hypequery.com/docs/python/django)
- [FlaskBlueprint](https://hypequery.com/docs/python/flask)
- [StarletteMount](https://hypequery.com/docs/python/serving#mount-in-any-asgi-or-wsgi-app)
- [Uvicorn, GunicornAny ASGI or WSGI server](https://hypequery.com/docs/python/serving#mount-in-any-asgi-or-wsgi-app)
- [Notebooks and jobsStraight into pandas](https://hypequery.com/docs/python/dataframes)

## Built for production from day one

Tenant isolation, joins, access control, and caching are part of the model, so every tool gets them for free.

01

### Keep customers isolated

Every query is scoped to the signed-in customer. No tenant context? The query is rejected.

Authenticated tenant`acme`

WHERE tenant_id = 'acme'

No tenant context? Query rejected.

[Explore tenant isolation](https://hypequery.com/docs/datasets/multi-tenancy)

02

### Encode your business logic

Ratios, period comparisons, and named segments. Bucket by day, week, or month, in any timezone.

Average order value$80

revenue / orders

Revenue vs. previous month+23.1%

EnterpriseMonthUTC

[Explore calculations](https://hypequery.com/docs/datasets/measures)

03

### Connect your business data

Declare relationships once. hypequery writes the joins.

orderscustomers

Measure`revenue`

Group by`customer.country`

[Explore relationships](https://hypequery.com/docs/datasets/relationships)

04

### Control what's queryable

Publish only the fields you choose. Agent tools reject anything else.

Published query contract

revenueDeclared measure

internal_marginNot exposed

[Explore query controls](https://hypequery.com/docs/datasets/tool-generation)

05

### Review changes like code

Every change is a diff you can read, whether AI or a person made it.

Refine net revenue

−revenue

+revenue − refunds

[Explore model definitions](https://hypequery.com/docs/datasets/defining-datasets)

06

### Fast, without leaking

Repeated questions are cached, with separate cache entries for every tenant.

Repeated queryCache hit

Fresh for60 seconds

Separate keys for every tenant

[Explore caching](https://hypequery.com/docs/datasets/caching)

## hypequery cloud: go live in minutes

Cloud turns your model into a hosted API and MCP server the moment you publish. Update the model in one click, and roll it back just as fast. It is in early access: join the waitlist and we will reach out when your project can go live.

Ask in plain English. Every answer comes from your published measures, scoped to the tenant, with the query one click away.

analytics/Publishedv42/Chatanswers from Published v42Connect

Which countries drove revenue growth in September?

Queried orders.revenue by countrySep vs Aug 2026

Scoped to tenantorg_id = acme

Revenue grew $59,853 (+4.5%) to $1,401,930. The United States drove over half of it, and Japan was the only country to dip.

Revenue change by countrySep vs Aug

United States+$31,240

Germany+$14,105

United Kingdom+$9,870

France+$6,412

Japan−$1,774

Answered from Published v42orders.revenueorders.countryView query

## Ship your analytics layer today

Start open source in your own backend. A hosted option, hypequery cloud, is coming soon.

[Get started](https://hypequery.com/docs)
