{
  "openapi": "3.0.1",
  "info": {
    "title": "LatAm Public Tenders: Colombia SECOP II and Brazil PNCP",
    "description": "Get new government tenders from Colombia (SECOP II) and Brazil (PNCP) in one clean schema: buyer, object, method, estimated value, deadlines and link. Keyword, state and value filters, plus an \"only new since last run\" mode for daily alerts.",
    "version": "0.1",
    "x-build-id": "NxgVQJeedpdRaJJlL"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ceibadata~latam-public-tenders/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ceibadata-latam-public-tenders",
        "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/ceibadata~latam-public-tenders/runs": {
      "post": {
        "operationId": "runs-sync-ceibadata-latam-public-tenders",
        "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/ceibadata~latam-public-tenders/run-sync": {
      "post": {
        "operationId": "run-sync-ceibadata-latam-public-tenders",
        "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": {
          "sources": {
            "title": "Sources",
            "type": "array",
            "description": "secop2 = Colombia SECOP II (datos.gov.co). pncp = Brazil Portal Nacional de Contratações Públicas.",
            "items": {
              "type": "string",
              "enum": [
                "secop2",
                "pncp"
              ],
              "enumTitles": [
                "Colombia: SECOP II",
                "Brazil: PNCP"
              ]
            },
            "default": [
              "secop2",
              "pncp"
            ]
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Keep tenders whose title or description contains any of these words (accent- and case-insensitive). Use Spanish for Colombia and Portuguese for Brazil, e.g. software, tecnologia, computadores. Leave empty for everything.",
            "items": {
              "type": "string"
            }
          },
          "daysBack": {
            "title": "Days back",
            "minimum": 1,
            "maximum": 90,
            "type": "integer",
            "description": "Publication window when no dates are given: today and the previous N-1 days.",
            "default": 7
          },
          "dateFrom": {
            "title": "Published from (YYYY-MM-DD)",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2})?$",
            "type": "string",
            "description": "Optional. Overrides Days back."
          },
          "dateTo": {
            "title": "Published until (YYYY-MM-DD)",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2})?$",
            "type": "string",
            "description": "Optional. Defaults to today."
          },
          "onlyOpen": {
            "title": "Only open for bids",
            "type": "boolean",
            "description": "Skip tenders that are closed or whose bid deadline has passed.",
            "default": true
          },
          "onlyNew": {
            "title": "Only new since my last run",
            "type": "boolean",
            "description": "Remember what this search already returned and deliver only tenders you have not seen. Ideal for a daily schedule that feeds email, Slack or a CRM. You are only charged for new tenders.",
            "default": false
          },
          "pncpModalities": {
            "title": "Brazil: procurement methods",
            "type": "array",
            "description": "PNCP modalidades to include. Default: concorrência (4, 5), pregão (6, 7) and dispensa (8).",
            "items": {
              "type": "string",
              "enum": [
                "1",
                "2",
                "3",
                "4",
                "5",
                "6",
                "7",
                "8",
                "9",
                "10",
                "11",
                "12",
                "13"
              ],
              "enumTitles": [
                "Leilão eletrônico",
                "Diálogo competitivo",
                "Concurso",
                "Concorrência eletrônica",
                "Concorrência presencial",
                "Pregão eletrônico",
                "Pregão presencial",
                "Dispensa",
                "Inexigibilidade",
                "Manifestação de interesse",
                "Pré-qualificação",
                "Credenciamento",
                "Leilão presencial"
              ]
            },
            "default": [
              "4",
              "5",
              "6",
              "7",
              "8"
            ]
          },
          "brazilStates": {
            "title": "Brazil: states (UF)",
            "type": "array",
            "description": "Two-letter state codes, e.g. SP, RJ, MG. Empty = all states.",
            "items": {
              "type": "string"
            }
          },
          "colombiaDepartments": {
            "title": "Colombia: departments",
            "type": "array",
            "description": "Department names exactly as SECOP writes them, e.g. Antioquia, Valle del Cauca, Distrito Capital de Bogotá. Empty = all.",
            "items": {
              "type": "string"
            }
          },
          "includeDirectContracting": {
            "title": "Colombia: include direct contracting",
            "type": "boolean",
            "description": "SECOP 'Contratación directa' processes are not open competitions and are mostly individual service contracts. Off by default.",
            "default": false
          },
          "minValue": {
            "title": "Minimum estimated value",
            "minimum": 0,
            "type": "integer",
            "description": "In local currency (COP for Colombia, BRL for Brazil). Tenders without an estimated value are skipped when set."
          },
          "maxItems": {
            "title": "Maximum tenders",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop after delivering this many tenders in one run.",
            "default": 1000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}