{
  "openapi": "3.0.1",
  "info": {
    "title": "Brazil Public Tenders & Procurement (Licitações BR)",
    "description": "Licitações e contratações públicas do Brasil direto do PNCP oficial. Filtros por período, UF, município, modalidade, palavras-chave e CNPJ do órgão. Você paga só pelas licitações retornadas, com link da fonte oficial.",
    "version": "0.3",
    "x-build-id": "8PrCM0V1bIXezWg7w"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/kman-br~licitacoes-br/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-kman-br-licitacoes-br",
        "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/kman-br~licitacoes-br/runs": {
      "post": {
        "operationId": "runs-sync-kman-br-licitacoes-br",
        "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/kman-br~licitacoes-br/run-sync": {
      "post": {
        "operationId": "run-sync-kman-br-licitacoes-br",
        "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": {
          "queryType": {
            "title": "Tipo de consulta",
            "enum": [
              "publicacao",
              "proposta"
            ],
            "type": "string",
            "description": "publicacao (padrão): licitações publicadas no período dataInicial..dataFinal. proposta: somente licitações com recebimento de propostas ABERTO; nesse modo só dataFinal vale (teto do encerramento das propostas; padrão: hoje + 30 dias) e dataInicial é ignorada.",
            "default": "publicacao"
          },
          "dataInicial": {
            "title": "Data inicial (publicação)",
            "type": "string",
            "description": "Início do período de publicação no PNCP (AAAA-MM-DD). Padrão: 6 dias antes da data final. Ignorado em queryType=proposta. Períodos acima de 365 dias são divididos automaticamente (máx. 5 anos)."
          },
          "dataFinal": {
            "title": "Data final (publicação)",
            "type": "string",
            "description": "Fim do período de publicação (AAAA-MM-DD). Padrão: hoje, no horário de Brasília. Em queryType=proposta: teto do encerramento das propostas (padrão: hoje + 30 dias)."
          },
          "uf": {
            "title": "UF",
            "enum": [
              "AC",
              "AL",
              "AM",
              "AP",
              "BA",
              "CE",
              "DF",
              "ES",
              "GO",
              "MA",
              "MG",
              "MS",
              "MT",
              "PA",
              "PB",
              "PE",
              "PI",
              "PR",
              "RJ",
              "RN",
              "RO",
              "RR",
              "RS",
              "SC",
              "SE",
              "SP",
              "TO"
            ],
            "type": "string",
            "description": "Sigla do estado da unidade compradora. Vazio = todo o Brasil."
          },
          "municipio": {
            "title": "Município",
            "type": "string",
            "description": "Código IBGE de 7 dígitos (filtro direto na API, recomendado) ou nome do município (filtro após a coleta; informe também a UF)."
          },
          "modalidades": {
            "title": "Modalidades",
            "type": "array",
            "description": "Uma ou mais modalidades da Lei 14.133/2021, consultadas de uma vez. Vazio = todas (publicação, em ordem de volume) ou uma consulta única sem filtro de modalidade (propostas abertas).",
            "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 de Licitação",
                "Inexigibilidade",
                "Manifestação de Interesse",
                "Pré-qualificação",
                "Credenciamento",
                "Leilão - Presencial"
              ]
            }
          },
          "modalidade": {
            "title": "Modalidade (obsoleto)",
            "enum": [
              "1",
              "2",
              "3",
              "4",
              "5",
              "6",
              "7",
              "8",
              "9",
              "10",
              "11",
              "12",
              "13"
            ],
            "type": "string",
            "description": "Campo antigo, mantido por compatibilidade: uma única modalidade. Prefira \"Modalidades\"; se os dois forem informados, as modalidades são somadas."
          },
          "palavrasChave": {
            "title": "Palavras-chave",
            "type": "array",
            "description": "Retorna licitações cujo objeto ou informação complementar contenha QUALQUER uma das palavras (sem diferenciar acentos e maiúsculas). Filtro aplicado após a coleta.",
            "items": {
              "type": "string"
            }
          },
          "cnpjOrgao": {
            "title": "CNPJ do órgão",
            "type": "string",
            "description": "CNPJ do órgão comprador (14 dígitos; pontuação é ignorada)."
          },
          "maxItems": {
            "title": "Máximo de licitações",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Para ao atingir este número de licitações retornadas (cada uma é um evento cobrado).",
            "default": 100
          },
          "maxPaginasPorConsulta": {
            "title": "Máximo de páginas por consulta",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Proteção de custo e de carga na fonte: páginas de 50 registros lidas por modalidade e janela de datas. Relevante quando há palavras-chave ou município por nome.",
            "default": 20
          },
          "intervaloMs": {
            "title": "Intervalo entre requisições (ms)",
            "minimum": 250,
            "maximum": 10000,
            "type": "integer",
            "description": "Ritmo mínimo entre chamadas à API do PNCP, que limita rajadas (HTTP 429).",
            "default": 1200
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}