{
  "openapi": "3.0.1",
  "info": {
    "title": "Licitações Brasil — PNCP Public Tenders Monitor",
    "description": "Brazilian public tenders (licitações, editais, pregões) from the official PNCP API. Filter by keyword, state, municipality, modality, value and agency; get open tenders, item lists and daily alerts of new tenders only.",
    "version": "1.0",
    "x-build-id": "2lYEN1ymhM5JBIVHJ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/thxtype~licitacoes-brasil/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-thxtype-licitacoes-brasil",
        "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/thxtype~licitacoes-brasil/runs": {
      "post": {
        "operationId": "runs-sync-thxtype-licitacoes-brasil",
        "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/thxtype~licitacoes-brasil/run-sync": {
      "post": {
        "operationId": "run-sync-thxtype-licitacoes-brasil",
        "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 / Palavras-chave",
            "type": "array",
            "description": "Words searched in the tender object (objeto), accent-insensitive and whole-word: \"software\" also matches \"softwares\" and \"SOFTWARE\", but not \"softwarehouse\". End a word with * for a prefix (\"licen*\" matches licença, licenciamento). A tender is kept when ANY keyword matches. Leave empty for all tenders.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "states": {
            "title": "States / Estados (UF)",
            "type": "array",
            "description": "UF codes (SP, RJ, MG...) or state names. Empty = whole country.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "municipalities": {
            "title": "Municipalities / Municípios",
            "type": "array",
            "description": "IBGE codes (\"3550308\") or names (\"Campinas\", \"Campinas/SP\"). Names are resolved to IBGE codes automatically. Empty = any.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "modalidades": {
            "title": "Modalities / Modalidades",
            "type": "array",
            "description": "Procurement modalities. Empty = all.",
            "items": {
              "type": "string",
              "enum": [
                "pregao_eletronico",
                "pregao_presencial",
                "concorrencia_eletronica",
                "concorrencia_presencial",
                "dispensa",
                "inexigibilidade",
                "credenciamento",
                "chamada_publica",
                "leilao_eletronico",
                "leilao_presencial",
                "concurso",
                "dialogo_competitivo",
                "manifestacao_interesse",
                "pre_qualificacao",
                "inaplicabilidade",
                "pregao_eletronico_internacional",
                "pregao_presencial_internacional",
                "concorrencia_eletronica_internacional",
                "concorrencia_presencial_internacional"
              ],
              "enumTitles": [
                "Pregão eletrônico (6)",
                "Pregão presencial (7)",
                "Concorrência eletrônica (4)",
                "Concorrência presencial (5)",
                "Dispensa de licitação (8)",
                "Inexigibilidade (9)",
                "Credenciamento (12)",
                "Chamada pública (15)",
                "Leilão eletrônico (1)",
                "Leilão presencial (13)",
                "Concurso (3)",
                "Diálogo competitivo (2)",
                "Manifestação de interesse (10)",
                "Pré-qualificação (11)",
                "Inaplicabilidade da licitação (14)",
                "Pregão eletrônico internacional (18)",
                "Pregão presencial internacional (19)",
                "Concorrência eletrônica internacional (16)",
                "Concorrência presencial internacional (17)"
              ]
            },
            "default": []
          },
          "onlyOpenForProposals": {
            "title": "Only open for proposals / Só com propostas abertas",
            "type": "boolean",
            "description": "On: tenders still receiving proposals (closing date in the future, status \"Divulgada no PNCP\"), newest first. Off: every tender published in the date range, any status.",
            "default": true
          },
          "lastNDays": {
            "title": "Published in the last N days",
            "minimum": 0,
            "maximum": 365,
            "type": "integer",
            "description": "Only tenders published on PNCP in the last N days. 0 = no limit when \"only open\" is on; the last 7 days when it is off.",
            "default": 0
          },
          "dateFrom": {
            "title": "Published from (date)",
            "type": "string",
            "description": "Start of the publication date range, YYYY-MM-DD. Overrides \"last N days\"."
          },
          "dateTo": {
            "title": "Published to (date)",
            "type": "string",
            "description": "End of the publication date range, YYYY-MM-DD. Default: today."
          },
          "closingWithinDays": {
            "title": "Proposals close within N days",
            "minimum": 0,
            "maximum": 3650,
            "type": "integer",
            "description": "Only tenders whose proposal deadline (dataEncerramentoProposta) is within the next N days. 0 = any deadline.",
            "default": 0
          },
          "minValue": {
            "title": "Min estimated value (R$)",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum valorTotalEstimado in BRL. Tenders without an estimated value (secret budget) are dropped when this is set."
          },
          "maxValue": {
            "title": "Max estimated value (R$)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum valorTotalEstimado in BRL."
          },
          "esferas": {
            "title": "Government sphere / Esfera",
            "type": "array",
            "description": "Federal, state, municipal and/or district bodies. Empty = all.",
            "items": {
              "type": "string",
              "enum": [
                "F",
                "E",
                "M",
                "D"
              ],
              "enumTitles": [
                "Federal",
                "Estadual",
                "Municipal",
                "Distrital"
              ]
            },
            "default": []
          },
          "orgaoCnpjs": {
            "title": "Agency CNPJs / CNPJ do órgão",
            "type": "array",
            "description": "Only tenders from these public bodies (14-digit CNPJ, punctuation optional).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Drop tenders whose object contains any of these words (same matching rules as keywords).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "searchInComplementaryInfo": {
            "title": "Also search \"informação complementar\"",
            "type": "boolean",
            "description": "Match keywords in the complementary information field as well as the object.",
            "default": false
          },
          "includeItens": {
            "title": "Include item list / Incluir itens",
            "type": "boolean",
            "description": "Fetch the items of each tender (description, quantity, unit, estimated unit price, ME/EPP benefit). Billed as a separate item-result event per item. Makes the run slower.",
            "default": false
          },
          "maxItensPerTender": {
            "title": "Max items per tender",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Cap on items fetched per tender (large price-registration tenders can have thousands).",
            "default": 100
          },
          "maxItems": {
            "title": "Max tenders",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Maximum number of tenders to save. 0 = no limit.",
            "default": 100
          },
          "maxRuntimeSeconds": {
            "title": "Max scan time (seconds)",
            "minimum": 0,
            "maximum": 86400,
            "type": "integer",
            "description": "Stop scanning after this many seconds and save what was found. A keyword search over every open tender in Brazil can read ~700 slow PNCP pages (20+ minutes); narrow it with states or dates, or raise this. 0 = until the run timeout.",
            "default": 0
          },
          "monitorMode": {
            "title": "Monitor mode (only new tenders)",
            "type": "boolean",
            "description": "Remember the tenders already returned and output only new ones on the next runs. Use with an Apify Schedule for daily alerts. State is kept in the named key-value store \"licitacoes-brasil-monitor\".",
            "default": false
          },
          "monitorKey": {
            "title": "Monitor name",
            "type": "string",
            "description": "Optional name for this monitor's memory, e.g. \"software-sp\". Empty = derived from the filters, so changing a filter starts a fresh monitor."
          },
          "maxConcurrency": {
            "title": "Max parallel requests",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Requests to the PNCP API in flight at the same time.",
            "default": 4
          },
          "requestsPerMinute": {
            "title": "Requests per minute",
            "minimum": 1,
            "maximum": 120,
            "type": "integer",
            "description": "Pace of requests to the PNCP API. PNCP allows about 30 per minute per IP and blocks for ~30 s above that; the Actor slows down by itself when it gets blocked.",
            "default": 28
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}