{
  "openapi": "3.0.1",
  "info": {
    "title": "CENDOJ Spanish Case Law Scraper",
    "description": "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.",
    "version": "0.1",
    "x-build-id": "lU0SY83e998FKtwHu"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/automation-lab~cendoj-case-law-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-automation-lab-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/automation-lab~cendoj-case-law-scraper/runs": {
      "post": {
        "operationId": "runs-sync-automation-lab-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/automation-lab~cendoj-case-law-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-automation-lab-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",
            "type": "array",
            "description": "Words to find in Spanish court rulings, one search per line, for example `desahucio` or `cláusula suelo`. CENDOJ search syntax works: quotes for an exact phrase, Y / O / NO between words. Each line returns up to Maximum results per search.",
            "items": {
              "type": "string"
            }
          },
          "identifiers": {
            "title": "ROJ or ECLI identifiers",
            "type": "array",
            "description": "Look up exact rulings, one per line, by ROJ (for example `STS 4519/2026`) or ECLI (for example `ECLI:ES:TS:2026:4519`).",
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "Maximum results per search",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "How many rulings each search line returns at most. There is no 200-result ceiling when ordering by date: larger searches are split into date windows automatically.",
            "default": 50
          },
          "sort": {
            "title": "Order",
            "enum": [
              "newest",
              "oldest",
              "relevance"
            ],
            "type": "string",
            "description": "Order of the rulings. Newest and oldest go past CENDOJ's 200-result limit; most relevant is limited to the 200 best matches by CENDOJ itself.",
            "default": "newest"
          },
          "jurisdictions": {
            "title": "Jurisdictions",
            "type": "array",
            "description": "Only rulings from these jurisdictions. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "CIVIL",
                "PENAL",
                "CONTENCIOSO",
                "SOCIAL",
                "MILITAR",
                "ESPECIAL"
              ],
              "enumTitles": [
                "Civil",
                "Criminal (Penal)",
                "Administrative (Contencioso)",
                "Social / labour",
                "Military",
                "Special"
              ]
            }
          },
          "courtTypes": {
            "title": "Courts",
            "type": "array",
            "description": "Only rulings from these courts, for example Tribunal Supremo or Audiencia Provincial. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "11|12|13|14|15|16",
                "11",
                "12",
                "13",
                "14",
                "15",
                "16",
                "22|2264|23|24|25|26|27|28|29",
                "22",
                "2264",
                "23",
                "24",
                "27",
                "26",
                "25",
                "29",
                "28",
                "31|31201202|33|34",
                "31",
                "31201202",
                "33",
                "34",
                "37",
                "38",
                "1001",
                "42",
                "43",
                "45",
                "53",
                "41",
                "47",
                "1002",
                "51",
                "44",
                "52",
                "48",
                "50",
                "83",
                "85",
                "75",
                "36"
              ],
              "enumTitles": [
                "Tribunal Supremo (all chambers)",
                "Tribunal Supremo - Civil chamber",
                "Tribunal Supremo - Criminal chamber",
                "Tribunal Supremo - Administrative (Contencioso) chamber",
                "Tribunal Supremo - Social chamber",
                "Tribunal Supremo - Military chamber",
                "Tribunal Supremo - Special chamber",
                "Audiencia Nacional (all)",
                "Audiencia Nacional - Criminal chamber",
                "Audiencia Nacional - Appeal chamber",
                "Audiencia Nacional - Administrative chamber",
                "Audiencia Nacional - Social chamber",
                "Audiencia Nacional - Central investigating courts",
                "Audiencia Nacional - Central juvenile court",
                "Audiencia Nacional - Central prison supervision court",
                "Audiencia Nacional - Central administrative courts",
                "Audiencia Nacional - Central criminal courts",
                "Tribunal Superior de Justicia (all)",
                "TSJ - Civil and Criminal chamber",
                "TSJ - Criminal appeal section",
                "TSJ - Administrative chamber",
                "TSJ - Social chamber",
                "Audiencia Provincial",
                "Audiencia Provincial - Jury court",
                "EU Trade Mark Court",
                "First instance courts (civil)",
                "Investigating courts",
                "Administrative courts",
                "Juvenile courts",
                "First instance and investigating courts",
                "Commercial (mercantil) courts",
                "EU Trade Mark courts (first instance)",
                "Criminal courts",
                "Social (labour) courts",
                "Prison supervision courts",
                "Violence against women courts",
                "Family, children and capacity courts",
                "Territorial military court",
                "Central military court",
                "Supreme Council of Military Justice",
                "Audiencia Territorial (historic)"
              ]
            }
          },
          "resolutionTypes": {
            "title": "Resolution types",
            "type": "array",
            "description": "Only these kinds of resolution. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "SENTENCIA",
                "AUTO",
                "ACUERDO"
              ],
              "enumTitles": [
                "Judgment (sentencia)",
                "Order (auto)",
                "Agreement (acuerdo)"
              ]
            }
          },
          "regions": {
            "title": "Autonomous communities",
            "type": "array",
            "description": "Only rulings from courts seated in these autonomous communities. National courts (Tribunal Supremo, Audiencia Nacional) sit in Madrid.",
            "items": {
              "type": "string",
              "enum": [
                "ANDALUCÍA",
                "ARAGÓN",
                "ASTURIAS",
                "BALEARES",
                "CANARIAS",
                "CANTABRIA",
                "CASTILLA LA MANCHA",
                "CASTILLA Y LEÓN",
                "CATALUÑA",
                "CEUTA",
                "COMUNIDAD VALENCIANA",
                "EXTREMADURA",
                "GALICIA",
                "LA RIOJA",
                "MADRID",
                "MELILLA",
                "MURCIA",
                "NAVARRA",
                "PAÍS VASCO"
              ],
              "enumTitles": [
                "Andalucía",
                "Aragón",
                "Asturias",
                "Baleares",
                "Canarias",
                "Cantabria",
                "Castilla La Mancha",
                "Castilla y León",
                "Cataluña",
                "Ceuta",
                "Comunidad Valenciana",
                "Extremadura",
                "Galicia",
                "La Rioja",
                "Madrid",
                "Melilla",
                "Murcia",
                "Navarra",
                "País Vasco"
              ]
            }
          },
          "dateFrom": {
            "title": "Ruling date from",
            "type": "string",
            "description": "Only rulings dated on or after this day."
          },
          "dateTo": {
            "title": "Ruling date to",
            "type": "string",
            "description": "Only rulings dated on or before this day."
          },
          "section": {
            "title": "Court section",
            "type": "string",
            "description": "Only rulings from this section number of the court, for example `19`. Best combined with a court."
          },
          "judge": {
            "title": "Judge (ponente)",
            "type": "string",
            "description": "Only rulings written by this judge, full name as CENDOJ lists it, for example `MIGUEL JULIAN COLLADO NUÑO`."
          },
          "appealNumber": {
            "title": "Appeal number",
            "type": "string",
            "description": "Only rulings with this appeal (recurso) number, for example `1680/2024`."
          },
          "resolutionNumber": {
            "title": "Resolution number",
            "type": "string",
            "description": "Only rulings with this resolution number, for example `655/2026`."
          },
          "language": {
            "title": "Language",
            "enum": [
              "",
              "1",
              "2",
              "3",
              "4"
            ],
            "type": "string",
            "description": "Only rulings written in this language.",
            "default": ""
          },
          "onlyNew": {
            "title": "Only new rulings",
            "type": "boolean",
            "description": "For scheduled runs: returns only rulings that earlier runs with the same search and filters did not return. Without a start date it checks the last 120 days before the newest ruling seen.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Fallback proxy",
            "type": "object",
            "description": "CENDOJ refuses most datacenter IPs. The Actor first uses a Spanish datacenter IP and switches to this proxy (Spanish residential by default) when CENDOJ refuses it.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "ES"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}