{
  "openapi": "3.0.1",
  "info": {
    "title": "Spanish Case Law Search: CENDOJ Rulings & Jurisprudencia",
    "description": "Search Spanish court rulings in CENDOJ (jurisprudencia): Supreme Court, Audiencia Nacional, TSJ, Audiencias Provinciales and first-instance courts. ROJ, ECLI, court, judge, date, summary, link. Plus a case-law report per search. No login.",
    "version": "0.1",
    "x-build-id": "rKqLA3HObPlBXKFEM"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/precious_bathmat~cendoj-case-law-search/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-precious_bathmat-cendoj-case-law-search",
        "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/precious_bathmat~cendoj-case-law-search/runs": {
      "post": {
        "operationId": "runs-sync-precious_bathmat-cendoj-case-law-search",
        "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/precious_bathmat~cendoj-case-law-search/run-sync": {
      "post": {
        "operationId": "run-sync-precious_bathmat-cendoj-case-law-search",
        "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 the rulings, one search each, in Spanish (or Catalan, Galician, Basque), e.g. \"despido improcedente\", \"cláusula suelo\", \"responsabilidad patrimonial\". Several words find rulings with all of them; O finds either word, NO leaves a word out, quotes find the exact phrase. Leave empty to search by filters only.",
            "items": {
              "type": "string"
            }
          },
          "jurisdictions": {
            "title": "Jurisdiction",
            "type": "array",
            "description": "Optional: only these jurisdictions.",
            "items": {
              "type": "string",
              "enum": [
                "civil",
                "criminal",
                "administrative",
                "labour",
                "military",
                "special"
              ],
              "enumTitles": [
                "Civil",
                "Penal (criminal)",
                "Contencioso-administrativo",
                "Social (labour)",
                "Militar",
                "Especial"
              ]
            }
          },
          "courts": {
            "title": "Courts",
            "type": "array",
            "description": "Optional: only rulings from these courts.",
            "items": {
              "type": "string",
              "enum": [
                "supreme-court",
                "national-court",
                "high-courts-of-justice",
                "provincial-courts",
                "first-instance-civil",
                "investigating-courts",
                "criminal-courts",
                "administrative-courts",
                "labour-courts",
                "commercial-courts",
                "violence-against-women-courts",
                "juvenile-courts",
                "prison-supervision-courts",
                "eu-trademark-courts",
                "military-courts"
              ],
              "enumTitles": [
                "Tribunal Supremo (Supreme Court)",
                "Audiencia Nacional (National Court)",
                "Tribunales Superiores de Justicia (regional High Courts)",
                "Audiencias Provinciales (Provincial Courts)",
                "Civil first-instance courts and family sections",
                "Juzgados de Instrucción (investigating courts)",
                "Juzgados de lo Penal (criminal courts)",
                "Contencioso-administrativo courts",
                "Juzgados de lo Social (labour courts)",
                "Juzgados de lo Mercantil (commercial courts)",
                "Violencia sobre la Mujer courts",
                "Juvenile courts",
                "Prison supervision courts",
                "EU trademark courts (Alicante)",
                "Military courts"
              ]
            }
          },
          "resolutionTypes": {
            "title": "Type of ruling",
            "type": "array",
            "description": "Optional: only these types.",
            "items": {
              "type": "string",
              "enum": [
                "judgment",
                "order",
                "agreement"
              ],
              "enumTitles": [
                "Sentencia (judgment)",
                "Auto (order)",
                "Acuerdo (agreement)"
              ]
            }
          },
          "regions": {
            "title": "Regions",
            "type": "array",
            "description": "Optional: only rulings from courts in these autonomous communities.",
            "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": "Optional: rulings on or after this date."
          },
          "dateTo": {
            "title": "Ruling date to",
            "type": "string",
            "description": "Optional: rulings on or before this date."
          },
          "judge": {
            "title": "Judge (ponente)",
            "type": "string",
            "description": "Optional: only rulings written by this judge, full name as CENDOJ lists it, e.g. \"MANUEL ALMENAR BELENGUER\"."
          },
          "language": {
            "title": "Language of the ruling",
            "enum": [
              "any",
              "es",
              "ca",
              "gl",
              "eu"
            ],
            "type": "string",
            "description": "Only rulings written in this language.",
            "default": "any"
          },
          "sort": {
            "title": "Sort",
            "enum": [
              "date",
              "relevance"
            ],
            "type": "string",
            "description": "Newest first can read past CENDOJ's 200-per-search limit; most relevant stops at 200.",
            "default": "date"
          },
          "maxRulingsPerSearch": {
            "title": "Rulings per search",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Most rulings to read per search term (1 to 10,000).",
            "default": 200
          },
          "includeReports": {
            "title": "Reports",
            "type": "boolean",
            "description": "One report per search over every matching ruling: trend by year, jurisdictions, courts, types of ruling, regions, cities, judges, and the latest rulings.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}