# CENDOJ Scraper: Spanish Case Law with ROJ, ECLI and Full Text

> CENDOJ scraper: search Spanish case law by phrase, court, region, type and date. Get ROJ, ECLI, summary, PDF link and full text if you want.

URL: https://cliqtomedia.com/actors/cendoj-case-law/

Category: Government & open data · Status: live on Apify Store · Apify page: https://apify.com/cliqtomedia/cendoj-case-law?fpr=cliqto

Search Spanish court decisions by phrase, ROJ, ECLI, court, region, type or date. You get one row per decision. Each row has the ROJ, ECLI, court, date, summary and PDF link. Full judgment text is optional.

## How to use it: 3 steps

1. **Make a free Apify account.** Apify is the cloud platform where our tools run. The free plan gives you $5 of usage every month, no credit card needed. You pay Apify, not us.
2. **Paste your input and press Start.** No code needed: you fill in a form (the input). It already has a working example. For example: `despido improcedente` in Search phrase. Each start is one run.
3. **Download the results.** When the run ends, the results are in a table (the dataset). Open Output, press Export and pick Excel or CSV. JSON and the API are there too.

## What it does

Search Spanish case law in CENDOJ, the official judicial documentation centre of the General Council of the Judiciary, by phrase, ROJ, ECLI, court, jurisdiction, region, decision type and date. Get one row per court decision with ROJ, ECLI, court, date, summary, PDF link and, if you want, the full judgment text and key passages.



### Good for

- Find recent Supreme Court or regional court decisions on one legal issue, such as unfair dismissal or mortgage costs.
- Build a list of decisions with ROJ, ECLI and PDF links for a legal memo or a case-law database.
- Get the full text and key paragraphs of known decisions from their CENDOJ links.
- Track new decisions on a topic with a scheduled run sorted by newest first.

## Price

Pay per event. Apify bills you, not us.

| What you pay for | Price | When |
|---|---|---|
| Start fee | $0.009 | Charged once per run. This tool uses 1 GB of memory or less by default; more memory costs more. |
| Decision | $0.0009 (from $0.00063 on paid Apify plans) | Charged for a saved decision with metadata and source links. |
| Decision with full text | $0.01 (from $0.007 on paid Apify plans) | Charged for a saved decision when its full PDF text was extracted. |

- One decision: about $0.0099.
- 1,000 decisions: about $0.94 (4 runs of up to 300).
- Every day 100 decisions, for 30 days: about $2.97 a month.
- 300 decisions once a week (4 runs a month): about $1.12 a month.

Free to try: the Apify free plan gives you $5 of usage every month, no credit card needed.

Prices checked on 27 November 2026. Current price: https://apify.com/cliqtomedia/cendoj-case-law?fpr=cliqto

## Questions

### Do I need a CENDOJ account or key?

No. The case law is public. You need only an Apify account.

### Can I search by ROJ or ECLI?

Yes. Put the ROJ or ECLI in the search phrase.

### How many results can I get?

CENDOJ shows up to 200 results per search. The Actor splits date ranges to go further, up to 300 decisions per phrase.

### Why is `jurisdiction` empty for some rows?

CENDOJ result rows for regional and lower courts do not name the chamber. Filter by one jurisdiction, or turn on full text, and the field is filled.

### How fresh are the results?

Each run reads the live CENDOJ search, so you get what CENDOJ shows at that moment. CENDOJ adds decisions some days or weeks after the decision date. Use `sortOrder: "recentlyAdded"` to see the newest additions.

### Can I get more than 300 decisions?

One phrase saves up to 300 decisions per run, and one run can have up to 20 phrases. For more decisions on one topic, split the date range across several runs with `dateFrom` and `dateTo`.

## Data fields

- `roj` (string): Official Spanish court decision identifier. Null only for a decision link whose PDF could not be read.
- `ecli` (string): European Case Law Identifier, when available.
- `court` (string): Court or chamber reported by CENDOJ, or court type identified from the ECLI.
- `jurisdiction` (string): Area of law when the source, chamber or selected filter identifies it.
- `date` (string): Date of the decision in YYYY-MM-DD format. Null only for a decision link whose PDF could not be read.
- `resolutionType` (string): Spanish decision type, such as Sentencia or Auto, when available.
- `summary` (string): Summary or excerpt from CENDOJ, when available.
- `keyPassages` (array): Paragraphs of the full text that contain your search words, when key passages were requested.
- `fullText` (string): Selectable text extracted from the official PDF when requested and available.
- `fullTextStatus` (string): Whether the text was available, unavailable or not requested.
- `pdfUrl` (string): Official CENDOJ link that opens the PDF. CENDOJ may request verification.
- `url` (string): Official CENDOJ link for the decision.
- `searchTerm` (string): Search phrase that found the decision. Null for decisions requested by link.
- `source` (string): Name of the source.
- `fetchedAt` (string): UTC time when the search result was received.

## Input settings

- `query` (string): Enter a phrase, ROJ or ECLI to find Spanish court decisions. Leave blank to use filters or decision links alone. If every field is blank, the example search runs.
- `searchTerms` (array): Add up to 20 more phrases. Each phrase is a separate search and gets its own Maximum decisions. Each row shows the phrase that found it.
- `courts` (array): Limit decisions to these CENDOJ courts. Leave empty to search all courts.
- `jurisdictions` (array): Limit decisions to these areas of law. Leave empty to search all jurisdictions.
- `resolutionTypes` (array): Limit decisions to these types. Sentencia is a judgment, Auto is a court order. Leave empty for all types.
- `regions` (array): Limit decisions to courts in these autonomous communities. Leave empty for all of Spain.
- `dateFrom` (string): Include decisions made on or after this date.
- `dateTo` (string): Include decisions made on or before this date.
- `sortOrder` (string): Order of decisions in each search.
- `maxItems` (integer): Maximum decisions to save for each search phrase, up to 300. CENDOJ shows 200 results per search. Above 200, the Actor splits the date range into smaller searches. Use at most 20 when full text is on. The charge cap can reduce this number.
- `includeFullText` (boolean): Extract selectable text from official PDFs. This mode supports up to 20 decisions per phrase. A missing or scanned PDF can still return a metadata row.
- `keyPassages` (integer): Return up to this many paragraphs of the full text that contain your search words. Needs full text or decision links. 0 turns it off.
- `passageTerms` (array): Pick passages with these words instead of the search phrase.
- `decisionUrls` (array): Get the full text of up to 20 decisions by their CENDOJ links (openDocument). Clear the search phrase to fetch only these decisions.
- `deliveryConnector` (string): Your Slack, Notion or other MCP connector. After the run the Actor posts a short summary there. Connect services once in Apify Console → MCP connectors.
- `deliveryTarget` (string): Where to post the summary: a Notion page link (each run is added on top of that page) or a Slack channel ID. Notion needs a page here; without it the summary is not sent and the run summary says why.

## Step by step on Apify

1. Search phrase (box 1) is already filled with `despido improcedente`. Change it to your topic, a ROJ or an ECLI.
2. Optional: open Filters and pick courts, jurisdictions, decision types, regions, dates or the order (box 2). Leave them empty to search all of CENDOJ.
3. Keep Maximum decisions at 10 for a first test (box 3).
4. Start the run.
5. Open the Output tab. Check the ROJ and ECLI columns (box 1), read the Summary column (box 2) and use Export to download the table (box 3).

## Use cases

| Task | Input | You get | Key fields | Next step |
|---|---|---|---|---|
| Research case law on one legal issue | `query`, `courts`, `jurisdictions` | Court decision | `roj`, `ecli`, `court`, `date`, `summary` | Export to Excel or CSV |
| Collect Supreme Court doctrine for a period | `courts`, `dateFrom`, `dateTo`, `maxItems` | Court decision | `roj`, `date`, `resolutionType`, `pdfUrl` | Legal research database via API |
| Read the reasoning of known decisions | `decisionUrls`, `keyPassages`, `passageTerms` | Decision with full text | `fullText`, `keyPassages`, `ecli` | Your own review or AI summary step |
| Feed a legal AI assistant with sources | `query`, `includeFullText`, `keyPassages` | Decision with full text | `fullText`, `keyPassages`, `url` | MCP or API |
| Watch for new decisions on a topic | `query`, `sortOrder: recentlyAdded` | Court decision | `roj`, `date`, `url` | Apify schedule and Slack or Notion summary |

## Tips

- Start with one phrase and 10 decisions to check the result.
- Use court, region and date filters to keep the list on topic.
- Full text works for up to 20 decisions per phrase. For big lists, split by date range.

## Limits



- The Actor reads only what the public CENDOJ search shows. It does not include unpublished or anonymised-away data, and it does not log in.
- CENDOJ shows at most 200 results for one search. Above 200, the Actor splits the date range. A single day with more than 200 matching decisions can still give fewer rows than `maxItems`; the run summary then shows `limitReached: "SOURCE_WINDOW"`.
- `maxItems` is per phrase: up to 300 without full text and up to 20 with full text. This is the size we tested: 900 decisions (3 phrases × 300) in 3–4 minutes. For larger exports, run several date ranges. You pay only for decisions that were saved.
- Each request waits up to 12 seconds (search pages up to 30 seconds). Search pages are capped at 2 MiB; a larger answer stops the run with `RESPONSE_LIMIT`.
- When CENDOJ does not answer, the Actor retries the request up to 3 times in a row on new proxy sessions, the third time through a Spanish residential proxy. A run allows 10 retries in total. If CENDOJ still does not answer, the run stops with `SOURCE_NETWORK_ERROR` and keeps the decisions already saved.
- A full-text PDF that fails with a network error is downloaded once more (`fullTextRetries` in the run summary). If it fails again, the row is saved with `fullTextStatus: "unavailable"` at the price of a decision without full text.
- The run also stops at the run timeout (300 seconds by default) or at your maximum charge, and keeps what it saved. The run summary shows `limitReached: "CHARGE_LIMIT"` for the charge limit.
- For regional and lower courts (TSJ, Audiencia Provincial and others), the search row has no chamber. `court` then shows only the court name and `jurisdiction` is `null`. Filter by one jurisdiction or turn on full text to fill them.

## Sample result

```json
{
  "roj": "STS 4557/2026",
  "ecli": "ECLI:ES:TS:2026:4557",
  "court": "Tribunal Supremo. Sala de lo Social",
  "jurisdiction": "SOCIAL",
  "date": "2026-11-11",
  "resolutionType": "Sentencia",
  "summary": "Efectos del desistimiento ante el Juzgado de lo Social de la acción de reclamación de indemnización …",
  "keyPassages": [
    "2. En la demanda que ha dado origen a las presentes actuaciones, la parte actora reclama, como pretensión principal, …",
    "2. Como ha quedado reseñado en la precedente fundamentación jurídica, …"
  ],
  "fullText": "JURISPRUDENCIA Roj: STS 4557/2026 - ECLI:ES:TS:2026:4557 Órgano: Tribunal Supremo. Sala de lo Social Sede: Madrid …",
  "fullTextStatus": "available",
  "pdfUrl": "https://www.poderjudicial.es/search/AN/openDocument/0ee79af283d5d4baa0a8778d75e36f0d/20261119",
  "url": "https://www.poderjudicial.es/search/AN/openDocument/0ee79af283d5d4baa0a8778d75e36f0d/20261119",
  "searchTerm": "despido improcedente",
  "source": "CENDOJ",
  "fetchedAt": "2026-11-20T04:08:22.357Z"
}
```

## Use it from code

Actor ID: `cliqtomedia/cendoj-case-law`

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("cliqtomedia/cendoj-case-law").call(run_input={
    "query": "despido improcedente",
    "sortOrder": "newest"
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)
```

```bash
curl -X POST "https://api.apify.com/v2/acts/cliqtomedia~cendoj-case-law/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"query": "despido improcedente", "sortOrder": "newest"}'
```

```python
# pip install langchain-apify
# set APIFY_TOKEN in your environment
from langchain_apify import ApifyActorsTool

tool = ApifyActorsTool("cliqtomedia/cendoj-case-law")
result = tool.invoke({"run_input": {"query": "despido improcedente", "sortOrder": "newest"}})
print(result)
```

run-sync waits up to 300 seconds; for longer runs start a run and use a webhook. LlamaIndex and MCP: https://cliqtomedia.com/actors/ai-agents/

## Similar tools

- [Google Patent Details Scraper: Claims & Metadata Export](https://cliqtomedia.com/actors/google-patents-scraper/)
- [EU TED Tenders Scraper & Monitor: Public Procurement](https://cliqtomedia.com/actors/eu-ted-tenders-scraper/)
- [North Data Company Search & Financials (Europe) - No Login](https://cliqtomedia.com/actors/north-data-companies/)
- [FDA Recalls & Enforcement Monitor: openFDA Reports](https://cliqtomedia.com/actors/fda-recalls-enforcement-monitor/)
- [NASA POWER Weather & Solar Data: Coordinates Export](https://cliqtomedia.com/actors/nasa-power-climate-data/)
- [NPI Registry Provider Lookup — US Practices & Taxonomies](https://cliqtomedia.com/actors/npi-registry-provider-lookup/)
