{
  "openapi": "3.0.1",
  "info": {
    "title": "Brazil Public Procurement / PNCP Licitações",
    "description": "Busca licitações e contratações públicas no Portal Nacional de Contratações Públicas (PNCP) por UF, palavra-chave ou nicho e exporta JSON/CSV. Brazil public procurement scraper for PNCP tenders and bids via the official API — no API key. Filter by state, keyword, modality and open proposal deadline.",
    "version": "0.1",
    "x-build-id": "aMmkIcJRBTdmVWPrw"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/jccdev7~pncp-licitacoes/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-jccdev7-pncp-licitacoes",
        "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/jccdev7~pncp-licitacoes/runs": {
      "post": {
        "operationId": "runs-sync-jccdev7-pncp-licitacoes",
        "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/jccdev7~pncp-licitacoes/run-sync": {
      "post": {
        "operationId": "run-sync-jccdev7-pncp-licitacoes",
        "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": {
          "uf": {
            "title": "UF",
            "enum": [
              "",
              "AC",
              "AL",
              "AP",
              "AM",
              "BA",
              "CE",
              "DF",
              "ES",
              "GO",
              "MA",
              "MT",
              "MS",
              "MG",
              "PA",
              "PB",
              "PR",
              "PE",
              "PI",
              "RJ",
              "RN",
              "RS",
              "RO",
              "RR",
              "SC",
              "SP",
              "SE",
              "TO"
            ],
            "type": "string",
            "description": "Sigla da unidade federativa da unidade administrativa. Deixe vazio para buscar em todo o Brasil (a consulta fica mais lenta)."
          },
          "palavraChave": {
            "title": "Palavra-chave",
            "type": "string",
            "description": "Texto buscado no objeto da contratação. Se houver várias palavras, todas precisam aparecer (sem distinguir maiúsculas). Exemplos: limpeza, merenda, software."
          },
          "nicho": {
            "title": "Nicho (opcional)",
            "enum": [
              "",
              "limpeza",
              "generos-alimenticios",
              "ti-software",
              "obras-reformas",
              "transporte-frete"
            ],
            "type": "string",
            "description": "Filtro pronto por padrões no objeto. Se você também preencher a palavra-chave, o item precisa casar com os dois.",
            "default": ""
          },
          "dias": {
            "title": "Janela de publicação (dias)",
            "minimum": 1,
            "maximum": 90,
            "type": "integer",
            "description": "Contratações publicadas no PNCP nos últimos N dias (incluindo hoje). Ignorado se dataInicial e dataFinal forem preenchidas.",
            "default": 10
          },
          "dataInicial": {
            "title": "Data inicial de publicação (opcional)",
            "pattern": "^$|^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Formato AAAA-MM-DD. Se preenchida junto com a data final, substitui a janela em dias."
          },
          "dataFinal": {
            "title": "Data final de publicação (opcional)",
            "pattern": "^$|^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Formato AAAA-MM-DD. Se preenchida junto com a data inicial, substitui a janela em dias."
          },
          "modalidades": {
            "title": "Modalidades",
            "type": "array",
            "description": "Códigos de modalidade da API de consulta do PNCP. O padrão cobre as duas mais usadas em disputa: pregão eletrônico (6) e concorrência eletrônica (4).",
            "items": {
              "type": "string",
              "enum": [
                "1",
                "2",
                "3",
                "4",
                "5",
                "6",
                "7",
                "8",
                "9",
                "10",
                "11",
                "12",
                "13"
              ],
              "enumTitles": [
                "1 — Leilão eletrônico",
                "2 — Diálogo competitivo",
                "3 — Concurso",
                "4 — Concorrência eletrônica",
                "5 — Concorrência presencial",
                "6 — Pregão eletrônico",
                "7 — Pregão presencial",
                "8 — Dispensa de licitação",
                "9 — Inexigibilidade",
                "10 — Manifestação de interesse",
                "11 — Pré-qualificação",
                "12 — Credenciamento",
                "13 — Leilão presencial"
              ]
            },
            "default": [
              "6",
              "4"
            ]
          },
          "apenasPropostasAbertas": {
            "title": "Só com prazo de propostas aberto",
            "type": "boolean",
            "description": "Se ligado, descarta contratações cuja data de encerramento das propostas já passou. Itens sem essa data são mantidos.",
            "default": true
          },
          "maxItens": {
            "title": "Máximo de itens no resultado",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "A busca para quando atinge esse número de itens filtrados. Use um valor menor para testes rápidos.",
            "default": 100
          },
          "gerarCsv": {
            "title": "Gerar arquivo CSV",
            "type": "boolean",
            "description": "Além do dataset JSON, grava licitacoes.csv no key-value store da execução.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}