CENDOJ Spanish Case Law Scraper avatar

CENDOJ Spanish Case Law Scraper

Pricing

from $0.64 / 1,000 rulings

Go to Apify Store
CENDOJ Spanish Case Law Scraper

CENDOJ Spanish Case Law Scraper

Search Spanish court rulings on CENDOJ (poderjudicial.es) by keyword, ROJ/ECLI, court, jurisdiction, region and date. Get ROJ, ECLI, court, city, date, resolution type and number, judge, summary and PDF link, past the 200-result cap.

Pricing

from $0.64 / 1,000 rulings

Rating

0.0

(0)

Developer

Automation Lab

Automation Lab

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

3 days ago

Last modified

Categories

Features

Limited permissions

Share

Search Spanish case law on CENDOJ (the judiciary's official jurisprudence database at poderjudicial.es) and get one clean row per ruling: ROJ, ECLI, court, jurisdiction, city, date, resolution type and number, appeal number, judge (ponente), summary, and direct links to the official PDF and document page.

Unlike the CENDOJ website, this Actor is not limited to 200 results per search. Date-sorted searches are split into date windows automatically, so you can collect every ruling that matches a topic, a court or a judge.

What does CENDOJ Spanish Case Law Scraper do?

  • Runs any CENDOJ search: free words, exact phrases and the same Y / O / NO operators the website accepts.
  • Filters by jurisdiction (civil, penal, contencioso, social, militar), court (Tribunal Supremo, Audiencia Nacional, TSJ, Audiencia Provincial, first-instance courts…), resolution type (sentencia, auto, acuerdo), autonomous community, date range, section, judge, appeal number, resolution number and language.
  • Looks up exact rulings by ROJ or ECLI.
  • Returns a direct PDF link for every ruling, so you can open or archive the official text.
  • Has an only new rulings mode for weekly or daily monitoring of new jurisprudence.

Who is it for?

  • Law firms that follow new case law on their practice areas (desahucios, cláusulas suelo, despidos, IRPH, responsabilidad patrimonial…).
  • Legaltech companies that build search engines, alerts, analytics or AI assistants on Spanish jurisprudence.
  • Researchers and universities that need complete datasets of rulings by court, region or period.
  • Compliance and insurance teams that track how courts rule on a topic over time.
  • Journalists who follow a judge, a court or a high-profile procedure.

Why use this CENDOJ scraper?

  • Every result, not just 200. CENDOJ shows at most 200 results per query; this Actor walks date windows (and splits very busy days by jurisdiction, region and court) to go past that limit.
  • Fast and cheap listings. About 50 rulings per request, so even thousands of rulings come back in minutes.
  • Monitoring built in. Only new rulings mode remembers what earlier runs returned for the same search.
  • Pay per ruling. No subscription and no monthly rental.
  • Clear English field names, ISO dates and one stable schema.

What data can you extract from CENDOJ?

FieldExampleNotes
rojSAP B 8134/2026Official ROJ identifier
ecliECLI:ES:APB:2026:8134European Case Law Identifier
courtAudiencia ProvincialCourt type from the ROJ, for example Tribunal Supremo or Juzgado de lo Social
courtCodeAPCourt abbreviation from the ROJ
jurisdictionSocialWhen the court type or your jurisdiction filter fixes it; otherwise null
cityBarcelonaMunicipality where the court sits
resolutionDate2026-11-16ISO date
resolutionTypeSentenciaSentencia or Auto
resolutionNumber655/2026
appealNumber1680/2024Recurso number
judgeMIGUEL JULIAN COLLADO NUÑOPonente
summarySección nº 19 de la Audiencia…CENDOJ summary or headnote
summaryTypeResumen AutomáticoLabel CENDOJ gives the summary
pdfUrl, documentUrllinksOfficial PDF and CENDOJ page
reference11933265CENDOJ search reference

What this Actor does not include

It does not open the official PDF of each ruling, so it does not return the full text, the 20-digit CENDOJ id, the court section, the procedure type or the case history. Use the pdfUrl link to open a ruling's full document. CENDOJ serves those documents only to Spanish IP addresses, which makes reading every PDF far more expensive than the listing.

How much does it cost to scrape Spanish case law from CENDOJ?

The Actor uses pay-per-event pricing. You pay only for rulings saved to your dataset:

EventPrice (Starter / BRONZE plan)When it is charged
Run start$0.005 per runOnce per run
Ruling$0.000801 per rulingEach ruling saved to the dataset

Higher Apify plans pay less per ruling: SILVER $0.0007209 and GOLD and above $0.0006408.

Cost examples at the Starter price:

  • 50 rulings for a weekly topic alert: $0.005 + 50 × $0.000801 = $0.045.
  • 1,000 rulings for a research dataset: $0.005 + 1,000 × $0.000801 = $0.806.
  • 10,000 rulings for a complete court or topic archive: $0.005 + 10,000 × $0.000801 = $8.015.

Apify's free plan includes monthly credit, enough to try the Actor on thousands of rulings.

How to scrape CENDOJ rulings

  1. Open the Actor and enter one or more Search terms, for example desahucio or "cláusula suelo".
  2. Optionally narrow the search with Jurisdictions, Courts, Resolution types, Autonomous communities and a date range.
  3. Set Maximum results per search.
  4. Click Start and download the results as JSON, CSV, Excel or HTML, or read them through the API.

Input parameters

ParameterDescription
searchTermsWords to search, one search per line. CENDOJ syntax works: quotes for phrases, Y, O, NO.
identifiersExact ROJ (STS 4519/2026) or ECLI (ECLI:ES:TS:2026:4519) values to look up.
maxResultsMaximum rulings per search line (default 50). No 200 ceiling.
sortnewest (default), oldest or relevance. Relevance is limited by CENDOJ to the 200 best matches.
jurisdictionsCIVIL, PENAL, CONTENCIOSO, SOCIAL, MILITAR, ESPECIAL.
courtTypesCourt codes from the dropdown, for example Tribunal Supremo, Audiencia Nacional, TSJ, Audiencia Provincial.
resolutionTypesSENTENCIA, AUTO, ACUERDO.
regionsAutonomous communities, for example MADRID, CATALUÑA, ANDALUCÍA.
dateFrom, dateToRuling date range (YYYY-MM-DD).
section, judge, appealNumber, resolutionNumberExact-match filters as CENDOJ lists them.
languageSpanish, Catalan, Galician or Basque.
onlyNewReturn only rulings that earlier runs of the same search did not return.
proxyConfigurationFallback proxy, Spanish residential by default. CENDOJ serves only Spanish IPs; the Actor tries a Spanish datacenter IP first and switches to this proxy when CENDOJ refuses it.

Example input:

{
"searchTerms": ["desahucio"],
"jurisdictions": ["CIVIL"],
"courtTypes": ["37"],
"regions": ["MADRID"],
"dateFrom": "2026-01-01",
"maxResults": 100
}

To browse without words, leave searchTerms empty and set a filter (for example a court) or a start date.

Output example

{
"searchTerm": "despido",
"position": 1,
"roj": "STSJ PV 3751/2026",
"ecli": "ECLI:ES:TSJPV:2026:3751",
"title": "STSJ País Vasco, a 12 de noviembre de 2026 - ROJ: STSJ PV 3751/2026",
"court": "Tribunal Superior de Justicia",
"courtCode": "TSJ",
"jurisdiction": "Social",
"city": "Bilbao",
"resolutionDate": "2026-11-12",
"resolutionType": "Sentencia",
"resolutionNumber": "2563/2026",
"appealNumber": "2071/2026",
"judge": "JUAN CARLOS BENITO-BUTRON OCHOA",
"summary": "que se cumple la finalidad cuádruple del conocimiento de cargos y posibilidad de pruebas, seguridad y derecho de defensa …",
"summaryType": "Resumen Automático",
"documentUrl": "https://www.poderjudicial.es/search/AN/openDocument/…/20261119",
"pdfUrl": "https://www.poderjudicial.es/search/contenidos.action?action=accessToPDF&publicinterface=true&tab=AN&reference=…&encode=true&optimize=20261119&databasematch=AN",
"reference": "11929480",
"scrapedAt": "2026-11-22T08:01:12.000Z"
}

Monitoring new case law

Schedule the Actor weekly with Only new rulings on. Each run returns only rulings that previous runs of the same search and filters did not return. Without a start date, the Actor checks the 120 days before the newest ruling it has already seen, because CENDOJ publishes many rulings weeks after their date. Send the new rows to Slack, email, Google Sheets or your own database with an Apify integration or webhook.

Tips and limits

  • Going past 200 results works with newest and oldest order. relevance returns at most CENDOJ's 200 best matches.
  • Very busy days (hundreds of rulings on one date) are split by jurisdiction, region and court. If one court still has more than 200 rulings on a single day, the run log says so.
  • Jurisdiction is filled when the court type fixes it (for example Juzgado de lo Social) or when you filter by one jurisdiction. For mixed courts such as the Tribunal Supremo or an Audiencia Provincial, filter by jurisdiction to get it on every row.
  • Only new rulings stores the list of returned ROJ ids in a named key-value store in your account (cendoj-case-law-scraper-state).
  • Set Maximum charge per run to cap spending; the Actor stops cleanly at the limit and keeps the rows already saved.

Integrations

  • Google Sheets / Excel: export each run as CSV or XLSX, or use the Google Sheets integration for a live legal tracker.
  • Slack or email alerts: combine Only new rulings with a schedule and a webhook to notify your team about new judgments.
  • Legal AI and RAG: feed summaries and PDF links into your vector database or document pipeline.
  • Make, Zapier, n8n: trigger the Actor and process rulings in your workflow tools.

Use the CENDOJ scraper with the Apify API

cURL:

curl -X POST "https://api.apify.com/v2/acts/automation-lab~cendoj-case-law-scraper/run-sync-get-dataset-items?token=YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"searchTerms":["desahucio"],"maxResults":20}'

JavaScript:

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_API_TOKEN' });
const run = await client.actor('automation-lab/cendoj-case-law-scraper').call({
searchTerms: ['cláusula suelo'],
jurisdictions: ['CIVIL'],
maxResults: 100,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);

Python:

from apify_client import ApifyClient
client = ApifyClient("YOUR_API_TOKEN")
run = client.actor("automation-lab/cendoj-case-law-scraper").call(run_input={
"searchTerms": ["despido improcedente"],
"courtTypes": ["11|12|13|14|15|16"],
"maxResults": 50,
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
print(item["roj"], item["resolutionDate"], item["court"])

Use with AI agents via MCP

Connect the Actor to Claude, Cursor or another MCP client through the Apify MCP server.

Claude Code:

claude mcp add --transport http apify \
"https://mcp.apify.com?tools=automation-lab/cendoj-case-law-scraper"

Claude Desktop, Cursor or VS Code (JSON configuration):

{
"mcpServers": {
"apify": {
"url": "https://mcp.apify.com?tools=automation-lab/cendoj-case-law-scraper"
}
}
}

The Actor-specific URL also adds the run and dataset tools (get-actor-run, get-dataset-items, get-key-value-store-record, abort-actor-run). Start one run, keep its run ID, and if call-actor returns before the run ends, check that same run with get-actor-run at growing intervals (2, 4, 8 seconds, then every 10) up to a deadline you choose. Once it succeeds, read rows with get-dataset-items using an explicit limit, offset and the fields you need (for example roj,resolutionDate,court,summary), so large result sets do not flood the model context.

Example prompts:

  • "Find the 20 newest Tribunal Supremo civil judgments about cláusula suelo and summarize the outcome of each."
  • "List all Audiencia Provincial de Madrid rulings on desahucio from October 2026 with their judge and appeal number."
  • "Look up ECLI:ES:TS:2026:4519 and give me its court, date, judge and PDF link."

Error reporting and your data

When a run fails, the Actor sends a sanitized error report (error message, stack trace and input with secrets and URL queries removed) to our private GlitchTip error tracker so we can fix bugs quickly. Reports are kept for 30 days and are never shared or used for training. Scraped rulings stay in your own Apify storage. The Actor uses no AI services.

CENDOJ publishes Spanish court rulings for public access, and personal data in them is anonymised by the judiciary before publication. The CGPJ's terms allow consultation and reuse of the published rulings but restrict mass downloading and commercial reuse; check the CENDOJ legal notice and the Spanish rules on reuse of public-sector information for your use case. Keep request volumes reasonable, do not try to re-identify anonymised people, and respect data-protection law (GDPR and LOPDGDD) when you store or publish results. This Actor is not affiliated with or endorsed by the Consejo General del Poder Judicial.

FAQ

Why does the CENDOJ website stop at 200 results, and how does this Actor get more? CENDOJ returns at most 200 results for any query. With newest or oldest order the Actor moves a date cursor past the last ruling it received and searches again, and it splits days with more than 200 rulings by jurisdiction, region and court.

Do I need a proxy? No setup is needed. CENDOJ refuses most datacenter IP addresses. The Actor uses a Spanish datacenter IP first and Apify's Spanish residential proxy as a fallback; both are included in the price.

Can I get the full text of each ruling? Not from this Actor. Every row has pdfUrl, the official PDF of the ruling, which you can open or download yourself. The Actor does not read the PDFs, which keeps it fast and cheap.

My search returns nothing. What should I check? Try fewer words, remove filters one by one, and check that exact-match filters (judge, appeal number, section) are written exactly as CENDOJ shows them. A ROJ must include its court code, for example STS 4519/2026.

Can I get rulings in Catalan, Galician or Basque? Yes. Use the Language filter, or leave it on Any to get every language.