CEJ Scraper - Consulta de Expedientes Judiciales
Pricing
from $150.00 / 1,000 case records
CEJ Scraper - Consulta de Expedientes Judiciales
Scrapes case details from Peru's CEJ (Consulta de Expedientes Judiciales) system given a case file number and party name.
Pricing
from $150.00 / 1,000 case records
Rating
0.0
(0)
Developer
latam-data
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
8 days ago
Last modified
Categories
Share
⚖️ CEJ Scraper — Peru Court Case Lookup
Look up a case file (expediente) in Peru's judicial portal (CEJ — Consulta de Expedientes Judiciales) by case number and party name: judge, status, subject matter, all parties, and the full chronological case action history with notifications — plus optional attached-document downloads. Solves the site's captcha automatically. Built for legal monitoring, due diligence, and case tracking.
Output example (one record per run)
Field names mirror the source portal's terminology. Every case action (caseActions[]) carries its own notificationsStatus[] history.
{"caseFileNumber": "00001-2020-0-1601-JP-CI-01","judicialBody": "1° JUZGADO DE PAZ LETRADO - Ejemplo","judicialDistrict": "LIMA","judge": "JUAN PEREZ RAMIREZ","legalSpecialist": "MARIA GARCIA TORRES","startDate": "2020-01-15","process": "SUMARISIMO","speciality": "CIVIL","subjectMatters": "OBLIGACION DE DAR SUMA DE DINERO","status": "EN EJECUCION","proceedingStage": "GENERAL","conclusionDate": null,"summary": "DEMANDA DE OBLIGACION DE DAR SUMA DE DINERO","parties": [{"partyType": "DEMANDADO","personType": "NATURAL","firstName": "CARLOS","paternalLastName": "SANCHEZ","maternalLastName": "FLORES","businessName": null}],"caseActions": [{"actionType": "AUTO","rulingNumber": "DIEZ","rulingIssuedDate": "2026-05-04","summary": "HOMOLÓGUESE LA TRANSACCIÓN EXTRAJUDICIAL PRESENTADA POR LAS PARTES...","hasAttachedDocument": true,"documentKey": "00001-2020-0-1601-jp-ci-01_010-resolucion.pdf","notificationsStatus": [{"code": "NOTIFICACIÓN 2026-0000001-JP-CI","recipient": "GARCIA TORRES MARIA","notifiedDate": "2026-05-04"}]}]}
Abbreviated sample — real output includes every field on every case action and notification (dates, folios/fojas counts, delivery details). Set downloadDocuments: true to also save each attached ruling/filing PDF to the run's Key-Value Store, with documentKey pointing to it; otherwise caseActions[].hasAttachedDocument just flags whether one exists.
Try it: input and API
Input (Console Input tab, or via API):
{"caseFileNumber": "00001-2020-0-1601-JP-CI-01","parte": "SANCHEZ FLORES","downloadDocuments": false}
Run and get results back synchronously (blocks until the scrape finishes, ~30-90s, then returns the dataset items directly):
curl -X POST "https://api.apify.com/v2/acts/YOUR_USERNAME~cej-scraper/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \-H "Content-Type: application/json" \-d '{"caseFileNumber":"00001-2020-0-1601-JP-CI-01","parte":"SANCHEZ FLORES"}'
Or trigger an async run with POST /v2/acts/{actorId}/runs and poll/webhook for completion. Export the dataset as JSON, CSV or XLSX from the Console.
What this Actor returns
| 🔑 Case identity | caseFileNumber, judicialBody, judicialDistrict, judge, legalSpecialist, startDate |
| 📋 Case status | process, speciality, subjectMatters, status, proceedingStage, conclusionDate, conclusionReason, summary |
| 👥 Parties | parties[]: role (partyType), person or company (personType), name fields |
| 📄 Case actions | caseActions[]: filings, rulings and decrees in chronological order, each with hasAttachedDocument / documentKey |
| 🔔 Notifications | caseActions[].notificationsStatus[]: delivery status per party for each ruling |
Why look up a Peru court case (expediente) by case number?
- Legal monitoring: track a case's status and new rulings without manually visiting the portal
- Due diligence: check a counterparty's litigation history before a deal
- Law firm ops: pull structured case data into your own case-management system
- Document archival: automatically download every attached ruling/filing PDF as the case progresses
Data comes directly from Peru's official CEJ portal (cej.pj.gob.pe) at scrape time.
Limits
- One case per run (
caseFileNumber+parte) - Captcha solving retries automatically (up to 20 attempts) before failing the run
downloadDocuments: trueadds one extra request per case action with an attached file
FAQ
Does it download the actual documents (PDFs)?
Yes, when downloadDocuments: true — each caseActions[] entry with an attachment gets fetched and stored in the run's Key-Value Store, referenced by documentKey. Without it, you still get hasAttachedDocument: true/false per action at no extra cost.
What if the case or party name doesn't match?
The run fails with a "case not found" error — parte must match a party name as it appears on the portal.
Why does a run sometimes take longer than others? The site's captcha isn't always solved on the first try; the Actor retries automatically (up to 20 times) before giving up.
What case file number format is expected?
The 7-segment format used by the Peruvian judiciary: XXXXX-YYYY-Z-DDDD-AA-BB-CC (e.g. 00001-2020-0-1601-JP-CI-01).
🇵🇪 Resumen en español
Este Actor consulta expedientes judiciales del Perú en el portal CEJ (Consulta de Expedientes Judiciales) por número de expediente y nombre de parte: juez, estado, materia, partes intervinientes e historial completo de actuaciones judiciales con su estado de notificación, resolviendo el captcha del sitio automáticamente. Con downloadDocuments: true también descarga los documentos adjuntos (resoluciones, escritos) al Key-Value Store de la ejecución. Ideal para seguimiento de casos, debida diligencia legal y automatización de estudios jurídicos.