{
  "openapi": "3.0.1",
  "info": {
    "title": "Tjue",
    "description": "Automatiza la búsqueda de jurisprudencia del Tribunal de Justicia de la Unión Europea (juris.curia.europa.eu). Permite buscar documentos (sentencias, autos, conclusiones, peticiones de decisión prejudicial…) por texto libre y filtrarlos por órgano jurisdiccional, idioma y rango de fechas.",
    "version": "2.0",
    "x-build-id": "icAEi2A5rPaRCwI7y"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/legaltech~tjue/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-legaltech-tjue",
        "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/legaltech~tjue/runs": {
      "post": {
        "operationId": "runs-sync-legaltech-tjue",
        "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/legaltech~tjue/run-sync": {
      "post": {
        "operationId": "run-sync-legaltech-tjue",
        "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": "Términos de Búsqueda",
            "maxItems": 50,
            "type": "array",
            "description": "Lista de términos a buscar en el texto de la jurisprudencia del TJUE (máx. 50). Cada término se busca por separado y genera sus propios resultados. Si se deja vacío pero se aplican filtros (órganos o fechas), se devuelven TODOS los documentos que cumplan los filtros. Úsalo en la primera fase (búsqueda). Ejemplo: [\"gastos hipotecarios\", \"protección de los consumidores\"].",
            "items": {
              "type": "string"
            }
          },
          "documentUrls": {
            "title": "Extraer texto de documentos concretos",
            "maxItems": 50,
            "type": "array",
            "description": "Lista de URLs de documentos (campo 'documentUrl' devuelto por una búsqueda previa, p. ej. https://juris.curia.europa.eu/juris/document/document.jsf?docid=311944&doclang=es) o identificadores 'docid' de los que extraer el TEXTO ÍNTEGRO. Úsalo en la segunda fase: tras buscar, copia aquí los 'documentUrl' que te interesen (máx. 50). Si rellenas este campo, el actor solo extrae el texto de esos documentos y NO es necesario indicar 'searchTerms'. Combínalo con 'paragraphs' y 'paragraphTerms' para acotar la parte del texto devuelta.",
            "items": {
              "type": "string"
            }
          },
          "documentType": {
            "title": "Tipo de documento",
            "enum": [
              "arret",
              "ord",
              "concl",
              "avis",
              "ALL"
            ],
            "type": "string",
            "description": "Filtra los resultados por tipo de documento de CURIA. Por defecto solo devuelve Sentencias.",
            "default": "arret"
          },
          "courts": {
            "title": "Órganos jurisdiccionales",
            "type": "array",
            "description": "Órgano(s) del TJUE a incluir en la búsqueda. Si no se selecciona ninguno, se buscan los tres.",
            "items": {
              "type": "string",
              "enum": [
                "C",
                "T",
                "F"
              ],
              "enumTitles": [
                "Tribunal de Justicia",
                "Tribunal General",
                "Tribunal de la Función Pública"
              ]
            },
            "default": [
              "C"
            ]
          },
          "language": {
            "title": "Idioma de los documentos",
            "enum": [
              "es",
              "en",
              "fr",
              "de",
              "it",
              "pt"
            ],
            "type": "string",
            "description": "Idioma en el que se devuelven los textos y metadatos de los documentos.",
            "default": "es"
          },
          "dateType": {
            "title": "Tipo de fecha",
            "enum": [
              "pro",
              "con",
              "aud",
              "dep"
            ],
            "type": "string",
            "description": "Fecha del documento sobre la que se aplica el filtro 'Fecha desde'/'Fecha hasta'.",
            "default": "pro"
          },
          "dateFrom": {
            "title": "Fecha desde",
            "type": "string",
            "description": "Fecha mínima del documento (inclusive). Formato YYYY-MM-DD."
          },
          "dateTo": {
            "title": "Fecha hasta",
            "type": "string",
            "description": "Fecha máxima del documento (inclusive). Formato YYYY-MM-DD."
          },
          "paragraphs": {
            "title": "Modo párrafos (número de pasajes)",
            "minimum": 0,
            "type": "integer",
            "description": "Si es mayor que 0, en lugar del texto íntegro se devuelven solo los N pasajes más relevantes del documento (campo 'paragraphs' y un 'text' resumido). Útil para reducir el volumen de texto al analizar con un LLM. Si es 0 o se omite, se devuelve el texto completo. Solo aplica cuando se extrae texto ('documentUrls' o EXTRACT_TEXT activado)."
          },
          "paragraphTerms": {
            "title": "Términos para localizar los pasajes",
            "type": "string",
            "description": "Términos con los que se localizan los pasajes relevantes cuando se usa el 'Modo párrafos'. Si se omite, se usa el término de búsqueda ('searchTerms'). Indícalo cuando extraes texto de 'documentUrls' (sin búsqueda) para que el modo párrafos sepa qué buscar. Ejemplo: 'protección de los consumidores'."
          },
          "maxResults": {
            "title": "Número máximo de resultados",
            "minimum": 1,
            "type": "integer",
            "description": "Número máximo de documentos a devolver por término de búsqueda."
          },
          "proxyConfiguration": {
            "title": "Configuración de Proxy",
            "type": "object",
            "description": "Configuración de proxy opcional. CURIA no bloquea las IP de datacenter, por lo que normalmente no es necesario."
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}