{
  "openapi": "3.0.1",
  "info": {
    "title": "Corte Constitucional de Colombia: sentencias C, SU y T",
    "description": "Sentencias de la Corte Constitucional de Colombia: C y SU con texto completo, tutelas (T) solo metadatos. Filtros por año, fechas, magistrado ponente, palabras clave y norma demandada. Modo monitor. Colombian Constitutional Court rulings.",
    "version": "1.0",
    "x-build-id": "Z4dzTTR1ytkOwuRYo"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/opendata-cr~corte-constitucional-colombia/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-opendata-cr-corte-constitucional-colombia",
        "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/opendata-cr~corte-constitucional-colombia/runs": {
      "post": {
        "operationId": "runs-sync-opendata-cr-corte-constitucional-colombia",
        "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/opendata-cr~corte-constitucional-colombia/run-sync": {
      "post": {
        "operationId": "run-sync-opendata-cr-corte-constitucional-colombia",
        "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": {
          "types": {
            "title": "Tipos de sentencia / Ruling types",
            "type": "array",
            "description": "C (constitucionalidad) y SU (unificación) llevan texto completo. T (tutela) solo metadatos: número, fecha, expediente, magistrado ponente, sala y votos, sin texto ni nombres de las partes. Si se deja vacío: C y SU.",
            "items": {
              "type": "string",
              "enum": [
                "C",
                "SU",
                "T"
              ],
              "enumTitles": [
                "C · Constitucionalidad",
                "SU · Unificación",
                "T · Tutela (solo metadatos)"
              ]
            },
            "default": [
              "C",
              "SU"
            ]
          },
          "year": {
            "title": "Año / Year",
            "minimum": 1992,
            "maximum": 2100,
            "type": "integer",
            "description": "Año de la sentencia (1992 en adelante). Si también indica fechas, se usa la intersección. Ruling year."
          },
          "dateFrom": {
            "title": "Desde / From",
            "type": "string",
            "description": "Fecha de la sentencia, inclusive (AAAA-MM-DD). Sin año ni fechas se usan los últimos recentDays días. Start date, inclusive."
          },
          "dateTo": {
            "title": "Hasta / To",
            "type": "string",
            "description": "Fecha de la sentencia, inclusive. Si está vacía, hoy (hora de Bogotá). End date, inclusive."
          },
          "recentDays": {
            "title": "Días recientes / Recent days",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Se usa cuando no hay año ni fechas. El índice abierto suele ir algunas semanas detrás de la Corte. Used when no year or dates are given.",
            "default": 90
          },
          "magistradoPonente": {
            "title": "Magistrado(a) ponente / Reporting justice",
            "type": "array",
            "description": "Uno o varios nombres; basta con que coincida uno. Sin tildes ni mayúsculas, y cada palabra escrita debe aparecer: 'ibanez' encuentra a Jorge Enrique Ibáñez Najar. Any of these names.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Palabras clave / Keywords",
            "type": "array",
            "description": "Palabras o frases completas, sin distinguir tildes ni mayúsculas. En C y SU se busca en todo el texto y en los temas. En T solo en los metadatos y, si activa includeTutelaTopics, en los temas. Words or phrases.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "keywordMode": {
            "title": "Coincidencia de palabras / Keyword mode",
            "enum": [
              "any",
              "all"
            ],
            "type": "string",
            "description": "any: basta una palabra clave. all: deben aparecer todas. any = one keyword is enough; all = every keyword.",
            "default": "any"
          },
          "normaDemandada": {
            "title": "Norma demandada / Challenged law",
            "type": "string",
            "description": "Solo sentencias C. Por ejemplo 'Ley 2277 de 2022', 'Decreto 624 de 1989', 'ley 100/93' o 'Estatuto Tributario'. Se compara con la referencia de la sentencia, por eso requiere que el texto esté publicado. Only C rulings."
          },
          "sentencias": {
            "title": "Sentencias específicas / Specific rulings",
            "type": "array",
            "description": "Números como C-355/06, SU-018/25 o T-280/26. Si se indican y no hay fechas, se buscan en todo el índice. Specific ruling numbers.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "includeText": {
            "title": "Incluir texto completo (C y SU) / Include full text",
            "type": "boolean",
            "description": "Con texto se cobra sentencia-texto. Sin texto, todas se cobran como sentencia-metadatos. Las tutelas nunca llevan texto. With text, the sentencia-texto event applies.",
            "default": true
          },
          "includeWithoutText": {
            "title": "Entregar C/SU aún sin texto / Deliver C/SU without text yet",
            "type": "boolean",
            "description": "La Relatoría publica el texto semanas después de la sentencia. Activado: esas C/SU se entregan solo con metadatos (precio de metadatos). Desactivado: se omiten y se entregan cuando aparezca el texto. Deliver rulings whose text is not published yet.",
            "default": true
          },
          "includeTutelaTopics": {
            "title": "Temas de las tutelas / Tutela topics",
            "type": "boolean",
            "description": "Agrega a cada T los descriptores del tesauro (por ejemplo 'DERECHO A LA SALUD'). No se entrega texto, síntesis ni partes; un subtema con un posible nombre propio se omite. Adds thesaurus topics to T rulings; never includes text.",
            "default": false
          },
          "onlyNewSinceLastRun": {
            "title": "Solo nuevas desde la última ejecución / Only new since last run",
            "type": "boolean",
            "description": "Modo monitor: solo entrega y cobra sentencias que no se entregaron antes con el mismo almacén. Monitor mode.",
            "default": false
          },
          "monitorStoreName": {
            "title": "Almacén del monitor / Monitor store name",
            "type": "string",
            "description": "Key-Value Store con nombre donde se guardan las sentencias ya entregadas. Use un nombre distinto para cada alerta (minúsculas, números y guiones). Use one name per alert.",
            "default": "corte-constitucional-co-monitor"
          },
          "redeliverWhenTextPublished": {
            "title": "Reenviar cuando se publique el texto / Redeliver when text is published",
            "type": "boolean",
            "description": "En modo monitor, una C o SU que se entregó sin texto se vuelve a entregar (y a cobrar como sentencia-texto) cuando la Relatoría publica el texto. In monitor mode, deliver again once the text appears.",
            "default": true
          },
          "maxResults": {
            "title": "Máximo de resultados / Maximum results",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Cantidad máxima de sentencias (y de cobros por sentencia) por ejecución. Si se omite: 50. Si antes se alcanza el máximo a cobrar de la ejecución, esta termina con éxito. Maximum rulings per run.",
            "default": 50
          },
          "maxPagesToScan": {
            "title": "Máximo de páginas a revisar / Max pages to scan",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Límite de páginas de la Relatoría que se revisan por ejecución, útil con palabras clave o norma demandada en rangos largos. 300 por defecto cubre un año completo de sentencias C y SU; puede subirlo hasta 5,000. Las páginas revisadas que no coinciden no se cobran. Maximum Relatoría pages checked per run (default 300, about one year of C and SU rulings).",
            "default": 300
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Opcional. No suele hacer falta. Optional; usually not needed.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}