# Court Decisions MCP + API (`fuchsblau/court-decisions`) Actor

Connect your AI agent to court decisions from Germany, Austria, and the EU via MCP Server – or run as Apify Actor. Search by keyword, ECLI, court, source, or date. Structured JSON from official open data APIs (NeuRIS, RIS OGD, EUR-Lex). No API key needed.

- **URL**: https://apify.com/fuchsblau/court-decisions.md
- **Developed by:** [Matthias Nitsch](https://apify.com/fuchsblau) (community)
- **Categories:** MCP servers, AI, Developer tools
- **Stats:** 3 total users, 3 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.00 / 1,000 searches

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

### What is Court Decisions MCP + API?

This Actor gives you programmatic access to **court decisions from Germany, Austria, and the EU** — from official open data APIs. Currently covering **115,000+ decisions from 14 courts** across three jurisdictions.

| Source | Country | Courts | API |
|--------|---------|--------|-----|
| [NeuRIS](https://www.rechtsinformationen.bund.de) | Germany | 7 federal courts (BGH, BVerfG, etc.) | REST/JSON |
| [RIS OGD](https://data.bka.gv.at) | Austria | 5 supreme/federal courts (OGH, VwGH, etc.) | SOAP/XML |
| [EUR-Lex/CELLAR](https://publications.europa.eu) | EU | 2 courts (CJEU, General Court) | SPARQL |

Use it three ways: as a **REST API** for direct HTTP access, as an **MCP Server** for AI agents (Claude Desktop, Cursor), or as a standard **Apify Actor** to search, filter, and export case law in structured JSON.

**No API key required. No scraping. Official public API access. One unified schema across all sources.**

### 🚀 Get Started in 3 Minutes

**Option A: MCP Server** — Add this to your MCP client config (e.g., `claude_desktop_config.json`):

```json
{
  "mcpServers": {
    "court-decisions": {
      "url": "https://<your-username>--court-decisions.apify.actor/mcp"
    }
  }
}
````

Then ask your AI agent: *"Find recent BGH decisions about data privacy"*, *"Search Austrian OGH rulings on tenant law"*, or *"Find CJEU judgments on consumer protection"*

**Option B: REST API** — Call the endpoints directly from any HTTP client:

```bash
## Search decisions
curl "https://<your-username>--court-decisions.apify.actor/api/search?query=Datenschutz&source=neuris"

## Get a specific decision by ECLI
curl "https://<your-username>--court-decisions.apify.actor/api/decisions/ECLI:DE:BGH:2024:120324UVIZR234.23.0"

## List available courts
curl "https://<your-username>--court-decisions.apify.actor/api/courts?jurisdiction=DE"
```

**Option C: Apify Actor** — Click **Try for free** above. No credit card required.

1. Choose an action: Search, Get by ECLI, or List Courts
2. Configure your parameters (optionally filter by source: `neuris`, `ris-ogd`, or `eur-lex`)
3. Run and download results from the **Dataset** tab (JSON, CSV, Excel)

### 🔍 What Can This Actor Do?

**REST API**

- 3 JSON endpoints: `/api/search`, `/api/decisions/{ecli}`, `/api/courts`
- Standard HTTP GET requests — works with curl, Python requests, any HTTP client
- Interactive API documentation in the **Standby** tab (OpenAPI 3.0)
- No special client library needed

**MCP Server for AI Agents**

- Connect to Claude Desktop, Cursor, or any MCP-compatible client
- 3 structured tools: `search_decisions`, `get_decision_by_ecli`, `list_courts`
- AI-optimized response format with prioritized fields
- The only MCP server for European case law on Apify

**Multi-Source Search**

- Search across Germany, Austria, and the EU in a single query — or filter by source
- Retrieve individual decisions by ECLI identifier (automatic routing by jurisdiction)
- Filter by court, date range, and source
- Paginated results with configurable page size

**Structured Output**

- Normalized ECLI-based data model — consistent across all sources
- Full decision text, headnotes, guiding principles (Leitsaetze), operative part (Tenor)
- Court metadata, file numbers, keywords
- Every result includes a `source` field identifying the data origin
- Export as JSON, CSV, or Excel via Apify Dataset

**Reliability**

- Built-in caching (7-day TTL) for faster repeated access
- Automatic retry with progressive backoff per source
- Source-specific rate limit compliance (transparent throttling)
- Partial failure handling: if one source is down, results from other sources are still returned
- Clear warnings when a source is temporarily unavailable

### 👥 Who Is This For?

**AI Agent Developers** — Give your legal AI agent direct access to case law across jurisdictions. Use the MCP Server to let Claude, GPT, or custom agents search and cite court decisions in real time. Build RAG pipelines for legal research, compliance monitoring, or document analysis.

**Legal-Tech Startups** — Build legal research tools, compliance checks, or case law databases on top of structured, normalized data covering the DACH region. Use the REST API for direct integration — no special client library required. Pay-per-use pricing instead of expensive subscriptions.

**Legal Researchers** — Run systematic searches across courts in multiple countries. Export datasets for empirical legal studies, comparative law research, citation analysis, or NLP projects.

**Compliance Officers** — Monitor new court decisions relevant to your regulatory domain across Germany and Austria. Example: Track GDPR rulings from BGH and OGH by searching for "Datenschutz".

### 🔌 How Do I Connect as MCP Server?

Add this to your MCP client configuration:

```json
{
  "mcpServers": {
    "court-decisions": {
      "url": "https://<your-username>--court-decisions.apify.actor/mcp"
    }
  }
}
```

#### Example Prompts

Try these with your AI agent:

- *"Find recent BGH decisions about data privacy (Datenschutz)"*
  → Agent calls `search_decisions` with query "Datenschutz" and court filter "BGH"

- *"Search Austrian OGH rulings on tenant law from 2024"*
  → Agent calls `search_decisions` with query "Mietrecht", source "ris-ogd", dateFrom "2024-01-01"

- *"Show me the full text of ECLI:DE:BGH:2024:120324UVIZR234.23.0"*
  → Agent calls `get_decision_by_ecli` — automatically routes to NeuRIS based on the ECLI country code

- *"Find CJEU judgments on consumer protection from 2024"*
  → Agent calls `search_decisions` with query "consumer protection", source "eur-lex", dateFrom "2024-01-01"

- *"Show me the full text of ECLI:EU:C:2024:123"*
  → Agent calls `get_decision_by_ecli` — automatically routes to EUR-Lex based on the ECLI country code

- *"Compare how German, Austrian, and EU courts handle data protection claims"*
  → Agent searches all three sources, retrieves decisions from BGH, OGH, and CJEU, synthesizes findings

- *"Which courts are available?"*
  → Agent calls `list_courts` and returns courts from all jurisdictions with source attribution

#### MCP Tool Reference

The MCP server exposes these 3 tools:

##### search\_decisions

Search court decisions by keyword. Covers German federal courts (NeuRIS), Austrian courts (RIS), and EU courts including EuGH and EuG (EUR-Lex).

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `query` | string | Yes | — | Search query (e.g. "Kuendigungsschutz", "Verbraucherschutz") |
| `court` | string | No | — | Court abbreviation (e.g. BGH, BVerfG, BFH, BAG, BVerwG, BSG, EuGH, EuG, OGH) |
| `dateFrom` | string | No | — | Decisions from date (YYYY-MM-DD) |
| `dateTo` | string | No | — | Decisions until date (YYYY-MM-DD) |
| `limit` | number | No | `50` | Max results (1–300) |
| `source` | string | No | — | Data source filter: `neuris` (Germany), `ris-ogd` (Austria), `eur-lex` (EU) |

**Returns:** `SearchResult`

| Field | Type | Description |
|-------|------|-------------|
| `items` | CourtDecisionSummary\[] | Array of matching decisions |
| `totalItems` | number | Total number of matching results |
| `pageIndex` | number | Current page index |
| `pageSize` | number | Number of items per page |
| `hasMore` | boolean | Whether more results are available |
| `warnings` | string\[] | Optional — source availability warnings |

Each `CourtDecisionSummary` contains: `ecli`, `source`, `court` (name + abbreviation), `date`, `fileNumber`, `decisionType`, and optional `headline` and `guidingPrinciple`.

##### get\_decision\_by\_ecli

Retrieve a single court decision by its ECLI identifier. Supports German (ECLI:DE:...), Austrian (ECLI:AT:...), and EU court decisions (ECLI:EU:...).

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `ecli` | string | Yes | — | ECLI identifier (e.g. "ECLI:DE:BGH:2024:120324UVIZR234.23.0") |

**Returns:** `CourtDecision`

| Field | Type | Description |
|-------|------|-------------|
| `ecli` | string | European Case Law Identifier |
| `source` | string | Data origin: `neuris`, `ris-ogd`, or `eur-lex` |
| `court` | object | Court name and abbreviation |
| `date` | string | Decision date |
| `fileNumber` | string | Court file number |
| `decisionType` | string | Type of decision (e.g. Urteil, Beschluss) |
| `guidingPrinciple` | string | Key legal principle (Leitsatz) |
| `tenor` | string | Operative part of the decision |
| `grounds` | string | Full reasoning of the court |
| `retrievedAt` | string | Timestamp when the decision was fetched |

Additional optional fields: `sourceId`, `fileNumbers`, `judicialBody`, `decisionName`, `keywords`, `language`, `headline`, `headnote`, `caseFacts`, `dissentingOpinion`, `outline`, `sourceUrl`.

##### list\_courts

List available courts with decision counts. Includes German federal courts (NeuRIS), Austrian courts (RIS), and EU courts (EUR-Lex: EuGH, EuG).

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `jurisdiction` | string | No | — | Filter by jurisdiction: `DE`, `AT`, or `EU` |

**Returns:** `Court[]`

| Field | Type | Description |
|-------|------|-------------|
| `id` | string | Court identifier |
| `name` | string | Full court name |
| `source` | string | Data source (`neuris`, `ris-ogd`, `eur-lex`) |
| `decisionCount` | number | Number of available decisions |
| `jurisdiction` | string | Jurisdiction code (DE, AT, EU) |

### 🌐 How Do I Use the REST API?

The REST API is available when the Actor runs in Standby mode. Three endpoints return JSON:

#### Endpoints

| Method | Path | Description |
|--------|------|-------------|
| GET | `/api/search?query=...` | Search decisions by keyword, court, date, source |
| GET | `/api/decisions/{ecli}` | Retrieve a single decision by ECLI |
| GET | `/api/courts` | List available courts (optionally filter by jurisdiction) |

#### Search Parameters

| Parameter | Required | Description |
|-----------|----------|-------------|
| `query` | Yes | Full-text search term (e.g., "Datenschutz") |
| `court` | No | Court abbreviation (e.g., BGH, OGH, EuGH) |
| `dateFrom` | No | Start date (YYYY-MM-DD) |
| `dateTo` | No | End date (YYYY-MM-DD) |
| `limit` | No | Max results (1-300, default 50) |
| `source` | No | Filter by source: `neuris`, `ris-ogd`, or `eur-lex` |

#### Examples

```bash
## Search German BGH decisions about data privacy
curl "https://<your-username>--court-decisions.apify.actor/api/search?query=Datenschutz&court=BGH"

## Get a decision by ECLI (automatic source routing)
curl "https://<your-username>--court-decisions.apify.actor/api/decisions/ECLI:DE:BGH:2024:120324UVIZR234.23.0"

## List Austrian courts
curl "https://<your-username>--court-decisions.apify.actor/api/courts?jurisdiction=AT"
```

Browse the interactive API documentation in the **Standby** tab above — it shows all endpoints, parameters, and response schemas.

### ▶️ How Do I Run as Apify Actor?

1. Click **Try for free** on this page — no credit card required
2. Choose an action: Search, Get by ECLI, or List Courts
3. Configure your parameters (see Input Parameters below)
4. Run the Actor
5. Download results from the **Dataset** tab (JSON, CSV, Excel)

#### Input Parameters

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `action` | string | `search` | Action to perform: `search`, `getByEcli`, or `listCourts` |
| `query` | string | — | Full-text search term (e.g., "Datenschutz", "Mietrecht") |
| `court` | string | — | Court abbreviation (e.g., BGH, BVerfG, OGH, VwGH) |
| `source` | string | — | Filter by data source: `neuris` (Germany), `ris-ogd` (Austria), or `eur-lex` (EU). Omit to search all. |
| `dateFrom` | string | — | Start date (ISO format, e.g., "2024-01-01") |
| `dateTo` | string | — | End date (ISO format, e.g., "2024-12-31") |
| `ecli` | string | — | ECLI identifier for direct lookup (routed automatically by country code) |
| `limit` | number | `50` | Maximum results per page (max 300) |

#### Input Example

```json
{
  "action": "search",
  "query": "Datenschutz",
  "source": "neuris",
  "dateFrom": "2024-01-01",
  "limit": 50
}
```

### 📋 What Data Can I Extract?

Each court decision includes the following fields — consistent across all sources:

| Field | Description |
|-------|-------------|
| `ecli` | European Case Law Identifier — unique ID across all EU courts |
| `source` | Data origin: `neuris` (Germany), `ris-ogd` (Austria), or `eur-lex` (EU) |
| `court` | Court name and abbreviation (e.g., BGH, OGH) |
| `date` | Decision date |
| `fileNumber` | Court file number (Aktenzeichen / Geschaeftszahl) |
| `decisionType` | Type: Urteil/Beschluss (DE) or Erkenntnis/Beschluss (AT) |
| `headline` | Short summary of the case |
| `guidingPrinciple` | Key legal principle (Leitsatz / Rechtssatz) |
| `headnote` | Editorial headnote summarizing the ruling |
| `tenor` | Operative part — the actual order or judgment |
| `grounds` | Full reasoning of the court |
| `keywords` | Legal keywords and topics |

#### Output Example (Germany)

```json
{
  "ecli": "ECLI:DE:BGH:2024:120324UVIZR234.23.0",
  "sourceId": "KARE600050824",
  "source": "neuris",
  "court": { "name": "Bundesgerichtshof", "abbreviation": "BGH" },
  "date": "2024-03-12",
  "fileNumber": "VI ZR 234/23",
  "decisionType": "Urteil",
  "headline": "Zum Anspruch auf immateriellen Schadensersatz ...",
  "guidingPrinciple": "Ein Verstoß gegen die DSGVO ...",
  "tenor": "Die Revision des Klägers wird zurückgewiesen ...",
  "grounds": "I. Der Kläger nimmt die Beklagte auf Zahlung ...",
  "keywords": ["Datenschutz", "DSGVO", "Schadensersatz"],
  "retrievedAt": "2026-04-06T10:30:00.000Z"
}
```

#### Output Example (Austria)

```json
{
  "ecli": "ECLI:AT:OGH0002:2024:0010OB00045.24Z.0319.000",
  "sourceId": "JJT_20240319_OGH0002_0010OB00045_24Z0000_000",
  "source": "ris-ogd",
  "court": { "name": "Oberster Gerichtshof", "abbreviation": "OGH" },
  "date": "2024-03-19",
  "fileNumber": "1 Ob 45/24z",
  "decisionType": "Beschluss",
  "headline": "Mietrecht — Kuendigung ...",
  "grounds": "Der Revisionsrekurs ist zulässig ...",
  "keywords": ["Mietrecht", "Kuendigung"],
  "retrievedAt": "2026-04-06T10:31:00.000Z"
}
```

### 🏛️ Which Courts Are Covered?

#### 🇩🇪 Germany — 7 Federal Courts (via NeuRIS)

| Court | Abbreviation | Legal Domain |
|-------|-------------|-------------|
| Bundesgerichtshof | BGH | Civil and criminal law |
| Bundesverfassungsgericht | BVerfG | Constitutional law |
| Bundesverwaltungsgericht | BVerwG | Administrative law |
| Bundesfinanzhof | BFH | Tax law |
| Bundesarbeitsgericht | BAG | Labor law |
| Bundessozialgericht | BSG | Social law |
| Bundespatentgericht | BPatG | Patent law |

#### 🇦🇹 Austria — 5 Supreme/Federal Courts (via RIS OGD)

| Court | Abbreviation | Legal Domain |
|-------|-------------|-------------|
| Oberster Gerichtshof | OGH | Civil and criminal law |
| Verwaltungsgerichtshof | VwGH | Administrative law |
| Verfassungsgerichtshof | VfGH | Constitutional law |
| Bundesverwaltungsgericht | BVwG | Administrative law |
| Bundesfinanzgericht | BFG | Tax and fiscal law |

#### 🇪🇺 EU — 2 Courts (via EUR-Lex/CELLAR)

| Court | Abbreviation | Legal Domain |
|-------|-------------|-------------|
| Court of Justice of the EU | EuGH (CJEU) | EU law, preliminary rulings |
| General Court | EuG | Competition, trade, state aid |

#### 🔜 Roadmap

- **Switzerland** — On the waitlist (no official API available yet).

### 💰 Pricing

This Actor uses Apify's **pay-per-event pricing**. You pay **$0.01 per result item** returned — no subscription, no minimum commitment.

#### Pricing

| Event | Price | Description |
|-------|-------|-------------|
| Result item | $0.01 | Each decision returned (search result or ECLI lookup) |
| `list_courts` | Free | Reference data (courts list) |

A search returning 10 results costs $0.10. A single ECLI lookup costs $0.01. No results = no charge.

#### Typical Monthly Cost

| Use Case | Estimated Results/Month | Estimated Cost |
|----------|------------------------|---------------|
| Occasional research (student, journalist) | 50–200 | **$0.50–$2** |
| Regular case law lookups (solo lawyer) | 200–500 | **$2–$5** |
| AI agent integration (startup, MCP) | 500–2,000 | **$5–$20** |
| Cross-border comparative research | 200–1,000 | **$2–$10** |

#### Free Tier

Apify provides **free starter credits** for new accounts — no credit card required.

**No results, minimal cost:** If a search returns no results, no result events are charged.

For exact pricing details, see the **Pricing** tab above.

### ✅ Data Sources & Legality

This Actor accesses **official government open data APIs** only:

| Source | Provider | License | URL |
|--------|----------|---------|-----|
| NeuRIS | German Federal Ministry of Justice | Open Data | [rechtsinformationen.bund.de](https://www.rechtsinformationen.bund.de) |
| RIS OGD | Austrian Federal Chancellery | CC BY 4.0 | [data.bka.gv.at](https://data.bka.gv.at) |
| EUR-Lex/CELLAR | EU Publications Office | EU Open Data | [publications.europa.eu](https://publications.europa.eu) |

- No authentication or API key required for any source
- No personal data is collected or processed
- Court decisions are public documents by law
- Data is accessed via official public APIs — not by scraping
- Compliant with GDPR and open data principles
- RIS OGD data used under CC BY 4.0 — attribution: Bundeskanzleramt, Rechtsinformationssystem
- EUR-Lex data used under EU Open Data licence

### ⚠️ Limitations

- **Supreme/federal courts only.** State court decisions are not available. This covers the 14 highest courts across DE, AT, and EU.
- **Search result cap (Germany).** The NeuRIS API returns a maximum of 10,000 results per query. Use specific filters to narrow results. For individual decisions, use the ECLI lookup — no cap.
- **NeuRIS in test phase.** The German source has been in public test phase since April 2025. Occasional instability is possible. The Actor includes automatic retry with progressive backoff.
- **Partial failure handling.** If one source is temporarily unavailable, results from other sources are still returned. A `warnings` field indicates which source had issues.
- **Content language.** All court decisions are in German. Metadata field names are in English for ease of integration.

***

### 🇩🇪🇦🇹🇪🇺 Fuer deutschsprachige Nutzer

Dieser Actor bietet programmatischen Zugang zu Gerichtsentscheidungen aus **Deutschland, Oesterreich und der EU** ueber die offiziellen Open-Data-APIs NeuRIS, RIS OGD und EUR-Lex/CELLAR.

**Abgedeckte Gerichte:**

- 🇩🇪 BGH, BVerfG, BVerwG, BFH, BAG, BSG, BPatG (7 Bundesgerichte)
- 🇦🇹 OGH, VwGH, VfGH, BVwG, BFG (5 Hoechstgerichte)
- 🇪🇺 EuGH, EuG (2 EU-Gerichte)

**Drei Nutzungswege:**

1. **REST-API** — Direkt per HTTP abrufbar (`/api/search`, `/api/decisions/{ecli}`, `/api/courts`). Funktioniert mit jedem HTTP-Client. Interaktive API-Dokumentation im Standby-Tab.

2. **MCP-Server** — Direkt in Claude Desktop, Cursor oder andere AI-Agents einbinden. Ihr Agent kann Entscheidungen aus allen drei Jurisdiktionen suchen, abrufen und zitieren. Einrichtung in unter 5 Minuten.

3. **Apify Actor** — Suchparameter eingeben, optional nach Quelle filtern, Ergebnisse als Dataset (JSON/CSV/Excel) herunterladen.

**Kostenlos testen** — Apify bietet Startguthaben fuer neue Accounts. Keine Kreditkarte erforderlich.

Alle Daten stammen aus offiziellen oeffentlichen APIs. Es werden keine personenbezogenen Daten verarbeitet. Gerichtsentscheidungen sind oeffentliche Dokumente. RIS-OGD-Daten unter CC BY 4.0 (Bundeskanzleramt, Rechtsinformationssystem). EUR-Lex-Daten unter EU Open Data Lizenz.

### 💬 Feedback & Support

Found a bug or have a feature request? Open an issue on [GitHub](https://github.com/fuchsblau/apify-actor-court) or reach out via the Apify community.

# Actor input Schema

## `action` (type: `string`):

Choose what to do: search for decisions, retrieve a specific decision by ECLI, or list available courts.

## `query` (type: `string`):

Full-text search term (e.g. "Datenschutz", "Kuendigungsschutz").

## `court` (type: `string`):

Filter by court abbreviation. German federal courts: BGH, BVerfG, BVerwG, BFH, BAG, BSG, BPatG. EU courts: EuGH (Court of Justice), EuG (General Court). Austrian courts: OGH. Optional.

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

Only return decisions from this date onwards (YYYY-MM-DD). Optional.

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

Only return decisions up to this date (YYYY-MM-DD). Optional.

## `limit` (type: `integer`):

Maximum number of results to return (1-300).

## `ecli` (type: `string`):

European Case Law Identifier (e.g. ECLI:DE:BGH:2024:120324UVIZR234.23.0).

## Actor input object example

```json
{
  "action": "search",
  "query": "Kuendigungsschutz",
  "limit": 50
}
```

# Actor output Schema

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

Search results, individual court decisions, or court listings as structured JSON objects in the default dataset.

## `cache` (type: `string`):

Previously retrieved court decisions cached by ECLI for faster repeated access (7-day TTL).

# 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 = {
    "query": "Kuendigungsschutz"
};

// Run the Actor and wait for it to finish
const run = await client.actor("fuchsblau/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 = { "query": "Kuendigungsschutz" }

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

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

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

```

## CLI example

```bash
echo '{
  "query": "Kuendigungsschutz"
}' |
apify call fuchsblau/court-decisions --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=fuchsblau/court-decisions",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Court Decisions MCP + API",
        "description": "Connect your AI agent to court decisions from Germany, Austria, and the EU via MCP Server – or run as Apify Actor. Search by keyword, ECLI, court, source, or date. Structured JSON from official open data APIs (NeuRIS, RIS OGD, EUR-Lex). No API key needed.",
        "version": "1.4",
        "x-build-id": "Xum8LZ9Mjx3f9KRi1"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/fuchsblau~court-decisions/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-fuchsblau-court-decisions",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/fuchsblau~court-decisions/runs": {
            "post": {
                "operationId": "runs-sync-fuchsblau-court-decisions",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/fuchsblau~court-decisions/run-sync": {
            "post": {
                "operationId": "run-sync-fuchsblau-court-decisions",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "action"
                ],
                "properties": {
                    "action": {
                        "title": "Action",
                        "enum": [
                            "search",
                            "getByEcli",
                            "listCourts"
                        ],
                        "type": "string",
                        "description": "Choose what to do: search for decisions, retrieve a specific decision by ECLI, or list available courts.",
                        "default": "search"
                    },
                    "query": {
                        "title": "Search query",
                        "type": "string",
                        "description": "Full-text search term (e.g. \"Datenschutz\", \"Kuendigungsschutz\")."
                    },
                    "court": {
                        "title": "Court filter",
                        "type": "string",
                        "description": "Filter by court abbreviation. German federal courts: BGH, BVerfG, BVerwG, BFH, BAG, BSG, BPatG. EU courts: EuGH (Court of Justice), EuG (General Court). Austrian courts: OGH. Optional."
                    },
                    "dateFrom": {
                        "title": "Date from",
                        "type": "string",
                        "description": "Only return decisions from this date onwards (YYYY-MM-DD). Optional."
                    },
                    "dateTo": {
                        "title": "Date to",
                        "type": "string",
                        "description": "Only return decisions up to this date (YYYY-MM-DD). Optional."
                    },
                    "limit": {
                        "title": "Max results",
                        "minimum": 1,
                        "maximum": 300,
                        "type": "integer",
                        "description": "Maximum number of results to return (1-300).",
                        "default": 50
                    },
                    "ecli": {
                        "title": "ECLI identifier",
                        "type": "string",
                        "description": "European Case Law Identifier (e.g. ECLI:DE:BGH:2024:120324UVIZR234.23.0)."
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
