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
curl "https://gesetze.nulegal.eu/v1/search?q=k%C3%BCndigung&limit=3"

Basics

Base URLhttps://gesetze.nulegal.eu
AuthNone. No key or token required.
FormatJSON (UTF-8). Query strings must be URL-encoded.
CORSOpen (*) for GET, POST, OPTIONS. Call it directly from the browser.
CachingResponses send Cache-Control: public, max-age=3600. Please cache on your side.

Full-text search

GET/v1/search

Search across all federal statutes. Ranks by relevance, pins curated matches for common terms and returns a plain-text snippet for each hit.

ParameterTypeDescription
qstring, requiredSearch term. Minimum 2 characters. Accepts a keyword (kündigung), a citation (§ 823 BGB) or a natural-language question.
limitintegerNumber of results, 1 to 100. Default 20.
mstringSearch mode: auto (default), fast or deep.

Example

curl
curl "https://gesetze.nulegal.eu/v1/search?q=k%C3%BCndigung&limit=2"
JavaScript
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);
Response
{
  "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

GET/v1/case-search

Semantic search over court decisions. A natural-language question in, decisions out. Hits carry the best-matching paragraph number (rn) and a snippet.

ParameterTypeDescription
qstring, requiredQuestion or keyword. Minimum 2 characters.
limitintegerNumber of results, 1 to 20. Default 10.

Example

curl
curl "https://gesetze.nulegal.eu/v1/case-search?q=wann%20darf%20mein%20chef%20mir%20k%C3%BCndigen&limit=2"
Response
{
  "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:

EndpointDescription
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-casesFederal decisions that cite a given norm.
GET /v1/suggest?q=Typeahead suggestions for laws and norms.
POST /v1/resolveResolve up to 100 raw citation strings to structured norms.

An interactive reference with every parameter is at /docs (OpenAPI).

Usage and fair use

Looking to embed citations on your own site instead? See the citation badge.