# CENDOJ Scraper — Spanish Case Law (Jurisprudencia) (`hipersoft/cendoj-scraper`) Actor

Search Spanish case law from CENDOJ / Poder Judicial: sentencias and autos from the Tribunal Supremo, Audiencias Provinciales, TSJ and all courts. ROJ, ECLI, date, court, judge, appeal number, summary and document link. Filter by text, jurisdiction and dates.

- **URL**: https://apify.com/hipersoft/cendoj-scraper.md
- **Developed by:** [Hipersoft](https://apify.com/hipersoft) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.00075 / resolution

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## CENDOJ Scraper: Spanish Case Law Search (Jurisprudencia del Poder Judicial)

**CENDOJ Scraper** searches **Spanish case law** in **CENDOJ**, the judicial documentation centre of the Consejo General del Poder Judicial. It returns **sentencias, autos and other resolutions** from the **Tribunal Supremo, Audiencia Nacional, Tribunales Superiores de Justicia, Audiencias Provinciales** and first-instance courts. Each resolution comes with the **ROJ, ECLI, date, court, chamber, resolution number, municipality, reporting judge (ponente), appeal number, summary and a link to the full document**. Search by free text, jurisdiction, date range, judge, ROJ or ECLI, and export to **CSV, Excel or JSON**. By splitting date ranges automatically, the scraper collects **far more than the 200 results** the website returns per search.

### What does CENDOJ Scraper do?

- ⚖️ **Search all Spanish courts or only the Supreme Court** with free text (texto libre).
- 🗂️ **Filter by jurisdiction**: civil, penal, contencioso-administrativo, social, militar or especial.
- 📅 **Filter by resolution date**, with automatic splitting for complete results.
- 👨‍⚖️ **Filter by reporting judge** (ponente), or look up a specific **ROJ** or **ECLI**.
- 📝 **Summaries**: the official summary (resumen) of each resolution when available.
- 🔗 **Document link** to read or download the full text.

### What data can you scrape from CENDOJ?

| Field | Example |
|---|---|
| ROJ | `STS 3865/2026` |
| ECLI | `ECLI:ES:TS:2026:3865` |
| Title | STS, a 23 de septiembre de 2026 - ROJ: STS 3865/2026 |
| Court type | `STS`, `SAP`, `STSJ`, `SAN`… |
| Date | 2026-09-23 |
| Chamber | Sala de lo Penal |
| Resolution number | 554/2026 |
| Municipality | Madrid |
| Judge (ponente) | ANTONIO DEL MORAL GARCIA |
| Appeal number | 10609/2025 |
| Summary | Delito de grupo criminal: … |
| Document link | full resolution |

### Use cases for Spanish case law data

- **Lawyers and law firms**: find the latest rulings on a topic (desahucio, cláusula suelo, despido, IRPH…) across all courts.
- **Legal research and academia**: build datasets of resolutions by court, judge, jurisdiction and period.
- **Legal tech and AI**: feed case-law metadata and summaries into search engines, RAG systems and analytics.
- **Litigation analytics**: track how a judge or court rules on specific issues.
- **Compliance and monitoring**: get alerts on new Supreme Court resolutions about your sector.

### How to search Spanish case law

1. Click **Try for free** to open CENDOJ Scraper in Apify Console.
2. Enter **search text**, and optionally choose **courts**, **jurisdictions** and a **date range**.
3. Optionally filter by **judge**, or look up a **ROJ** or **ECLI**.
4. Set **Max resolutions** and click **Start**.
5. Download the results as **CSV, Excel or JSON**.

### Input

#### Example input

```json
{
  "searchText": "desahucio",
  "court": "all",
  "jurisdictions": ["civil"],
  "dateFrom": "2025-01-01",
  "dateTo": "2025-12-31",
  "sort": "newest",
  "maxItems": 2000
}
```

| Field | Description |
|---|---|
| **Search text** | Free-text search in the resolutions. |
| **Courts** | All courts or Tribunal Supremo only. |
| **Jurisdictions** | Civil, penal, contencioso, social, militar, especial. |
| **Resolution date from / to** | Date range. Set it to collect more than 200 results. |
| **Judge (ponente)** | Reporting judge's name. |
| **ROJ / ECLI** | Look up a specific resolution. |
| **Sort by** | Newest, oldest or relevance. |
| **Max resolutions** | Stop after this many results (0 = no limit). |

### Output

#### Resolution example

```json
{
  "roj": "STS 3865/2026",
  "ecli": "ECLI:ES:TS:2026:3865",
  "title": "STS, a 23 de septiembre de 2026 - ROJ: STS 3865/2026",
  "courtType": "STS",
  "date": "2026-09-23",
  "chamber": "Sala de lo Penal",
  "resolutionNumber": "554/2026",
  "municipality": "Madrid",
  "judge": "ANTONIO DEL MORAL GARCIA",
  "appealNumber": "10609/2025",
  "summary": "Delito de grupo criminal: para su consumación basta el establecimiento del grupo …",
  "documentUrl": "https://www.poderjudicial.es/search/TS/openDocument/9444878079cc2356a0a8778d75e36f0d/20261001",
  "database": "TS"
}
```

#### Output schema

| Field | Type | Description |
|---|---|---|
| `roj` | string | ROJ identifier. |
| `ecli` | string | European Case Law Identifier. |
| `title` | string | Resolution title. |
| `courtType` | string | Court abbreviation (STS, SAP, STSJ, SAN…). |
| `date` | string | Resolution date (YYYY-MM-DD). |
| `chamber` | string | Chamber (Sala), when shown. |
| `resolutionNumber` | string | Resolution number. |
| `municipality` | string | Court municipality. |
| `judge` | string | Reporting judge (ponente). |
| `appealNumber` | string | Appeal / case number. |
| `summary` | string | Summary (resumen), when available. |
| `documentUrl` | string (URL) | Link to the full resolution. |
| `database` | string | `TS` (Supreme Court) or `AN` (all courts). |
| `cendojId` | string | Internal document reference. |
| `searchText` | string | Search text used. |
| `scrapedAt` | string (ISO date) | When the row was collected. |

### How much does it cost?

CENDOJ Scraper uses **pay-per-resolution** pricing: a small fixed price per resolution, with automatic discounts on higher Apify plans. See the **Pricing** tab for the exact price.

### More public-sector and legal data

- [Arbeitsagentur Jobs Scraper](https://apify.com/hipersoft/arbeitsagentur-jobs-scraper): Germany's federal job board.
- [North Data Scraper](https://apify.com/hipersoft/northdata-scraper): European company register data.

### FAQ

**Why does the website stop at 200 results?**
CENDOJ returns at most 200 documents per search. When you set a date range, the scraper splits it into smaller periods automatically and collects everything.

**Does it include the full text of the judgment?**
Each result includes the official summary when available and a link to the full document.

**Which courts are covered?**
All courts in CENDOJ: Tribunal Supremo, Audiencia Nacional, Tribunales Superiores de Justicia, Audiencias Provinciales and first-instance courts.

**Can I search in Catalan, Basque or Galician?**
Search text is matched against the documents as published, mostly in Spanish.

**What formats can I export?**
CSV, Excel, JSON, XML, HTML and RSS, or read the results through the Apify API.

**Can I integrate CENDOJ Scraper with other apps?**
CENDOJ Scraper can be connected with almost any cloud service or web app thanks to [integrations on the Apify platform](https://apify.com/integrations). It works with [Make](https://apify.com/integrations/make), [Zapier](https://apify.com/integrations/zapier), [Slack](https://docs.apify.com/platform/integrations/slack), [Airbyte](https://docs.apify.com/platform/integrations/airbyte), [GitHub](https://docs.apify.com/platform/integrations/github), [Google Drive](https://docs.apify.com/platform/integrations/drive) and [many more](https://apify.com/integrations), plus the [Apify API](https://docs.apify.com/api/v2), JS/Python clients and MCP. Or use [webhooks](https://docs.apify.com/platform/integrations/webhooks) to trigger an action whenever a run finishes.

**Is it legal to scrape CENDOJ?**
CENDOJ publishes anonymized court resolutions for public access. You are responsible for using the data in line with CENDOJ's terms of reuse.

### Related Actors

- [North Data Scraper](https://apify.com/hipersoft/northdata-scraper)

### Notes

Original clean-room implementation. Returns only public data; you are responsible for compliance with CENDOJ's terms. Not affiliated with the Consejo General del Poder Judicial.

# Actor input Schema

## `searchText` (type: `string`):

Words to search in the resolutions, e.g. desahucio, cláusula suelo, despido improcedente, responsabilidad patrimonial.

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

All Spanish courts, or only the Supreme Court (Tribunal Supremo).

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

Limit to these jurisdictions. Leave empty for all.

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

Earliest resolution date (YYYY-MM-DD). Setting a date range lets the scraper collect more than 200 results.

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

Latest resolution date (YYYY-MM-DD). Defaults to today when only a start date is given.

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

Optional: name of the reporting judge, e.g. PEDRO JOSE VELA TORRES.

## `roj` (type: `string`):

Optional: look up a specific ROJ, e.g. STS 3865/2026.

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

Optional: look up a specific ECLI, e.g. ECLI:ES:TS:2026:3865.

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

Order of results.

## `maxItems` (type: `integer`):

Stop after this many resolutions. 0 means no limit.

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

Not required for normal use.

## Actor input object example

```json
{
  "searchText": "desahucio",
  "court": "all",
  "dateFrom": "2025-01-01",
  "sort": "newest",
  "maxItems": 100,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `results` (type: `string`):

The results as dataset items.

# 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 = {
    "searchText": "desahucio",
    "dateFrom": "2025-01-01",
    "maxItems": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("hipersoft/cendoj-scraper").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 = {
    "searchText": "desahucio",
    "dateFrom": "2025-01-01",
    "maxItems": 100,
}

# Run the Actor and wait for it to finish
run = client.actor("hipersoft/cendoj-scraper").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 '{
  "searchText": "desahucio",
  "dateFrom": "2025-01-01",
  "maxItems": 100
}' |
apify call hipersoft/cendoj-scraper --silent --output-dataset

```

## MCP server setup

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

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/oDMTnwzaqZksdfDOV/builds/cciz0Cmk9YGuk6mLT/openapi.json
