{
  "openapi": "3.0.1",
  "info": {
    "title": "CENDOJ Scraper: Spanish Case Law and Jurisprudencia, Full Text",
    "description": "Search Spanish case law from CENDOJ / Poder Judicial (jurisprudencia): sentencias, autos, and acuerdos with real court names, not internal codes. Full judgment text in one run, no second paid run needed, plus Monitor Mode for new rulings. Exports to CSV, JSON, or Excel. From $0.82/1,000 results.",
    "version": "0.1",
    "x-build-id": "uQaMS8JnbHMd2esnI"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/getascraper~cendoj-case-law-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-getascraper-cendoj-case-law-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/getascraper~cendoj-case-law-scraper/runs": {
      "post": {
        "operationId": "runs-sync-getascraper-cendoj-case-law-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/getascraper~cendoj-case-law-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-getascraper-cendoj-case-law-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "searchTerms": {
            "title": "Search Terms",
            "maxItems": 4,
            "type": "array",
            "description": "Free-text terms to search for in Spanish case law (sentencias, autos, acuerdos). Up to 4 terms per run, each run as a separate query. Supports boolean operators (AND, OR, NOT, NEARn).",
            "default": [
              "divorcio"
            ],
            "items": {
              "type": "string"
            }
          },
          "roj": {
            "title": "ROJ Identifier",
            "type": "string",
            "description": "Look up one exact resolution by its official Jurisprudence Repository identifier (ROJ), e.g. \"STS 3709/2026\". Leave blank for a general search.",
            "default": ""
          },
          "ecli": {
            "title": "ECLI Identifier",
            "type": "string",
            "description": "Look up one exact resolution by its European Case Law Identifier (ECLI), e.g. \"ECLI:ES:TS:2026:3709\". Leave blank for a general search.",
            "default": ""
          },
          "jurisdictions": {
            "title": "Jurisdictions",
            "type": "array",
            "description": "Limit results to one or more judicial branches. Leave empty to search all jurisdictions.",
            "items": {
              "type": "string",
              "enum": [
                "CIVIL",
                "PENAL",
                "CONTENCIOSO",
                "SOCIAL",
                "MILITAR",
                "ESPECIAL"
              ],
              "enumTitles": [
                "Civil",
                "Penal",
                "Contencioso-Administrativo",
                "Social",
                "Militar",
                "Especial"
              ]
            },
            "default": []
          },
          "resolutionTypes": {
            "title": "Resolution Types",
            "type": "array",
            "description": "Limit results to one or more resolution types (judgment, order, agreement). Leave empty to include all types.",
            "items": {
              "type": "string",
              "enum": [
                "SENTENCIA",
                "SENTENCIA CASACION",
                "SENTENCIA OTRAS",
                "AUTO",
                "AUTO ACLARATORIO",
                "AUTO RECURSO",
                "AUTO ADMISION",
                "AUTO INADMISION",
                "AUTO OTROS",
                "ACUERDO"
              ],
              "enumTitles": [
                "Sentencia (judgment)",
                "Sentencia de casacion (L.O. 7/2015)",
                "Sentencia, otras",
                "Auto (order)",
                "Auto aclaratorio",
                "Auto recurso de casacion (L.O. 7/2015)",
                "Auto de admision",
                "Auto de inadmision",
                "Auto, otros",
                "Acuerdo (agreement)"
              ]
            },
            "default": []
          },
          "organoTypes": {
            "title": "Court / Organo Type",
            "type": "array",
            "description": "Limit results to one or more court types. The dropdown shows real court names, not the raw numeric codes CENDOJ uses internally (its own search form and the main incumbent actor both expose those bare codes and expect you to know what they mean). Leave empty to search all courts.",
            "items": {
              "type": "string",
              "enum": [
                "11",
                "12",
                "13",
                "14",
                "15",
                "16",
                "22",
                "2264",
                "23",
                "24",
                "25",
                "26",
                "27",
                "28",
                "29",
                "31",
                "31201202",
                "33",
                "34",
                "37",
                "38",
                "1001",
                "1002",
                "41",
                "42",
                "43",
                "44",
                "45",
                "47",
                "48",
                "50",
                "51",
                "52",
                "53",
                "83",
                "85"
              ],
              "enumTitles": [
                "Tribunal Supremo, Sala de lo Civil",
                "Tribunal Supremo, Sala de lo Penal",
                "Tribunal Supremo, Sala de lo Contencioso",
                "Tribunal Supremo, Sala de lo Social",
                "Tribunal Supremo, Sala de lo Militar",
                "Tribunal Supremo, Sala de lo Especial",
                "Audiencia Nacional, Sala de lo Penal",
                "Sala de Apelacion de la Audiencia Nacional",
                "Audiencia Nacional, Sala de lo Contencioso",
                "Audiencia Nacional, Sala de lo Social",
                "Audiencia Nacional, Juzgado Central de Vigilancia Penitenciaria",
                "Audiencia Nacional, Juzgado Central de Menores",
                "Audiencia Nacional, Juzgados Centrales de Instruccion",
                "Audiencia Nacional, Juzgados Centrales de lo Penal",
                "Audiencia Nacional, Juzgados Centrales de lo Contencioso",
                "Tribunal Superior de Justicia, Sala de lo Civil y Penal",
                "TSJ, Seccion de Apelacion Penal (Sala de lo Civil y Penal)",
                "Tribunal Superior de Justicia, Sala de lo Contencioso",
                "Tribunal Superior de Justicia, Sala de lo Social",
                "Audiencia Provincial",
                "Audiencia Provincial, Tribunal Jurado",
                "Tribunal de Marca de la UE",
                "Juzgados de Marca de la UE",
                "Juzgado de 1a Instancia e Instruccion",
                "Juzgado de Primera Instancia",
                "Juzgado de Instruccion",
                "Juzgado de lo Social",
                "Juzgado de lo Contencioso Administrativo",
                "Juzgado de lo Mercantil",
                "Juzgado de Violencia sobre la Mujer",
                "Tribunal Instancia, Seccion Familia, Infancia y Capacidad",
                "Juzgado de lo Penal",
                "Juzgado de Vigilancia Penitenciaria",
                "Juzgado de Menores",
                "Tribunal Militar Territorial",
                "Tribunal Militar Central"
              ]
            },
            "default": []
          },
          "ponente": {
            "title": "Reporting Magistrate (Ponente)",
            "type": "string",
            "description": "Filter by the name of the reporting magistrate (ponente). Leave blank to search all.",
            "default": ""
          },
          "autonomousCommunities": {
            "title": "Autonomous Communities",
            "type": "array",
            "description": "Limit results to one or more Spanish autonomous communities or autonomous cities. This filter is best-effort: CENDOJ's own search form builds this list client-side with JavaScript, so the exact server-side encoding could not be fully confirmed against a live request. Leave empty to search all of Spain if you hit unreliable filtering.",
            "items": {
              "type": "string",
              "enum": [
                "ANDALUCIA",
                "ARAGON",
                "ASTURIAS",
                "BALEARES",
                "CANARIAS",
                "CANTABRIA",
                "CASTILLA-LA MANCHA",
                "CASTILLA Y LEON",
                "CATALUÑA",
                "CEUTA",
                "COMUNIDAD VALENCIANA",
                "EXTREMADURA",
                "GALICIA",
                "MADRID",
                "MELILLA",
                "MURCIA",
                "NAVARRA",
                "PAIS VASCO",
                "RIOJA"
              ],
              "enumTitles": [
                "Andalucia",
                "Aragon",
                "Asturias",
                "Islas Baleares",
                "Canarias",
                "Cantabria",
                "Castilla-La Mancha",
                "Castilla y Leon",
                "Cataluña",
                "Ceuta",
                "Comunidad Valenciana",
                "Extremadura",
                "Galicia",
                "Madrid",
                "Melilla",
                "Region de Murcia",
                "Navarra",
                "Pais Vasco",
                "La Rioja"
              ]
            },
            "default": []
          },
          "dateFrom": {
            "title": "Resolution Date From",
            "type": "string",
            "description": "Only include resolutions dated on or after this date."
          },
          "dateTo": {
            "title": "Resolution Date To",
            "type": "string",
            "description": "Only include resolutions dated on or before this date."
          },
          "sortOrder": {
            "title": "Sort Order",
            "enum": [
              "RELEVANCE",
              "DATE_DESC",
              "DATE_ASC",
              "COURT_ASC",
              "COURT_DESC"
            ],
            "type": "string",
            "description": "How to order results within each search term.",
            "default": "RELEVANCE"
          },
          "searchProxyConfiguration": {
            "title": "Proxy for Search Requests",
            "required": [],
            "type": "object",
            "description": "Proxy used for search queries when \"Extract Full Judgment Text\" is off (the default). Datacenter proxy is sufficient here: verified live, CENDOJ's search endpoint returns normal results over plain Apify datacenter proxy with no residential IP needed. Ignored when full-text extraction is on, see the note on that field below.",
            "default": {
              "useApifyProxy": true
            }
          },
          "extractFullText": {
            "title": "Extract Full Judgment Text",
            "type": "boolean",
            "description": "Fetch and extract the full PDF text of each matched resolution in this same run. Off by default because it is a slower, costlier step that requires a residential Spanish proxy (see below). The main incumbent actor for this niche cannot do this in one run at all, it requires starting a second, separate run with the PDF URLs as input.",
            "default": false
          },
          "fullTextProxyConfiguration": {
            "title": "Proxy for Full-Text Document Fetches",
            "required": [],
            "type": "object",
            "description": "Proxy used for the ENTIRE run, search included, when \"Extract Full Judgment Text\" is on (it replaces the search proxy above for that run). This must stay Residential with country Spain (ES): verified live that CENDOJ routes datacenter-proxy requests for the document/PDF endpoint through a CAPTCHA challenge, while Spanish residential IPs are not challenged, and that the document reference is bound to the same session that ran the search, so search and document fetch cannot use two different proxy sessions. This Actor never attempts to solve a CAPTCHA; it only avoids triggering one by using a proxy tier and session the source site treats as one continuous normal visitor.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "ES"
            }
          },
          "maxResultsPerTerm": {
            "title": "Max Results per Search Term",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Maximum resolutions to fetch per search term. CENDOJ itself hard-caps every single query at 200 results total and silently ignores any further pagination beyond that, verified live, so this is not our own limit. Kept low by default so a default run finishes in minutes.",
            "default": 25
          },
          "autoExpandBeyond200": {
            "title": "Auto-Expand Beyond 200 Results",
            "type": "boolean",
            "description": "When a query would return more than CENDOJ's 200-result ceiling, automatically re-run it as several narrower date-range sub-queries to recover more of the true result set. Off by default: it issues extra requests, so it adds runtime and cost. The incumbent actor does not offer this at all, it just tells you to narrow your own filters manually.",
            "default": false
          },
          "monitorMode": {
            "title": "Monitor Mode (Only New Results)",
            "type": "boolean",
            "description": "When on, this Actor remembers which ROJ identifiers it already returned for this exact search configuration and only pushes resolutions it has not seen before. Intended for scheduled, recurring runs (e.g. a daily or weekly watch for new case law matching your filters). The incumbent actor has no equivalent; every run re-returns the full result set from scratch.",
            "default": false
          },
          "monitorScope": {
            "title": "Monitor Scope Label",
            "type": "string",
            "description": "Only used when Monitor Mode is on. A short label that namespaces this schedule's seen-results state, so you can run several different scheduled monitors (e.g. one per client or topic) without them overwriting each other's history. Reuse the same label across runs of the same schedule.",
            "default": "default"
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}