{
  "openapi": "3.0.1",
  "info": {
    "title": "Colombia SECOP Scraper",
    "description": "Extract Colombia public contracts from SECOP II (datos.gov.co): entity and supplier, NIT, contract value, amounts paid and invoiced, legal representative ID, supplier bank and account, UNSPSC category, supervisor and spending authority.",
    "version": "0.1",
    "x-build-id": "0sMLkjb2Z3XF1XhkN"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapers_lat~colombia-secop-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapers_lat-colombia-secop-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/scrapers_lat~colombia-secop-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapers_lat-colombia-secop-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/scrapers_lat~colombia-secop-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapers_lat-colombia-secop-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": {
          "maxItems": {
            "title": "Max Items",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Maximum number of contract records to collect across all matching filters. Optional."
          },
          "entityName": {
            "title": "Entity Name",
            "type": "string",
            "description": "Filter by the contracting government entity name (full-text match), for example 'ECOPETROL' or 'SERVICIO GEOLOGICO COLOMBIANO'. Matches contracts whose buyer entity name contains this text."
          },
          "entityNit": {
            "title": "Entity NIT",
            "type": "string",
            "description": "Filter by the contracting entity tax-ID (NIT), digits only, for example '899999294'. Returns every contract signed by that public entity."
          },
          "supplierName": {
            "title": "Supplier Name",
            "type": "string",
            "description": "Filter by the awarded supplier or contractor name (full-text match), for example a company or natural-person name. Useful for tracking a contractor across all its government contracts."
          },
          "supplierNit": {
            "title": "Supplier NIT / Document",
            "type": "string",
            "description": "Filter by the awarded supplier document number (NIT for companies or cédula for individuals), digits only, for example '899999068'. Returns the full contract history for that supplier."
          },
          "department": {
            "title": "Department",
            "enum": [
              "Amazonas",
              "Antioquia",
              "Arauca",
              "Atlántico",
              "Bolívar",
              "Boyacá",
              "Caldas",
              "Caquetá",
              "Casanare",
              "Cauca",
              "Cesar",
              "Chocó",
              "Cundinamarca",
              "Córdoba",
              "Distrito Capital de Bogotá",
              "Guainía",
              "Guaviare",
              "Huila",
              "La Guajira",
              "Magdalena",
              "Meta",
              "Nariño",
              "Norte de Santander",
              "Putumayo",
              "Quindío",
              "Risaralda",
              "San Andrés, Providencia y Santa Catalina",
              "Santander",
              "Sucre",
              "Tolima",
              "Valle del Cauca",
              "Vaupés",
              "Vichada"
            ],
            "type": "string",
            "description": "Filter by the Colombian department where the contract is executed."
          },
          "contractType": {
            "title": "Contract Type",
            "enum": [
              "Acuerdo Marco de Precios",
              "Acuerdo de cooperación",
              "Arrendamiento de inmuebles",
              "Arrendamiento de muebles",
              "Asociación Público Privada",
              "Comisión",
              "Comodato",
              "Compraventa",
              "Concesión",
              "Consultoría",
              "Decreto 092 de 2017",
              "Interventoría",
              "Negocio fiduciario",
              "Obra",
              "Operaciones de Crédito Público",
              "Otro",
              "Prestación de servicios",
              "Seguros",
              "Servicios financieros",
              "Suministros",
              "Venta inmuebles",
              "Venta muebles"
            ],
            "type": "string",
            "description": "Filter by the type of contract."
          },
          "status": {
            "title": "Contract Status",
            "enum": [
              "Aprobado",
              "Borrador",
              "Cancelado",
              "Cerrado",
              "En aprobación",
              "En ejecución",
              "Modificado",
              "Prorrogado",
              "Suspendido",
              "cedido",
              "enviado Proveedor",
              "terminado"
            ],
            "type": "string",
            "description": "Filter by the current status of the contract."
          },
          "dateFrom": {
            "title": "Signed From (YYYY-MM-DD)",
            "type": "string",
            "description": "Only include contracts signed on or after this date. Format YYYY-MM-DD, for example '2024-01-01'."
          },
          "dateTo": {
            "title": "Signed To (YYYY-MM-DD)",
            "type": "string",
            "description": "Only include contracts signed on or before this date. Format YYYY-MM-DD, for example '2024-12-31'."
          },
          "minValue": {
            "title": "Minimum Contract Value (COP)",
            "minimum": 0,
            "type": "integer",
            "description": "Only include contracts whose value is greater than or equal to this amount, in Colombian pesos (COP). Optional."
          },
          "freeText": {
            "title": "Free-text Search",
            "type": "string",
            "description": "Full-text search across all contract fields (entity, supplier, contract object, references). Use this for keyword searches such as a product, service or project name when you do not have a specific entity or supplier."
          },
          "appToken": {
            "title": "Socrata App Token",
            "type": "string",
            "description": "Optional Socrata application token for datos.gov.co. Not required, but providing one raises the API rate limit on large runs. Get a free token at evergreen.data.socrata.com."
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Optional Apify proxy configuration. The datos.gov.co open-data API is globally accessible and normally needs no proxy; enable this only if you hit rate limits.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}