{
  "openapi": "3.0.1",
  "info": {
    "title": "SECOP Colombia Tenders — Alerts & History",
    "description": "Open Colombian public tenders from SECOP II with deadlines, award dates, bidders, winners, requested service category and legal context per process. Daily new-only alerts plus history.",
    "version": "0.1",
    "x-build-id": "lXNf8KuyWkup7zEOT"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/polyglot-data~secop-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-polyglot-data-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/polyglot-data~secop-scraper/runs": {
      "post": {
        "operationId": "runs-sync-polyglot-data-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/polyglot-data~secop-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-polyglot-data-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": {
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Words to find in the tender title or description. Accents are ignored, so \"construccion\" also matches \"construcción\". A tender is kept if any keyword matches.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "sources": {
            "title": "Sources",
            "type": "array",
            "description": "SECOP II is where new tenders are published today. SECOP I is the previous platform: use it for historical research (mostly processes up to 2021); a few territorial entities still load processes there. SECOP II only by default.",
            "items": {
              "type": "string",
              "enum": [
                "secop2",
                "secop1"
              ],
              "enumTitles": [
                "SECOP II (current: new tenders)",
                "SECOP I (historical archive)"
              ]
            },
            "default": [
              "secop2"
            ]
          },
          "statuses": {
            "title": "Status",
            "type": "array",
            "description": "Process status to include. \"open\" means accepting bids or expressions of interest. \"evaluation\" means bids are closed and under review.",
            "items": {
              "type": "string",
              "enum": [
                "open",
                "evaluation",
                "awarded",
                "closed",
                "cancelled"
              ],
              "enumTitles": [
                "Open (accepting bids)",
                "Evaluation (bids closed, under review)",
                "Awarded",
                "Closed",
                "Cancelled"
              ]
            },
            "default": [
              "open"
            ]
          },
          "modalities": {
            "title": "Procurement modalities",
            "type": "array",
            "description": "Procurement method. The default is the competitive processes. Direct contracting and special-regime processes without offers are excluded unless you select them.",
            "items": {
              "type": "string",
              "enum": [
                "licitacion",
                "seleccion_abreviada",
                "minima_cuantia",
                "concurso_meritos",
                "con_ofertas",
                "regimen_especial",
                "contratacion_directa",
                "otros"
              ],
              "enumTitles": [
                "Public tender (licitación pública)",
                "Abbreviated selection (selección abreviada)",
                "Minimum amount (mínima cuantía)",
                "Merit contest (concurso de méritos)",
                "Special regime or direct contracting with offers",
                "Special regime (régimen especial, no offers)",
                "Direct contracting (contratación directa)",
                "Other (asset sales, APPs, multi-party contracts, supplier requests)"
              ]
            },
            "default": [
              "licitacion",
              "seleccion_abreviada",
              "minima_cuantia",
              "concurso_meritos",
              "con_ofertas"
            ]
          },
          "departments": {
            "title": "Departments",
            "type": "array",
            "description": "Department of the contracting entity. Leave empty for all of Colombia. For a single municipality use the City field.",
            "items": {
              "type": "string",
              "enum": [
                "Amazonas",
                "Antioquia",
                "Arauca",
                "Atlántico",
                "Bolívar",
                "Boyacá",
                "Bogotá D.C.",
                "Caldas",
                "Caquetá",
                "Casanare",
                "Cauca",
                "Cesar",
                "Chocó",
                "Córdoba",
                "Cundinamarca",
                "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"
              ]
            },
            "default": []
          },
          "entity": {
            "title": "Contracting entity",
            "type": "string",
            "description": "Part of the entity name (e.g. \"Bogotá\"), or the entity's NIT (tax ID) digits only. Entity NIT is a public institutional ID, not a person's ID.",
            "default": ""
          },
          "minValue": {
            "title": "Minimum budget (COP)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep tenders with a base value of at least this amount, in Colombian pesos (COP). Empty means no minimum."
          },
          "maxValue": {
            "title": "Maximum budget (COP)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep tenders with a base value of at most this amount, in Colombian pesos (COP). Empty means no maximum."
          },
          "unspscCodes": {
            "title": "UNSPSC codes",
            "type": "array",
            "description": "Product or service category prefixes, 2 to 8 digits, e.g. \"4321\" (computer equipment) or \"72\" (construction services). Tenders with no UNSPSC code (UNSPECIFIED) cannot match this filter.",
            "items": {
              "type": "string",
              "pattern": "^[0-9]{2,8}$"
            },
            "default": []
          },
          "contractTypes": {
            "title": "Contract types",
            "type": "array",
            "description": "Contract type as SECOP II publishes it (e.g. Obra, Consultoría, Prestación de servicios). Leave empty for all types. SECOP I uses other spellings, so its rows are compared without accents or case.",
            "items": {
              "type": "string",
              "enum": [
                "Obra",
                "Suministros",
                "Prestación de servicios",
                "Compraventa",
                "Interventoría",
                "Consultoría",
                "Seguros",
                "Arrendamiento de muebles",
                "Concesión",
                "Otro",
                "Decreto 092 de 2017"
              ]
            },
            "default": []
          },
          "entityOrders": {
            "title": "Entity level",
            "type": "array",
            "description": "Level of the contracting entity. Leave empty for all levels. corporacion_autonoma (regional environmental authorities, CAR) does not exist in SECOP I, so it is ignored for SECOP I; if it is the only value chosen, SECOP I is skipped.",
            "items": {
              "type": "string",
              "enum": [
                "nacional",
                "territorial",
                "corporacion_autonoma"
              ],
              "enumTitles": [
                "National",
                "Territorial (department, district, municipality)",
                "Regional environmental authority (CAR)"
              ]
            },
            "default": []
          },
          "city": {
            "title": "City of the contracting entity",
            "type": "string",
            "description": "Exact city or municipality of the contracting entity, e.g. \"Cali\" or \"Bogotá\". Accents, capitals and \"D.C.\" are ignored, but the whole name must match (\"Cali\" does not match \"Calima\"). This is the entity's city, not the place where the work is done.",
            "default": ""
          },
          "closingWithinDays": {
            "title": "Bids close within (days)",
            "minimum": 0,
            "type": "integer",
            "description": "SECOP II only: keep tenders whose bid deadline is between today and today + N days. Setting it skips SECOP I, which has no bid deadline. Leave empty to ignore the deadline."
          },
          "categoryKeywords": {
            "title": "Category keywords",
            "type": "array",
            "description": "Words matched against UNSPSC family and class names, accent-insensitive and at the start of a word, e.g. \"construcción\" or \"software\". Tenders with a UNSPSC code are matched on that code. Open tenders with no code yet are matched on their top 3 inferred families, which is approximate, so combine this with keywords. If no category matches any word, the run returns an INVALID_INPUT item.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "publishedWithinDays": {
            "title": "Published within (days)",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "Only tenders published in the last N days. Use a small number for alerts (1 to 7) and larger ones for research.",
            "default": 30
          },
          "publishedFrom": {
            "title": "Published from (date)",
            "type": "string",
            "description": "Historical research: only processes published on or after this date. When set, it replaces 'Published within (days)'."
          },
          "publishedTo": {
            "title": "Published to (date)",
            "type": "string",
            "description": "Historical research: only processes published on or before this date."
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of tenders to save in one run.",
            "default": 100
          },
          "onlyNew": {
            "title": "Only new or changed (alert mode)",
            "type": "boolean",
            "description": "Save only tenders that are new, or whose status or last update changed since the previous run with the same filters. Combine with a daily schedule to get alerts. The first run saves everything. Unchanged tenders are not charged.",
            "default": false
          },
          "includeBidders": {
            "title": "Include bidders",
            "type": "boolean",
            "description": "SECOP II only. Adds the bidders of each tender (name and ID as published by SECOP) and their count. Costs one extra lookup per 50 tenders. Does not change which tenders match. Leave off unless you need the list.",
            "default": false
          },
          "includeDemandSummary": {
            "title": "Write demand summary",
            "type": "boolean",
            "description": "Writes the DEMAND_SUMMARY record to the run's key-value store: the top UNSPSC families among the saved tenders, with counts and total base value. Not charged.",
            "default": true
          },
          "appToken": {
            "title": "Socrata app token (optional)",
            "type": "string",
            "description": "Optional datos.gov.co app token. It raises the rate limit for heavy use. Leave empty for normal runs."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}