Developers
The German law API
Every federal statute and hundreds of thousands of court decisions, as clean JSON. Full-text search, semantic case search, norm lookup and citation resolution. No key, no sign-up, open CORS. Built and run by Nulegal GmbH.
Quick start
Every endpoint is a plain GET that returns JSON. Try it in your terminal:
curl "https://gesetze.nulegal.eu/v1/search?q=k%C3%BCndigung&limit=3"Basics
| Base URL | https://gesetze.nulegal.eu |
| Auth | None. No key or token required. |
| Format | JSON (UTF-8). Query strings must be URL-encoded. |
| CORS | Open (*) for GET, POST, OPTIONS. Call it directly from the browser. |
| Caching | Responses send Cache-Control: public, max-age=3600. Please cache on your side. |
Full-text search
Search across all federal statutes. Ranks by relevance, pins curated matches for common terms and returns a plain-text snippet for each hit.
| Parameter | Type | Description |
|---|---|---|
q | string, required | Search term. Minimum 2 characters. Accepts a keyword (kündigung), a citation (§ 823 BGB) or a natural-language question. |
limit | integer | Number of results, 1 to 100. Default 20. |
m | string | Search mode: auto (default), fast or deep. |
Example
curl "https://gesetze.nulegal.eu/v1/search?q=k%C3%BCndigung&limit=2"const r = await fetch(
"https://gesetze.nulegal.eu/v1/search?q=" + encodeURIComponent("kündigung") + "&limit=2"
);
const { results } = await r.json();
console.log(results[0].ref, results[0].jurabk, results[0].url);{
"query": "kündigung",
"results": [
{
"jurabk": "KSchG",
"slug": "kschg",
"ref": "§ 1",
"ref_norm": "1",
"heading": "Sozial ungerechtfertigte Kündigungen",
"rank": 0.48,
"snippet": "Kündigung des Arbeitsverhältnisses gegenüber einem …",
"law_url": "KSchG",
"url": "https://gesetze.nulegal.eu/gesetze/KSchG/1"
}
]
}Case-law search
Semantic search over court decisions. A natural-language question in, decisions out. Hits
carry the best-matching paragraph number (rn) and a snippet.
| Parameter | Type | Description |
|---|---|---|
q | string, required | Question or keyword. Minimum 2 characters. |
limit | integer | Number of results, 1 to 20. Default 10. |
Example
curl "https://gesetze.nulegal.eu/v1/case-search?q=wann%20darf%20mein%20chef%20mir%20k%C3%BCndigen&limit=2"{
"query": "wann darf mein chef mir kündigen",
"results": [
{
"court": "BAG",
"decided": "2011-11-24",
"aktenzeichen": "2 AZR 429/10",
"doktyp": "Urteil",
"rn": null,
"snippet": "Kündigung noch nach Fristablauf wirksam …",
"source": "rii",
"url": "https://gesetze.nulegal.eu/rechtsprechung/BAG/2011-11-24/2-azr-429-10"
}
]
}When a result comes from an Open-Database-Licence source, the response adds an
attribution array. If present, show it alongside the results.
More endpoints
The same API also resolves single norms and citations:
| Endpoint | Description |
|---|---|
GET /v1/norm/{law}/{ref} | One norm with full text and version metadata. Optional ?asof=YYYY-MM-DD for a historical version. |
GET /v1/preview/{law}/{ref} | One norm as a short snippet. Powers the citation badge preview. |
GET /v1/law/{law} | A law with its table of norms. |
GET /v1/case/{doknr|ecli} | One decision by juris document number or ECLI, with its cited norms. |
GET /v1/norm/{law}/{ref}/citing-cases | Federal decisions that cite a given norm. |
GET /v1/suggest?q= | Typeahead suggestions for laws and norms. |
POST /v1/resolve | Resolve up to 100 raw citation strings to structured norms. |
An interactive reference with every parameter is at /docs (OpenAPI).
Usage and fair use
- The API is free. There is no key and no hard rate limit today. Please stay reasonable and cache responses; heavy or automated bulk use may be throttled.
- Statute text is public domain under § 5 UrhG. Court decisions carry the licence of their
source; where an
attributionfield is present, keep it with the data. - All texts are consolidated, non-official reading versions. The binding source is the Federal Law Gazette at recht.bund.de.
- Building something with it? We would like to hear about it: reach us via nu:legal.
Looking to embed citations on your own site instead? See the citation badge.