{
  "openapi": "3.0.1",
  "info": {
    "title": "Colombia Public Contracts Scraper: SECOP II",
    "description": "Scrape Colombian public contracts from SECOP II, the official open data: entity, company supplier, modality, value in pesos, payments, source of funds, dates and process link. Search by keyword, region or tax number, rank suppliers and check company sanctions. Export to CSV or Excel.",
    "version": "1.0",
    "x-build-id": "GgD6lsKZvqj6RFUPB"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/parselab~colombia-public-contracts-secop-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-parselab-colombia-public-contracts-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/parselab~colombia-public-contracts-secop-scraper/runs": {
      "post": {
        "operationId": "runs-sync-parselab-colombia-public-contracts-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/parselab~colombia-public-contracts-secop-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-parselab-colombia-public-contracts-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": "Free users: Limited to 10 items (preview). Paid users: Optional, max 1,000,000."
          },
          "mode": {
            "title": "What to collect",
            "enum": [
              "contracts",
              "summary",
              "sanctions"
            ],
            "type": "string",
            "description": "Contracts returns one row per contract. Summary adds up contracts by entity, supplier, department, modality, type, sector or month. Sanctions returns fines that public entities reported against companies.",
            "default": "contracts"
          },
          "daysBack": {
            "title": "Days back",
            "minimum": 1,
            "maximum": 7000,
            "type": "integer",
            "description": "Only contracts signed in the last days (sanctions: published). Ignored when Date from is set.",
            "default": 90
          },
          "dateFrom": {
            "title": "Date from",
            "type": "string",
            "description": "First signing date, like 2026-01-31."
          },
          "dateTo": {
            "title": "Date to",
            "type": "string",
            "description": "Last signing date, like 2026-06-30."
          },
          "departments": {
            "title": "Departments",
            "type": "array",
            "description": "Names of departments, for example Antioquia, Valle del Cauca or Distrito Capital de Bogotá. Accents and capitals do not matter.",
            "items": {
              "type": "string"
            }
          },
          "cityContains": {
            "title": "City contains",
            "type": "string",
            "description": "Part of the city name."
          },
          "entityContains": {
            "title": "Entity name contains",
            "type": "string",
            "description": "Part of the name of the public entity, for example ECOPETROL or ALCALDIA."
          },
          "entityNit": {
            "title": "Entity NIT",
            "type": "array",
            "description": "Tax numbers of the public entities, with or without the check digit.",
            "items": {
              "type": "string"
            }
          },
          "supplierContains": {
            "title": "Company supplier name contains",
            "type": "string",
            "description": "Part of the name of a company that won the contract. Individuals are never searched."
          },
          "supplierNit": {
            "title": "Company supplier NIT",
            "type": "array",
            "description": "Tax numbers of companies that won contracts, with or without the check digit. Also works in sanctions mode.",
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Words of the contract object, for example software, ambulancia or interventoría. A contract with any of the words is kept.",
            "items": {
              "type": "string"
            }
          },
          "contractTypes": {
            "title": "Contract types",
            "type": "array",
            "description": "For example Obra, Suministros, Consultoría, Interventoría, Prestación de servicios, Compraventa.",
            "items": {
              "type": "string"
            }
          },
          "modalities": {
            "title": "Modalities",
            "type": "array",
            "description": "For example Licitación pública, Mínima cuantía, Contratación directa, Concurso de méritos abierto.",
            "items": {
              "type": "string"
            }
          },
          "statuses": {
            "title": "Contract status",
            "type": "array",
            "description": "For example En ejecución, Cerrado, Modificado, terminado, Suspendido.",
            "items": {
              "type": "string"
            }
          },
          "sectors": {
            "title": "Sectors",
            "type": "array",
            "description": "For example Salud y Protección Social, Educación Nacional, Transporte, defensa.",
            "items": {
              "type": "string"
            }
          },
          "onlySme": {
            "title": "Only small and medium companies",
            "type": "boolean",
            "description": "Keep contracts won by suppliers marked as SME.",
            "default": false
          },
          "onlyCompanySuppliers": {
            "title": "Only company suppliers",
            "type": "boolean",
            "description": "Skip contracts with individuals. Individuals are never named in the rows either way.",
            "default": false
          },
          "minValueCop": {
            "title": "Minimum value (COP)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep contracts of at least this many pesos (fines in sanctions mode)."
          },
          "maxValueCop": {
            "title": "Maximum value (COP)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep contracts of at most this many pesos (fines in sanctions mode)."
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "signedDate",
              "value"
            ],
            "type": "string",
            "description": "Newest first or largest value first.",
            "default": "signedDate"
          },
          "groupBy": {
            "title": "Group by (summary mode)",
            "enum": [
              "entity",
              "supplier",
              "department",
              "modality",
              "contractType",
              "sector",
              "month"
            ],
            "type": "string",
            "description": "Summary mode only. The supplier ranking counts companies only.",
            "default": "entity"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}