About Legalize
Legalize is an open-source platform that turns official legislation into version-controlled, searchable, structured data. It currently covers 32 countries across Europe and Latin America, with 825,010 laws and 996,375 tracked reforms.
Who builds this
Enrique López Castillo, a software engineer from Burgos, Spain. He builds and maintains the entire platform alone: the data pipeline, the web app, and the API.
Why it exists
Finding the current version of a law means navigating a maze of PDFs, annexes, and cross-references. Amendments are published separately, and consolidated texts lag behind.
Change management is a solved problem in software engineering — it's called Git. Legalize applies the same idea to legislation: every law becomes a file, every reform a commit with its real publication date. git diff shows you exactly what changed.
The project launched on Hacker News, reached the front page with 225+ comments, and people from a dozen countries asked to add their legislation.
Where the data comes from
All legislation is fetched directly from each country's official gazette or open data portal. The pipeline is fully automated:
- Fetch — country-specific parsers extract laws from official sources (BOE, Légifrance, SFS, RIS, Likumi.lv, among others)
- Transform — raw data is converted to structured Markdown with metadata (title, publication date, status, department, jurisdiction)
- Commit — each reform is recorded as a git commit, creating a full version history
- Publish — git repos are synced into a PostgreSQL database for full-text search, filtering, and API access
The pipeline is open source. The git repositories are the source of truth — you can verify any data point yourself.
Coverage is not uniform, and we would rather say so here than let you find out on a law you were relying on. Each country's parser has been through a different amount of scrutiny, and only some have passed a deep review against the current onboarding playbook. Which ones, and what is still open on the rest, is tracked in the open: see the Review column of the country table in the pipeline repo. Corpus quality is fixed where the corpus lives — in the open-source pipeline and the country repos — so that table, not this site, is where the work and its state are visible.
Press & recognition
Get in touch — whether you want to add your country's legislation, use the API, or just have a question.