How to use it: 3 steps
- Make a free Apify accountApify 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.
- Paste your input and press StartNo code needed: you fill in a form (the input). It already has a working example. For example:
despido improcedentein Search phrase. Each start is one run. - Download the resultsWhen 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.
This tool is an Apify Actor: a small program that runs on Apify. You can also run it on a schedule, for example every Monday. New to it? Read how it works, step by step and the 8 words you need first.
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.
Who uses it
Lawyers
Find recent decisions on one legal issue with ROJ and ECLI.
Legal researchers
Build a list of decisions with PDF links for a memo.
Legal-tech builders
Feed full judgment text into a case-law database.
Price
Pay per event: you pay for each result the tool saves, plus a small start fee for each run. The price includes Apify platform costs. Apify bills you, not us. Prices below are for the Apify free plan.
| 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. |
Examples
- 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. That is enough for about 5,300 decisions.
Prices checked on 27 November 2026. See the current price on Apify.
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.
Details
Step by step on Apify
- Search phrase (box 1) is already filled with
despido improcedente. Change it to your topic, a ROJ or an ECLI. - Optional: open Filters and pick courts, jurisdictions, decision types, regions, dates or the order (box 2). Leave them empty to search all of CENDOJ.
- Keep Maximum decisions at 10 for a first test (box 3).
- Start the run.
- 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 for better results
- 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 and good to know
- 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 showslimitReached: "SOURCE_WINDOW" maxItemsis 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_ERRORand keeps the decisions already saved - A full-text PDF that fails with a network error is downloaded once more (
fullTextRetriesin the run summary). If it fails again, the row is saved withfullTextStatus: "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.
courtthen shows only the court name andjurisdictionisnull. Filter by one jurisdiction or turn on full text to fill them
For developers
Sample result
One result from a real test run, in JSON. Real values change from run to run. In Excel or CSV each field is a column.
{
"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. You need your Apify API token from Apify Console → Settings → API & Integrations.
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)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"}'# 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)The cURL call waits for the results, up to 300 seconds. For longer runs, start a run (/runs) and get the results with a webhook or by checking the run. Apify API docs. LlamaIndex, MCP for AI agents and the JavaScript client: AI agents & MCP.
Data fields (15)
| Field | Type | Meaning |
|---|---|---|
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 (16)
The main fields of the input form. With the API you send them as JSON.
| Setting | Name in the API | Type | Example value |
|---|---|---|---|
| Search phrase | query | string | "despido improcedente" |
| More search phrases | searchTerms | array | |
| Courts | courts | array | |
| Jurisdictions | jurisdictions | array | |
| Decision types | resolutionTypes | array | |
| Regions | regions | array | |
| Decision date from | dateFrom | string | |
| Decision date to | dateTo | string | |
| Order | sortOrder | string | "newest" |
| Maximum decisions | maxItems | integer | 10 |
| Include full judgment text | includeFullText | boolean | false |
| Key passages per decision | keyPassages | integer | 0 |
| Words for key passages | passageTerms | array | |
| Decision links | decisionUrls | array | |
| Send results to (optional) | deliveryConnector | string | |
| Notion page or channel (optional) | deliveryTarget | string |
