Technology

From law to code: how Legalize-es turned Spain's official gazette into open data

Over 12,000 Spanish laws, now on GitHub, version-controlled like software. A real-world example of what open data done well looks like.

Published on August 1, 2026 · The mitza.es team

Looking up a specific law in Spain's official gazette (the BOE), comparing versions, or tracing how a regulation has changed over time has traditionally been a slow, unintuitive task. The Legalize-es project has taken an unexpected approach: treat Spanish legislation as if it were source code.

What exactly Legalize-es is

It's an open GitHub repository that has converted more than 12,000 Spanish laws and regulations, both national and regional, into structured plain-text files in Markdown format. Each law is organized into folders by scope, and the project follows the ELI (European Legislation Identifier) standard to identify every regulation consistently with the rest of Europe.

The most interesting part is how it stays up to date: an automated system periodically monitors the BOE's Consolidated Legislation API, extracts the text from the official PDF documents, and cleans up the odd formatting until it's left as readable plain text.

Why version-control laws like software

The most elegant part of the project is its use of version control: every legislative reform is logged as a commit, exactly like a change in a piece of software. This makes it possible to look up, compare and trace how a law has evolved over time with the same ease a developer uses to review a program's change history.

A real example of open data done right

Many public administrations publish open data in formats that are barely usable: scanned PDFs, unstructured tables, or portals that are hard to navigate. Legalize-es proves the opposite is possible: when public data is structured with the end user in mind, it becomes a real tool, not just a transparency exercise on paper.

  • Structured, open-format data instead of data trapped in PDFs.
  • Automated updates, with no dependency on someone doing it by hand.
  • An accessible change history, useful for researchers, journalists and law firms.
  • A recognized standard (ELI) that makes it easy to interoperate with other European systems.

What any business can take from this example

You don't need to be a public body to apply this same logic: any business managing catalogs, pricing, documentation or content that changes over time can benefit from structuring that data clearly instead of leaving it scattered across loose documents. It's the same idea behind our web analytics and SEO audit services: data is only useful once it's organized so someone can actually act on it.

Does your business hold data nobody can properly search through?

We help you structure and present it so people can actually use it.

No spam. No sales calls. Just your personalised reply.