Visualize The Budget API
Tier-gated API for European government budgets, with detail beyond COFOG

The story
Eurostat publishes COFOG data per country, but in a form that takes days of preprocessing before the first chart appears. Statbel, NBB and Belgium's Federal Finance department fill in the gaps, each with its own format and cadence. Anyone wanting to work with European budget data builds a data pipeline first. Lefief built Visualize The Budget as a platform that ingests every source, normalises them into one schema, and exposes them through a single API. Tier-gated: Free for public COFOG data, Tier 1 for deeper breakdowns per ESA transaction type (compensation, social transfers, capital formation, intermediate consumption), Admin for ingest management. The question "where does one euro of government spending go" becomes answerable down to transaction type, with no pipeline of your own to build.
Considerations
- Granularity beyond COFOG
On top of COFOG functions, the schema breaks every amount down by ESA transaction type. No off-the-shelf public API serves the COFOG × ESA matrix in one call.
- Multi-source ingest, one schema
Eurostat, Statbel, NBB and Belgium's Federal Finance department feed in automatically and map onto one shared model. The API hides the fact that the sources report heterogeneously.
- OAuth2 with tier-gating
Google OIDC now, Apple ready for activation. Endpoints are gated via explicit annotations (Free, Tier 1, Admin) with rate limits in an AOP aspect, no ifs in business code.
- Onion architecture
The domain layer knows no Spring or JPA, dependencies point inward only. Replacing the database or web framework does not touch the business logic.
- Flyway, no ad-hoc DDL
Every schema change is a migration. Hibernate refuses to start when entity and database diverge, so dev and prod cannot quietly drift apart.
- Composable snapshot endpoint
A single /snapshot call with include tokens decides which panels come along (debt-composition, expenditure-composition, real-activity). Frontend picks, backend delivers in one request.
Result
Possible extensions
How Visualize The Budget API could grow further.
Visualisation frontend
Treemap breakdowns, timelines and country comparison built directly on top of the API.
Vintage revisions via asOf parameter
Time machine: query the data as it was published on a specific date, for research and audit purposes.
Apple Sign In as a second issuer
A second OIDC provider next to Google, plug-and-play within the existing multi-issuer model.
White-label deploy
A custom dataset, branding and issuer per client, sharing the same ingest and API engine.
See yourself in this project?
Let's talk.
Get in touch →