Romania's company registry has no free API — so I built one (4.2M firms, MCP + REST)
Description and use
Guide to building an API for the Romanian company registry: converting large CSV dumps into a fast SQLite database with full‑text search and exposing it via REST and MCP.
Problem
Romanian company registry data is available only as large CSV dumps with no programmatic query interface, hindering efficient data retrieval for lead‑generation tools.
Outcome
The project transforms raw ONRC CSV dumps into a 3.5 GB SQLite database with fast, diacritic‑aware search, accessible via REST and MCP, enabling rapid company data retrieval for AI agents.
Workflow
- Download monthly CSV dumps from data.gov.ro
- Stream CKAN CSVs into SQLite using load_onrc.py
- Load CAEN and status decode tables with load_nomenclatoare.py
- Load 2025 financial statements keyed by CUI with load_financiare.py
- Create diacritic‑insensitive FTS5 index for fast search
- Expose data through REST API (onrc-api.adrianhomelab.com) and MCP server (hermes.adrianhomelab.com/mcp)
- Implement monetization flag for paid financial data
Evidence
Romania publishes its entire registry as open data. Every month, data.gov.ro drops a snapshot: 4,196,860 companies, 19.3M CAEN activity records, 3.68M legal representatives, 4.64M status entries.
I built an FTS5 full‑text index with diacritic‑insensitive folding: ă â î ș ț fold to a a i s t on both the index and the query.
I exposed it two ways: A REST API (onrc-api.adrianhomelab.com) and an MCP server (hermes.adrianhomelab.com/mcp).
- Record date: 2026-09-14T06:15:33.231Z