AI's that work with law can't work well with raw APIs like this (neither do lawyers). Just giving the latest text is not enough (you can get the latest directly from official free portals).
What you want is interfaces that retrieve official statutes/judgments and link every claim back to the exact paragraph. Otherwise your AI hallucinates those references and get them wrong.
Hi HN. AI models often get European law wrong, quoting old versions or making up text. Pandex gives them the official text instead.
It covers EU, Germany, France, Netherlands, UK, Austria, Switzerland, Luxembourg and ECHR case law, with every past version of each law. Updated every night.
Works as an MCP server, no key needed:
claude mcp add --transport http pandex https://api.pandex.io/mcp
Exactly, and if you were talking about state law, you wouldn’t call it "US law", "law of the US", "USA law" and so on - you’d specifically mention that it applies to only some specific states.
Also the EU is not a federation and whether the countries' constitutions are "below" EU regulations is "a heated discussion" (whereas US federal law basically always tops state law, they have the Supremacy Clause). If any member state would disagree with EU regulations, it can "just" leave the EU - unilaterally, a state leaving the US on the other hand is unconstitutional.
That is a ridiculous idea, I’m sorry. Laws aren’t programs or mathematical statements, and they are interpreted by courts using much more than the words on the page. You can’t feed them into a program and “look for loopholes.”
You're absolutely right! This is precisely why loopholes in tax systems, which come into being as a result of legislature, have remained a purely theoretical threat to government budgets, all over the world.
Tax loopholes are mostly intentional. If the government actually wanted to close them, they would; it's not that hard. There's just no political will to do it.
My wife is a lawyer. She has specialized in international law as it relates to financial institutions for decades. She gets really bent out of shape by people who’ve just read the law books and think that they know everything there is to know. These are the same type of people who are usually stupid enough to try to defend themselves in court. Her sister’s ex-husband is one of those.
My wife always says that the law is like a tripod. There is one leg that is formed by the laws as they are written down. There is a second leg that is formed by the precedents and case law that have developed around the written law. And then there is the third leg which is formed by the courts as they apply the law to individual cases.
And exactly how this works out is different by country and locality within that country. That’s why each state in the US has their own bar exam, and their own bar associations. That’s why most cities and other localities have their own bar associations, and they may have their own additional bar exams.
For example, in China, if all you did was read the laws as written in the books, you might think they have a very modern legal system, with lots of reasonable choices. But I am told that the law in China is actually whatever the judge says it is, and their judgement is final. So, you can ignore the other two legs of the tripod in China. And who appoints those judges? Who promotes those judges? To whom do those judges all kowtow?
In France, the official laws are written only in French. Anything you read in a different language is a translation, and not the actual law itself. There are other differences up in France as well.
So, having a system that lets you search the written laws and the precedents that have formed around them, that is a very useful thing. And it’s a very expensive service called LexisNexis. And it’s even more useful if it lets you look at the history of the way that a particular judge has ruled on specific cases. Which I believe that LexisNexis does.
If you can give me an API to the laws as they are written and nothing else, that might have some value for some people. But it’s hard to compete against LexisNexis or other legal research tools in this space.
Law text alone aren't enough to know how the rules are applied. So it needs court decisions too. That wouldn't be enough either because ton of things aren't in either laws or courts.
You need to see stuff like refusals to issue a permit or licence, waiting times or what not.
A lot of things aren't in public record or any record at all
"This database tracks legal decisions in cases where generative AI produced hallucinated content – typically fake citations, but also other types of AI-generated arguments. It does not track the (necessarily wider) universe of all fake citations or use of AI in court filings."
I wonder how this deals with temporal edge cases, i.e. when an ordinance says "valid from 1st of January 2027" (happens when copy/pasting EU law into national), but the ordinance is promulgated after the 1st of January.
Countries deal with this differently, i.e. in Switzerland this means the law is in effect the day it was properly promulgated, in Austria its the day after. Who's going to be the poor shmuck dealing with the unavoidable hallucinations that come from naive slop interpretations of our laws?
How does it work internally? Is this agent to agent with a MCP in between? From my experience this domain is pretty hard to get right. Often multiple LLM passes are needed over different kinds of structured data. RAG, indices, raw texts, DB search, with extra validations and more.
We have a similar internal systems. Each question takes about 2 to 5 minutes and costs about 1 to 2 dollars in tokens. Simply injecting raw law books into your LLM will not have enough reliability.
AI's that work with law can't work well with raw APIs like this (neither do lawyers). Just giving the latest text is not enough (you can get the latest directly from official free portals).
What you want is interfaces that retrieve official statutes/judgments and link every claim back to the exact paragraph. Otherwise your AI hallucinates those references and get them wrong.
Competition (European):
https://venato.ai
https://ovviously.com
https://digibeetle.eu
Hi HN. AI models often get European law wrong, quoting old versions or making up text. Pandex gives them the official text instead.
It covers EU, Germany, France, Netherlands, UK, Austria, Switzerland, Luxembourg and ECHR case law, with every past version of each law. Updated every night.
Works as an MCP server, no key needed: claude mcp add --transport http pandex https://api.pandex.io/mcp
Which countries should we add next?
Poland would be useful to me, if you did it right (I would need to be sure you are getting the latest and correct data).
This is a great service for EU companies working with AI agents but also want to try to stay compliant in early stages. Please add Sweden next.
It would be really cool to have something like this for individual US states as well.
And Italy please
Why say EU and then list specific EU countries? Super confusing. So does it support all EU countries or not?
There's EU law and there's EU member countries with their own laws.
Exactly, just as there is US federal law and also state laws.
Exactly, and if you were talking about state law, you wouldn’t call it "US law", "law of the US", "USA law" and so on - you’d specifically mention that it applies to only some specific states.
Also the EU is not a federation and whether the countries' constitutions are "below" EU regulations is "a heated discussion" (whereas US federal law basically always tops state law, they have the Supremacy Clause). If any member state would disagree with EU regulations, it can "just" leave the EU - unilaterally, a state leaving the US on the other hand is unconstitutional.
The site lacks an imprint which is legally required in a number of EU countries.
Also, why is this .io and not .eu?
And a picture of the US Supreme Court? This all looks like AI-generated slop.
A picture of the US Supreme Court seems a bit out of place for a product focused on European Law?
You're absolutely right! Let me fix that for you.
This is great! I can see good ways to find inconsistencies In national implementations.
As well, there was recently a post on HN on using Lean to look for loopholes in US laws — this will make the same thing possible in Europe.
That is a ridiculous idea, I’m sorry. Laws aren’t programs or mathematical statements, and they are interpreted by courts using much more than the words on the page. You can’t feed them into a program and “look for loopholes.”
You're absolutely right! This is precisely why loopholes in tax systems, which come into being as a result of legislature, have remained a purely theoretical threat to government budgets, all over the world.
Can you be more specific? What loophole do you have in mind?
The comment said, “Laws aren’t programs or mathematical statements”, not, “Laws don't exist”.
Tax loopholes are mostly intentional. If the government actually wanted to close them, they would; it's not that hard. There's just no political will to do it.
My wife is a lawyer. She has specialized in international law as it relates to financial institutions for decades. She gets really bent out of shape by people who’ve just read the law books and think that they know everything there is to know. These are the same type of people who are usually stupid enough to try to defend themselves in court. Her sister’s ex-husband is one of those.
My wife always says that the law is like a tripod. There is one leg that is formed by the laws as they are written down. There is a second leg that is formed by the precedents and case law that have developed around the written law. And then there is the third leg which is formed by the courts as they apply the law to individual cases.
And exactly how this works out is different by country and locality within that country. That’s why each state in the US has their own bar exam, and their own bar associations. That’s why most cities and other localities have their own bar associations, and they may have their own additional bar exams.
For example, in China, if all you did was read the laws as written in the books, you might think they have a very modern legal system, with lots of reasonable choices. But I am told that the law in China is actually whatever the judge says it is, and their judgement is final. So, you can ignore the other two legs of the tripod in China. And who appoints those judges? Who promotes those judges? To whom do those judges all kowtow?
In France, the official laws are written only in French. Anything you read in a different language is a translation, and not the actual law itself. There are other differences up in France as well.
So, having a system that lets you search the written laws and the precedents that have formed around them, that is a very useful thing. And it’s a very expensive service called LexisNexis. And it’s even more useful if it lets you look at the history of the way that a particular judge has ruled on specific cases. Which I believe that LexisNexis does.
If you can give me an API to the laws as they are written and nothing else, that might have some value for some people. But it’s hard to compete against LexisNexis or other legal research tools in this space.
And having a legal system that was as precise (and inflexible) as code (law as code) would be a nightmare.
Almost every legal outcome is, appropriately, a balance of the facts and the factors you listed.
Related to this, this repo contains all Spanish law in markdown format: https://github.com/legalize-dev/legalize-es
It should be trivial to extend Pandex with this :).
Areas like laws, it's crucial to be accurate and avoid hallucinations. I'm curious if AI will do a good job at this.
Law text alone aren't enough to know how the rules are applied. So it needs court decisions too. That wouldn't be enough either because ton of things aren't in either laws or courts.
You need to see stuff like refusals to issue a permit or licence, waiting times or what not.
A lot of things aren't in public record or any record at all
If your from the USA: European courts work differently in jurisprudence aspects from USA courts.
No. Not at all.
"This database tracks legal decisions in cases where generative AI produced hallucinated content – typically fake citations, but also other types of AI-generated arguments. It does not track the (necessarily wider) universe of all fake citations or use of AI in court filings."
https://www.damiencharlotin.com/hallucinations/
The law, for -use by- agents.. not the law for -regulating- agents.
Reading the title makes me wonder why there's an MCP law introduced by EU.
I wonder how this deals with temporal edge cases, i.e. when an ordinance says "valid from 1st of January 2027" (happens when copy/pasting EU law into national), but the ordinance is promulgated after the 1st of January.
Countries deal with this differently, i.e. in Switzerland this means the law is in effect the day it was properly promulgated, in Austria its the day after. Who's going to be the poor shmuck dealing with the unavoidable hallucinations that come from naive slop interpretations of our laws?
How does it work internally? Is this agent to agent with a MCP in between? From my experience this domain is pretty hard to get right. Often multiple LLM passes are needed over different kinds of structured data. RAG, indices, raw texts, DB search, with extra validations and more. We have a similar internal systems. Each question takes about 2 to 5 minutes and costs about 1 to 2 dollars in tokens. Simply injecting raw law books into your LLM will not have enough reliability.
Should be offered by the EU itself