{
  "openapi": "3.0.1",
  "info": {
    "title": "Brazilian Public Tenders API — PNCP (structured JSON)",
    "description": "Brazilian public tenders API (PNCP / licitações). Query open government procurement tenders as clean, structured JSON — filter by keyword, state (UF) and modality, with built-in dedup returning only new tenders each run. For developers and AI agents building on Brazilian public data. No login.",
    "version": "0.0",
    "x-build-id": "HojcdY4jR8WkOoCoy"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/syntax_void~radar-editais-pncp/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-syntax_void-radar-editais-pncp",
        "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/syntax_void~radar-editais-pncp/runs": {
      "post": {
        "operationId": "runs-sync-syntax_void-radar-editais-pncp",
        "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/syntax_void~radar-editais-pncp/run-sync": {
      "post": {
        "operationId": "run-sync-syntax_void-radar-editais-pncp",
        "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": "Palavras-chave",
            "type": "array",
            "description": "Termos para filtrar/ranquear editais (busca no objeto, orgao e municipio; ignora acento/caixa). Vazio = traz todos os editais em aberto das modalidades selecionadas.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "modalidades": {
            "title": "Modalidades (codigos PNCP)",
            "type": "array",
            "description": "OBRIGATORIO pela API do PNCP: o endpoint /contratacoes/proposta rejeita a consulta (HTTP 422) sem ao menos uma modalidade. Codigos: 1=Leilao Eletronico, 2=Dialogo Competitivo, 3=Concurso, 4=Concorrencia Eletronica, 5=Concorrencia Presencial, 6=Pregao Eletronico, 7=Pregao Presencial, 8=Dispensa de Licitacao, 9=Inexigibilidade, 10=Manifestacao de Interesse, 11=Pre-qualificacao, 12=Credenciamento, 13=Leilao Presencial. Padrao 6 e 8 cobrem a maior parte das contratacoes.",
            "default": [
              "6",
              "8"
            ],
            "items": {
              "type": "string"
            }
          },
          "ufs": {
            "title": "UFs (siglas)",
            "type": "array",
            "description": "Siglas dos estados a monitorar (ex.: SP, RJ, BA). Vazio = todas as UFs.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "minScore": {
            "title": "Score minimo de relevancia (0 ou 1)",
            "minimum": 0,
            "maximum": 1,
            "type": "integer",
            "description": "0 = basta casar uma palavra-chave. 1 = o edital precisa casar TODAS as palavras-chave. Sem efeito quando nenhuma palavra-chave e informada.",
            "default": 0
          },
          "onlyNew": {
            "title": "Somente novos (dedup entre execucoes)",
            "type": "boolean",
            "description": "Se ligado, ignora editais ja entregues em execucoes anteriores (estado no Key-Value Store).",
            "default": true
          },
          "maxResults": {
            "title": "Maximo de resultados",
            "minimum": 1,
            "type": "integer",
            "description": "Numero maximo de editais retornados por execucao.",
            "default": 200
          },
          "pageSize": {
            "title": "Tamanho da pagina (API PNCP)",
            "minimum": 10,
            "maximum": 500,
            "type": "integer",
            "description": "Registros por pagina na API do PNCP (max. 500).",
            "default": 50
          },
          "maxPagesPerQuery": {
            "title": "Max. de paginas por consulta",
            "minimum": 1,
            "type": "integer",
            "description": "Limite de paginas por modalidade/UF, para controlar custo de execucao.",
            "default": 10
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}