{
  "openapi": "3.0.1",
  "info": {
    "title": "SECOP II - Contracting Processes",
    "description": "Search Colombia's public procurement dataset (SECOP II) . Filter by keywords, entity, department, dates, or a raw SoQL clause",
    "version": "0.0",
    "x-build-id": "KLd0ZgjtIqQftjIOG"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/knowten~secop-ii-contracting-processes/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-knowten-secop-ii-contracting-processes",
        "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/knowten~secop-ii-contracting-processes/runs": {
      "post": {
        "operationId": "runs-sync-knowten-secop-ii-contracting-processes",
        "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/knowten~secop-ii-contracting-processes/run-sync": {
      "post": {
        "operationId": "run-sync-knowten-secop-ii-contracting-processes",
        "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": {
          "keywords": {
            "title": "Palabras clave (una o varias)",
            "type": "array",
            "description": "Búsqueda de texto completo sobre el nombre/descripción/entidad del proceso (SoQL $q). Agrega varios términos para buscarlos uno por uno: cada término se consulta por separado, cada registro queda marcado con el término que lo encontró, y al final de la corrida se reporta la cantidad de resultados por cada término. Déjalo vacío para navegar solo con los filtros de abajo, o para traer los procesos publicados más recientemente.",
            "items": {
              "type": "string"
            }
          },
          "entidad": {
            "title": "La entidad contiene",
            "type": "string",
            "description": "Coincidencia parcial, sin distinguir mayúsculas, sobre el nombre de la entidad contratante (ej. \"alcaldia\", \"ministerio de salud\")."
          },
          "departamento": {
            "title": "Departamento",
            "type": "string",
            "description": "Nombre exacto del departamento tal como lo registra SECOP (ej. \"Antioquia\", \"Distrito Capital de Bogotá\")."
          },
          "estadoResumen": {
            "title": "Estado del proceso",
            "enum": [
              "",
              "Presentación de oferta",
              "Fase de ofertas",
              "Adjudicado",
              "Presentación de observaciones",
              "No Definido",
              "Manifestación de interés (Menor Cuantía)",
              "Clarification submission",
              "Estimate Phase",
              "Pré-Calificación de competidores",
              "Fase de Selección (Presentación de ofertas)",
              "Selección de ofertas (borrador)",
              "Proceso de ofertas",
              "Presentación de Observaciones",
              "Fase de Concurso",
              "Presentación de observaciones (precalificación)",
              "Presentación de oferta (precalificación)"
            ],
            "type": "string",
            "description": "Estado exacto tal como lo registra SECOP. Elige entre los valores reales encontrados en el dataset (conteos verificados el 2026-09-10).",
            "default": ""
          },
          "fechaDesde": {
            "title": "Publicado desde",
            "type": "string",
            "description": "Solo procesos publicados en esta fecha o después (AAAA-MM-DD). Filtra sobre \"fecha_de_publicacion_del\"."
          },
          "fechaHasta": {
            "title": "Publicado hasta",
            "type": "string",
            "description": "Solo procesos publicados en esta fecha o antes (AAAA-MM-DD)."
          },
          "maxItems": {
            "title": "Máximo de registros",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Detiene la corrida al llegar a esta cantidad de registros. El dataset tiene ~9 millones de filas, así que una consulta sin filtrar con un valor muy alto tomará mucho tiempo y generará un dataset enorme - filtra primero.",
            "default": 1000
          },
          "whereClause": {
            "title": "Avanzado: cláusula SoQL $where en crudo",
            "type": "string",
            "description": "Para usuarios avanzados: una cláusula SoQL $where de Socrata en crudo, combinada con los filtros de arriba usando AND. Consulta la lista de columnas del dataset en datos.gov.co para conocer los nombres de los campos. Déjalo vacío a menos que necesites algo que los filtros de arriba no cubran."
          },
          "pageSize": {
            "title": "Tamaño de página",
            "minimum": 100,
            "maximum": 50000,
            "type": "integer",
            "description": "Registros por solicitud a la API. Páginas más grandes significan menos solicitudes, pero respuestas más grandes en memoria a la vez.",
            "default": 1000
          },
          "appToken": {
            "title": "Token de aplicación de Socrata (opcional)",
            "type": "string",
            "description": "Token gratuito de una cuenta de datos.gov.co (Inicia sesión -> Editar perfil -> Configuración de desarrollador -> Crear nuevo token de aplicación). No es obligatorio, pero aumenta tu límite de solicitudes si corres este Actor con frecuencia. No es un login ni una cookie - es solo un token de uso de la API."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}