# Spanish Case Law Search: CENDOJ Rulings & Jurisprudencia (`precious_bathmat/cendoj-case-law-search`) Actor

Search Spanish court rulings in CENDOJ (jurisprudencia): Supreme Court, Audiencia Nacional, TSJ, Audiencias Provinciales and first-instance courts. ROJ, ECLI, court, judge, date, summary, link. Plus a case-law report per search. No login.

- **URL**: https://apify.com/precious_bathmat/cendoj-case-law-search.md
- **Developed by:** [Mariam Ahmed](https://apify.com/precious_bathmat) (community)
- **Categories:** Business, Automation
- **Stats:** 2 total users, 2 monthly users, 95.7% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 rulings

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

## Spanish Case Law Search: CENDOJ Rulings & Jurisprudencia

Search **Spanish court rulings in CENDOJ**, the official case-law database of the Spanish judiciary (Consejo General del Poder Judicial), with no login and no API key, and get a **case-law report for every search**:

- **Every ruling**: ROJ, ECLI, type (sentencia, auto, acuerdo), court, chamber, city, date, resolution and appeal numbers, judge (ponente), language, CENDOJ's summary and the link to the full text
- **Past the 200-result limit**: CENDOJ shows at most 200 rulings per search; sorted by date, this Actor splits large searches into date ranges and reads **thousands of rulings, newest first**
- **Filters**: jurisdiction, court, type of ruling, autonomous community, date range, judge, language
- **Report per search over every match**, not only the rulings read: trend by year, jurisdictions, courts, types of ruling, regions, cities, the judges who rule most on the topic, and the latest rulings

### What does this CENDOJ scraper do?

```
CENDOJ · "cláusula suelo" · 127,488 rulings
 2025: 8,009 rulings (-13.7% on 2024, -54% on 2020) · peak year 2021
 Civil 99.9% · Audiencias Provinciales 89.2% · Andalucía 22.5%
 Latest: SAP HU 571/2026, 30 September 2026
```

1. Enter **search terms** in Spanish ("despido improcedente", "cláusula suelo"); quotes find the exact phrase.
2. Pick filters: **jurisdiction**, **court**, **type of ruling**, **region**, **dates**, **judge**, **language**.
3. You get **one row per ruling** and **one report per search**.

```mermaid
flowchart LR
    A[Search terms] --> C[CENDOJ<br/>case-law search]
    B[Filters<br/>jurisdiction, court,<br/>region, dates, judge] --> C
    C --> D[Rulings<br/>ROJ, ECLI, court,<br/>judge, date, summary]
    C --> E[Report<br/>every match: years,<br/>courts, regions,<br/>judges]
```

### Who is it for?

- **Lawyers and law firms**: the latest rulings on your issue, how each court and region decides, which judges handle it most
- **Legal researchers and academics**: thousands of rulings with clean metadata for analysis, and the trend of a legal issue over 40 years
- **Legal tech and AI teams**: a steady feed of new Spanish case law with ROJ, ECLI and summaries for search, RAG or classification
- **Compliance, insurers and banks**: litigation volume on topics like cláusula suelo, accidents or responsabilidad patrimonial, by court and region
- **Journalists**: how many rulings on a topic, where, and how it is changing

### What data do you get?

**Rulings** (dataset, one row per ruling)

| Field | What it tells you |
|---|---|
| `roj`, `ecli` | CENDOJ's ROJ reference and the European Case Law Identifier |
| `resolutionType` | Sentencia, Auto or Acuerdo |
| `court`, `courtLevel`, `chamber` | The court ("TSJ Aragón", "AP Madrid", "TS"), its level and, for the Supreme Court, the Sala |
| `city` | Where the court sits |
| `date` | Date of the ruling |
| `resolutionNumber`, `appealNumber` | Nº de resolución and Nº de recurso |
| `judge` | The ponente |
| `language` | es, ca, gl or eu |
| `summary` | CENDOJ's summary of the ruling |
| `url`, `reference` | Link to the ruling in CENDOJ, and its internal reference |

**Report** (`REPORTS`, one per search, counting every match)

| Field | What it tells you |
|---|---|
| `totalMatches`, `rulingsRead` | How many rulings match, and how many were read |
| `trend` | This year so far and its pace, last full year, change on the year before and over 5 years, peak year |
| `byYear` | Rulings per year, every year |
| `byJurisdiction`, `byResolutionType` | Civil, penal, contencioso, social; sentencias and autos |
| `byCourt` | Which courts rule on it |
| `byRegion`, `topCities` | Where |
| `topJudges`, `judgesWithRulings` | The judges who wrote most rulings on it |
| `latestRulings` | The 10 newest rulings with summary and link |

### Example: 3 October 2026

Six topics, exact phrase, 200 newest rulings each: **1,200 rulings and 6 reports in 3 minutes 12 seconds**.

| Topic | Rulings in CENDOJ | 2025 | vs 2020 | Main jurisdiction | Main court |
|---|---|---|---|---|---|
| Violencia de género | 204,938 | 17,806 (peak year) | +18% | Penal 86% | Audiencias Provinciales 88% |
| Responsabilidad patrimonial | 172,709 | 7,042 | +49% | Contencioso 84% | TSJ, Sala de lo Contencioso 55% |
| Despido improcedente | 161,432 | 5,713 | -39% | Social 93% | TSJ, Sala de lo Social 67% |
| Cláusula suelo | 127,488 | 8,009 | -54% | Civil 99.9% | Audiencias Provinciales 89% |
| Accidente de tráfico | 109,469 | 2,869 | -21% | Civil 49% | Audiencias Provinciales 69% |
| Propiedad horizontal | 97,079 | 3,139 | -17% | Civil 91% | Audiencias Provinciales 83% |

- **Violencia de género** cases hit a record in 2025; **responsabilidad patrimonial** claims are up by half since 2020.
- **Cláusula suelo** litigation is down 54% from 2020 but still produced 8,009 rulings in 2025.
- A single search for **"despido" read 3,000 rulings in 1 minute 47 seconds**, four months of case law, past CENDOJ's 200-result cap.

### Pricing

**$0.001 per ruling** and **$0.02 per search report**.

- 200 rulings with a report: **$0.22**
- The run above (1,200 rulings, 6 reports): **$1.32**
- 3,000 rulings with a report: **$3.02**

Turn off reports to pay for rulings only.

### Good to know

- **Search terms** work like CENDOJ's own search: several words find rulings with all of them (same as `Y`), `O` finds either word, `NO` leaves a word out, and quotes find the exact phrase. "despido improcedente" matches 263,200 rulings; with quotes, 161,432.
- **More than 200 rulings**: sorted by date, the Actor reads newest first through date ranges. Sorted by relevance, CENDOJ stops at 200. If a single day holds more than 200 matching rulings, CENDOJ shows 200 of those, and `RUN_SUMMARY` says so.
- **Report counts cover every match** CENDOJ finds for the search, not only the rulings read.
- **Full text**: each ruling links to its full text in CENDOJ. CENDOJ puts its bulk PDF downloads behind a captcha, so the dataset carries the summary, not the full text.
- **Privacy**: CENDOJ publishes rulings with the parties anonymised. Judges are named as in the official record.
- **Reuse**: CENDOJ data belongs to the Consejo General del Poder Judicial; commercial reuse of its rulings can require the CGPJ's permission. Check the CGPJ's reuse conditions for your use.
- Data comes from **CENDOJ's public search at poderjudicial.es**. **Not affiliated with the CGPJ or CENDOJ.**

### Input

| Field | Meaning |
|---|---|
| **Search terms** | One search each; empty = search by filters only |
| **Jurisdiction** | Civil, penal, contencioso-administrativo, social, militar, especial |
| **Courts** | Tribunal Supremo, Audiencia Nacional, TSJ, Audiencias Provinciales, and first-instance courts by type |
| **Type of ruling** | Sentencia, auto, acuerdo |
| **Regions** | Autonomous communities |
| **Ruling date from / to** | Date range |
| **Judge (ponente)** | Full name as CENDOJ lists it |
| **Language** | Spanish, Catalan, Galician, Basque |
| **Sort** | Newest first (reads past 200) or most relevant (up to 200) |
| **Rulings per search** | 1 to 10,000 (default 200) |
| **Reports** | On by default |

### Integrations

Export to JSON, CSV, Excel or Google Sheets, or connect through the Apify API, webhooks, Make, Zapier and n8n. **Schedule it daily** with a date range to get every new ruling on your topics.

# Actor input Schema

## `searchTerms` (type: `array`):

Words to find in the rulings, one search each, in Spanish (or Catalan, Galician, Basque), e.g. "despido improcedente", "cláusula suelo", "responsabilidad patrimonial". Several words find rulings with all of them; O finds either word, NO leaves a word out, quotes find the exact phrase. Leave empty to search by filters only.

## `jurisdictions` (type: `array`):

Optional: only these jurisdictions.

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

Optional: only rulings from these courts.

## `resolutionTypes` (type: `array`):

Optional: only these types.

## `regions` (type: `array`):

Optional: only rulings from courts in these autonomous communities.

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

Optional: rulings on or after this date.

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

Optional: rulings on or before this date.

## `judge` (type: `string`):

Optional: only rulings written by this judge, full name as CENDOJ lists it, e.g. "MANUEL ALMENAR BELENGUER".

## `language` (type: `string`):

Only rulings written in this language.

## `sort` (type: `string`):

Newest first can read past CENDOJ's 200-per-search limit; most relevant stops at 200.

## `maxRulingsPerSearch` (type: `integer`):

Most rulings to read per search term (1 to 10,000).

## `includeReports` (type: `boolean`):

One report per search over every matching ruling: trend by year, jurisdictions, courts, types of ruling, regions, cities, judges, and the latest rulings.

## Actor input object example

```json
{
  "searchTerms": [
    "despido improcedente"
  ],
  "language": "any",
  "sort": "date",
  "maxRulingsPerSearch": 200,
  "includeReports": true
}
```

# Actor output Schema

## `rulings` (type: `string`):

One row per ruling: ROJ, ECLI, type, court, chamber, city, date, resolution and appeal numbers, judge, language, summary, link.

## `reports` (type: `string`):

Per search, over every match: trend by year, jurisdictions, courts, types of ruling, regions, cities, judges, latest rulings.

## `reportsCsv` (type: `string`):

One flat row per search.

## `summary` (type: `string`):

Requests, problems and the limits of the data.

# 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 = {
    "searchTerms": [
        "despido improcedente"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("precious_bathmat/cendoj-case-law-search").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 = { "searchTerms": ["despido improcedente"] }

# Run the Actor and wait for it to finish
run = client.actor("precious_bathmat/cendoj-case-law-search").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 '{
  "searchTerms": [
    "despido improcedente"
  ]
}' |
apify call precious_bathmat/cendoj-case-law-search --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,precious_bathmat/cendoj-case-law-search"
        }
    }
}
```

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/tKKFxn2KIYxgTUUfx/builds/rKqLA3HObPlBXKFEM/openapi.json
