# German Court Decisions API (BGH, BVerfG) for RAG (`layerwiselabs/german-court-decisions`) Actor

Official decisions of Germany's federal courts (BGH, BVerfG, BVerwG, BFH, BAG, BSG, BPatG) as clean JSON or RAG chunks: ECLI, cited norms, headnote, facts and reasons with marginal numbers, lower courts. Filter by court, date, type or keyword, or monitor new case law daily.

- **URL**: https://apify.com/layerwiselabs/german-court-decisions.md
- **Developed by:** [Layerwise Labs](https://apify.com/layerwiselabs) (community)
- **Categories:** AI, Integrations, Other
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

### What does German Court Decisions API do?

German Court Decisions API gives you the official decisions (Urteile und Beschlüsse) of Germany's federal courts as clean, structured JSON, or as ready-to-embed chunks for your vector database. It covers all 84,600 decisions published since January 2010, and it can watch for new ones every day.

Try it now: the prefilled input returns the ten newest BGH decisions in about a minute.

#### At a glance

| | This Actor | Other court decision Actors |
|---|---|---|
| Ready-to-embed RAG chunks that stay inside one section | ✅ | ❌ |
| Marginal numbers (Randnummern) kept in every text field, for exact citations | ✅ | ❌ |
| Facts (Tatbestand) and reasons (Gründe) as separate fields | ✅ | partly |
| Lower courts split into court, date, file number and type | ✅ | ❌ |
| Daily alerts with a separate position per saved task | ✅ | partly |
| Price per 1,000 decisions | **$3** | $4–10 |

Based on what the other German court decision Actors in the Apify Store document on their pages (October 2026).

### Which courts are covered?

| Court | Name | Decisions |
|---|---|---|
| BGH | Bundesgerichtshof (Federal Court of Justice) | 35,500 |
| BFH | Bundesfinanzhof (Federal Fiscal Court) | 11,700 |
| BVerwG | Bundesverwaltungsgericht (Federal Administrative Court) | 10,400 |
| BPatG | Bundespatentgericht (Federal Patent Court) | 7,300 |
| BAG | Bundesarbeitsgericht (Federal Labour Court) | 7,300 |
| BSG | Bundessozialgericht (Federal Social Court) | 6,500 |
| BVerfG | Bundesverfassungsgericht (Federal Constitutional Court) | 5,800 |
| GmS-OGB | Joint Senate of the federal supreme courts | 2 |

Counts as of October 2026. The data comes from [rechtsprechung-im-internet.de](https://www.rechtsprechung-im-internet.de), the official case law portal of the Federal Ministry of Justice.

### Why use this Actor?

- **Built for RAG and AI agents.** In chunk mode every chunk stays inside one section (Leitsatz, Tenor, Tatbestand, Gründe ...), breaks between paragraphs or at real sentence ends, never ends on a heading, and carries the court, file number, title, heading path and marginal numbers (Randnummern). Your AI can cite "BGH, IX ZB 72/08, Rn. 4–6" instead of guessing.
- **Daily case law alerts.** Turn on *Only new or updated since the last run* and schedule the Actor. You get only what the portal published since the last run, and you only pay for that. Every saved task keeps its own position, so a tenancy-law task and an employment-law task never get in each other's way.
- **You pay per decision, not per chunk.** One decision with 40 chunks costs the same as one decision without chunks. Decisions removed by your filters are free.
- **Precise filters.** Court, decision date, decision type (Urteil, Beschluss ...), file number (Aktenzeichen) and keywords in the full text and cited norms, matching any or all keywords. Umlauts are handled: "Kuendigung" finds "Kündigung".
- **Clean data.** No HTML. ECLI, cited norms, headnote (Leitsatz), operative part (Tenor), facts (Tatbestand) and reasons (Gründe) as separate fields, plus the full text as Markdown with headings and marginal numbers. Lower courts come split into court, date, file number and decision type, so you can follow a case through the instances. Tables become one line per row.
- **Reliable.** Interrupted downloads resume where they stopped. If the portal refuses the direct connection, the Actor switches to Apify Proxy by itself, for the rest of the run.

| | This Actor | The official portal |
|---|---|---|
| Bulk download with filters | ✅ | ❌ one decision at a time |
| Full text as clean JSON and Markdown | ✅ | ❌ XML inside ZIP files |
| Facts and reasons as separate fields, with marginal numbers | ✅ | ❌ |
| Lower courts split into court, date and file number | ✅ | ❌ |
| Section-aware RAG chunks with marginal numbers | ✅ | ❌ |
| Only new decisions since the last run | ✅ | ❌ |
| Schedules, webhooks, API, MCP, Make, Zapier, n8n | ✅ | ❌ |

### How to get German court decisions

1. Choose the courts, a date range, decision types, keywords or file numbers. Leave everything empty to get the newest decisions of all courts.
2. Pick the output format: one item per decision, or RAG chunks.
3. Click **Start** and download the results as JSON, CSV or Excel, or read them through the API.

### How to get alerts for new case law

1. Set your filters, for example court `BAG` and keyword `Kündigungsschutz`.
2. Turn on *Only new or updated since the last run* and set *Updated since* to yesterday, so the first run starts from today.
3. Save the input as a task and add a daily schedule.
4. Add a webhook, an email or a Slack integration to the task to be told when new decisions arrive.

The portal publishes new decisions every working day, usually 20 to 90 across all courts. Large batches in which the portal re-stamps thousands of old decisions at once (as in June 2025) are skipped, so you are not charged for old case law.

### How much does it cost to get German court decisions?

This Actor uses pay-per-event pricing. You pay a small fee per run and a fee per decision, and nothing for the platform resources the run uses.

| Event | Price |
|---|---|
| Decision returned | $0.003 ($3 per 1,000 decisions) |
| Run started | $0.005 (Apify counts it once per GB of memory; the default is 1 GB) |

Examples:

- 100 BGH decisions as RAG chunks: about $0.31.
- A daily alert in one field of law that finds three new decisions a day: about $0.42 per month.
- All 84,600 decisions once: about $254.

You can cap every run with *Maximum decisions* or the run's spending limit. The Actor stops cleanly at the limit and never charges for a decision it did not deliver.

### Input

All fields are optional. Example: BGH decisions on tenancy law (Eigenbedarf) since 2025, as RAG chunks.

```json
{
  "courts": ["BGH"],
  "dateFrom": "2025-01-01",
  "keywords": ["§ 573 BGB", "Eigenbedarf"],
  "outputFormat": "chunks",
  "chunkSize": 2000,
  "maxDecisions": 200
}
```

| Field | What it does |
|---|---|
| `courts` | Courts to include. Empty means all. |
| `dateFrom`, `dateTo` | Decision date range. |
| `decisionTypes` | For example `Urteil` or `Beschluss`. |
| `keywords`, `keywordMode` | Words or phrases in the full text or cited norms; `any` or `all`. |
| `fileNumbers` | Specific file numbers, e.g. `IX ZB 72/08`. |
| `outputFormat` | `decisions` (one item per decision) or `chunks`. |
| `includeFullText` | Add facts, reasons and the full decision as Markdown. Turn off for a light citation index. |
| `chunkSize`, `chunkOverlap` | Target chunk length in characters, and paragraphs repeated between chunks. |
| `maxDecisions` | Stop after this many decisions. Newest first; in monitoring mode the oldest pending change first, so nothing is skipped. |
| `onlyNew`, `updatedSince` | Monitoring: only decisions added or changed since the last run or since a date. |

### Output

#### Chunk mode

```json
{
  "docId": "KVRE467122601",
  "ecli": "ECLI:DE:BVerfG:2026:es20261014.2bve000526",
  "court": "BVerfG",
  "courtName": "Bundesverfassungsgericht",
  "chamber": "2. Senat",
  "decisionDate": "2026-10-14",
  "fileNumber": "2 BvE 5/26",
  "decisionType": "Einstweilige Anordnung",
  "title": "Erfolgreicher Eilantrag im Organstreitverfahren - Verpflichtung einer Bundesministerin zur Depublikation eines im Instagram-Profil ihres Ministeriums veröffentlichten Videoclips - ...",
  "norms": ["Art 21 Abs 1 S 1 GG", "§ 32 Abs 1 BVerfGG", "§ 63 BVerfGG"],
  "url": "https://www.rechtsprechung-im-internet.de/jportal/?quelle=jlink&docid=jb-KVRE467122601&psml=bsjrsprod.psml&max=true",
  "section": "gruende",
  "sectionLabel": "Gründe",
  "headingPath": ["A.", "II."],
  "marginalNumberFrom": 11,
  "marginalNumberTo": 15,
  "text": "[11] b) Sämtliche in dem Video thematisierten Themenkomplexe berührten unmittelbar das Aufgabengebiet der Antragsgegnerin ... \n\n### B.\n\n[15] Der Antrag auf Erlass einer einstweiligen Anordnung hat Erfolg.",
  "chunkIndex": 5,
  "chunkCount": 20
}
```

#### Decision mode (default)

One item per decision. `facts`, `reasons`, `dissentingOpinion` and `fullTextMarkdown` are left out when *Include full text* is off. Long texts are shortened here:

```json
{
  "docId": "STRE202650160",
  "ecli": "ECLI:DE:BFH:2026:U.180626.IIIR38.23.0",
  "court": "BFH",
  "courtName": "Bundesfinanzhof",
  "chamber": "3. Senat",
  "decisionDate": "2026-06-18",
  "fileNumber": "III R 38/23",
  "decisionType": "Urteil",
  "title": "(Zur Gewinngrenze für die Inanspruchnahme des Investitionsabzugsbetrags nach § 7g EStG)",
  "norms": ["§ 7g EStG 2009", "§ 7g Abs 1 S 2 Nr 1 EStG 2009", "§ 2 Abs 2 S 1 Nr 1 EStG 2009", "EStG VZ 2020"],
  "lowerCourts": [
    {
      "relation": "vorgehend",
      "court": "Finanzgericht Baden-Württemberg",
      "date": "2023-05-02",
      "fileNumber": "10 K 1873/22",
      "decisionType": "Urteil",
      "text": "vorgehend Finanzgericht Baden-Württemberg, 2. Mai 2023, Az: 10 K 1873/22, Urteil"
    }
  ],
  "headnote": "NV: Gewinn im Sinne von § 7g Abs. 1 Satz 2 Nr. 1 des Einkommensteuergesetzes (EStG) ist der steuerliche Gewinn gemäß § 2 Abs. 2 Satz 1 Nr. 1 EStG ...",
  "orientationHeadnote": null,
  "operativePart": "Auf die Revision des Beklagten wird das Urteil des Finanzgerichts Baden-Württemberg vom 02.05.2023 - 10 K 1873/22 aufgehoben.\n\nDie Klage wird ...",
  "url": "https://www.rechtsprechung-im-internet.de/jportal/?quelle=jlink&docid=jb-STRE202650160&psml=bsjrsprod.psml&max=true",
  "sourceUpdatedAt": "2026-10-14T21:08:55.134Z",
  "facts": "I.\n\n[1] Streitig ist, ob die Voraussetzungen für die Bildung eines Investitionsabzugsbetrags (IAB) nach § 7g Abs. 1 des Einkommensteuergesetzes (EStG) ...",
  "reasons": "II.\n\n[12] Die Revision ist begründet. Das FG hat zu Unrecht die Voraussetzungen für die Inanspruchnahme des IAB als erfüllt angesehen. ...",
  "dissentingOpinion": null,
  "fullTextMarkdown": "# BFH 3. Senat, Urteil vom 2026-06-18, III R 38/23\n\n## Leitsatz\n\nNV: Gewinn im Sinne von § 7g Abs. 1 Satz 2 Nr. 1 ..."
}
```

`facts`, `reasons` and `dissentingOpinion` keep the marginal numbers (`[12] ...`), so every passage can be cited. `facts` is set when the decision has a separate Tatbestand (mostly judgments); otherwise the whole reasoning is in `reasons`. Some short orders of the BGH and BVerfG carry their brief reasons inside the operative part; the portal publishes them that way, so for those `reasons` is `null` and the text is in `operativePart`. If the parties waived the reasons (§ 313a ZPO, common for BAG judgments), `facts` and `reasons` are `null` and the note about the waiver is only in `fullTextMarkdown`. A lower-court line in an unusual form keeps only `text`, with the other fields `null`. The Output tab has a table view for each mode.

### Use the API or an AI agent

Python:

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("layerwiselabs/german-court-decisions").call(
    run_input={"courts": ["BAG"], "dateFrom": "2026-01-01", "outputFormat": "chunks"}
)
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["fileNumber"], item["marginalNumberFrom"], item["text"][:80])
```

AI agents (Claude, Cursor, VS Code ...) can call the Actor through the [Apify MCP server](https://mcp.apify.com) by adding `layerwiselabs/german-court-decisions` as a tool. LangChain and LlamaIndex can load the dataset through their Apify integrations.

### Who is it for?

| Who | What for |
|---|---|
| Legal tech and AI startups | Retrieval for legal assistants, with citable marginal numbers |
| Law firms and in-house legal teams | Daily alerts on new case law in their fields |
| Tax advisors | New BFH decisions every week |
| Patent attorneys | BPatG and BGH patent decisions |
| Researchers | Datasets for German legal NLP and empirical legal studies |

### FAQ

#### Is this data available for free elsewhere?

Yes. German court decisions are official works without copyright (§ 5 UrhG), and the federal government publishes them for free on rechtsprechung-im-internet.de and in the trial phase of its new portal rechtsinformationen.bund.de. This Actor saves you the work around it: downloading and parsing the XML, cleaning the text, splitting it for RAG, keeping track of what is new, and delivering it to your tools on a schedule.

#### Which courts are not covered?

State courts (Amtsgerichte, Landgerichte, Oberlandesgerichte, state administrative and labour courts) are not published on this portal and are not included. The portal starts with decisions from January 2010.

#### How fresh is the data?

The portal publishes new decisions every working day, usually a few days after the decision date. Every run reads the current table of contents, so it sees everything published up to that moment.

#### How do keywords work?

A keyword matches anywhere in the full text or the cited norms, ignoring case, extra spaces and umlaut spelling. Phrases work as typed, for example `§ 573 BGB`. With *Keyword match* set to *All keywords*, a decision must contain every keyword.

#### Can I export to CSV or Excel?

Yes. Every run's dataset downloads as JSON, CSV, Excel, XML or HTML, and the Output tab has table views for decisions and for chunks.

#### Does it handle personal data?

The courts anonymize decisions before publication. The Actor returns the published text unchanged and adds no personal data.

#### What happens if the portal is slow or down?

Downloads resume where they broke off and are retried with increasing pauses. A decision that cannot be downloaded is skipped for that run and, in monitoring mode, retried in the next run. Only if it still fails in three runs in a row, while other decisions download fine, is it left out for good. If no decision can be downloaded at all, the run fails instead of returning an empty result.

#### Something is missing or wrong?

Open an issue on the Issues tab with the file number and what you expected.

# Changelog

This Actor's version history is a separate document: https://apify.com/layerwiselabs/german-court-decisions/changelog.md

# Actor input Schema

## `courts` (type: `array`):

Federal courts to include. Leave empty for all.

## `dateFrom` (type: `string`):

Decision date, YYYY-MM-DD.

## `dateTo` (type: `string`):

Decision date, YYYY-MM-DD.

## `keywords` (type: `array`):

Only return decisions whose full text or cited norms contain these words or phrases, e.g. "§ 573 BGB" or "Eigenbedarf". Case, extra spaces and umlauts are ignored ("Kuendigung" finds "Kündigung"). Decisions filtered out are free.

## `keywordMode` (type: `string`):

Whether a decision needs at least one or all of the keywords.

## `fileNumbers` (type: `array`):

Fetch specific decisions, e.g. "IX ZB 72/08".

## `decisionTypes` (type: `array`):

Only these kinds of decisions, e.g. "Urteil" or "Beschluss" (also matches "Teilurteil" etc.). Leave empty for all. Decisions filtered out are free.

## `outputFormat` (type: `string`):

One item per decision, or one item per text chunk ready for embedding in a vector database.

## `includeFullText` (type: `boolean`):

Add facts (Tatbestand), reasons (Gründe) and the complete decision, as Markdown with marginal numbers.

## `chunkSize` (type: `integer`):

Target maximum length of a chunk. Chunks never cross a section and break between paragraphs.

## `chunkOverlap` (type: `integer`):

Paragraphs repeated at the start of the next chunk.

## `maxDecisions` (type: `integer`):

Stop after this many decisions. Newest decisions come first (in monitoring mode, the oldest change first, so nothing is skipped).

## `onlyNew` (type: `boolean`):

For scheduled monitoring: remembers where the last run stopped (separately for every saved task, or for every combination of filters) and only returns decisions the portal added or changed since then. Tip: on the first run set "Updated since" to yesterday, otherwise it starts with the oldest changes.

## `updatedSince` (type: `string`):

Only decisions the portal added or changed after this day (YYYY-MM-DD). Changes made on that day itself are not included.

## `maxConcurrency` (type: `integer`):

Kept low to be gentle on the public portal; more parallel downloads make it stall.

## `proxyConfiguration` (type: `object`):

Usually not needed: on Apify the Actor switches to Apify Proxy by itself if the portal refuses the direct connection. Set a proxy here to always use it.

## Actor input object example

```json
{
  "courts": [
    "BGH"
  ],
  "keywordMode": "any",
  "outputFormat": "decisions",
  "includeFullText": true,
  "chunkSize": 2000,
  "chunkOverlap": 1,
  "maxDecisions": 10,
  "onlyNew": false,
  "maxConcurrency": 3,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `decisions` (type: `string`):

One item per decision (decisions format) with metadata, headnote, operative part, facts, reasons and full text as Markdown.

## `chunks` (type: `string`):

One item per text chunk (chunks format) with court, file number, section, heading path and marginal numbers.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "courts": [
        "BGH"
    ],
    "maxDecisions": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("layerwiselabs/german-court-decisions").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "courts": ["BGH"],
    "maxDecisions": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("layerwiselabs/german-court-decisions").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "courts": [
    "BGH"
  ],
  "maxDecisions": 10
}' |
apify call layerwiselabs/german-court-decisions --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,layerwiselabs/german-court-decisions"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/3chdbkrvTbBPW30eT/builds/s8bDBDNQpMgE4blMT/openapi.json
