{
  "openapi": "3.0.1",
  "info": {
    "title": "PNCP Licitacoes Hunter - Brazilian Public Tenders",
    "description": "Find open public tenders (licitações e editais) from Brazil's official PNCP portal. Filter by state, procurement type, keywords and buyer CNPJ: B2G sales leads ready for JSON, CSV or Excel.",
    "version": "0.1",
    "x-build-id": "Ok1gvgVcFeUqcCVuz"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/aldodantas~pncp-licitacoes/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-aldodantas-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/aldodantas~pncp-licitacoes/runs": {
      "post": {
        "operationId": "runs-sync-aldodantas-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/aldodantas~pncp-licitacoes/run-sync": {
      "post": {
        "operationId": "run-sync-aldodantas-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 (sigla do estado)",
            "pattern": "^$|^[A-Za-z]{2}$",
            "type": "string",
            "description": "Sigla de 2 letras. Deixe em branco para todos os estados."
          },
          "modalidades": {
            "title": "Modalidades de contratacao",
            "type": "array",
            "description": "Codigos: 1=Concorrencia, 2=Concorrencia Eletronica, 4=Concurso, 5=Leilao, 6=Pregao Eletronico, 7=Pregao Presencial, 8=Dispensa, 9=Inexigibilidade, 12=Credenciamento. Default: 6.",
            "default": [
              6
            ]
          },
          "palavrasChave": {
            "title": "Palavras-chave",
            "type": "array",
            "description": "Filtra editais cujo objeto contenha pelo menos uma destas palavras (case-insensitive). Deixe vazio para nao filtrar.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "cnpjOrgao": {
            "title": "CNPJ do orgao",
            "type": "string",
            "description": "CNPJ do orgao publicador (14 digitos, sem formatacao). Deixe em branco para todos."
          },
          "diasAFrente": {
            "title": "Dias a frente",
            "minimum": 1,
            "maximum": 180,
            "type": "integer",
            "description": "Horizonte em dias para dataFinal (fase de proposta aberta). Default 30.",
            "default": 30
          },
          "maxResults": {
            "title": "Maximo de resultados",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Hard cap para evitar scraping ilimitado. Default 500.",
            "default": 500
          },
          "esferas": {
            "title": "Esferas do órgão",
            "type": "array",
            "description": "Só editais destas esferas. Deixe vazio para todas. / Only tenders from these government levels; empty = all.",
            "items": {
              "type": "string",
              "enum": [
                "F",
                "E",
                "M",
                "D"
              ],
              "enumTitles": [
                "Federal",
                "Estadual (state)",
                "Municipal",
                "Distrital (Federal District)"
              ]
            },
            "default": []
          },
          "valorMinimo": {
            "title": "Valor estimado mínimo (R$)",
            "minimum": 0,
            "type": "integer",
            "description": "Descarta editais com valor estimado abaixo deste. Editais sem valor informado (sigiloso) continuam na lista. / Drops tenders below this estimated value (BRL); tenders with confidential value are kept."
          },
          "somenteAtivas": {
            "title": "Só editais ativos",
            "type": "boolean",
            "description": "Descarta editais suspensos, revogados ou anulados. / Drops suspended, revoked or annulled tenders.",
            "default": false
          },
          "somenteNovos": {
            "title": "Só editais novos",
            "type": "boolean",
            "description": "Entrega só o que não foi entregue antes com os mesmos filtros (para execuções agendadas). A memória fica num key-value store 'pncp-licitacoes-vistos' na sua conta. / Returns only tenders not returned before with the same filters, for scheduled runs; you pay only for new ones.",
            "default": false
          },
          "saidaPlana": {
            "title": "Saída plana (CSV/Excel)",
            "type": "boolean",
            "description": "Troca os objetos 'orgao' e 'unidade' por colunas (orgaoCnpj, unidadeMunicipio...), uma coluna por campo no CSV e no Excel. / Flat output: one column per field.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}