{
  "openapi": "3.0.1",
  "info": {
    "title": "Radar de Licitações PNCP com resumo IA do edital",
    "description": "Encontra licitações com propostas abertas no PNCP (Brasil) por palavra-chave, UF, modalidade e valor, traz os itens e, opcionalmente, lê o edital em PDF e devolve um resumo com prazos, habilitação e qualificação técnica.",
    "version": "0.1",
    "x-build-id": "n7jQfL5t1ouLkb4xB"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/radar-licitacoes-br~pncp-radar-licitacoes/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-radar-licitacoes-br-pncp-radar-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/radar-licitacoes-br~pncp-radar-licitacoes/runs": {
      "post": {
        "operationId": "runs-sync-radar-licitacoes-br-pncp-radar-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/radar-licitacoes-br~pncp-radar-licitacoes/run-sync": {
      "post": {
        "operationId": "run-sync-radar-licitacoes-br-pncp-radar-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",
        "required": [
          "palavrasChave"
        ],
        "properties": {
          "palavrasChave": {
            "title": "Palavras-chave",
            "type": "array",
            "description": "A licitação entra se o objeto contiver QUALQUER uma destas palavras (sem diferenciar acentos ou maiúsculas).",
            "default": [
              "limpeza",
              "conservação predial"
            ],
            "items": {
              "type": "string"
            }
          },
          "palavrasExcluidas": {
            "title": "Palavras excluídas",
            "type": "array",
            "description": "Descarta a licitação se o objeto contiver qualquer uma destas.",
            "items": {
              "type": "string"
            }
          },
          "ufs": {
            "title": "UFs",
            "type": "array",
            "description": "Siglas dos estados (ex.: SP, PR). Vazio = Brasil inteiro (mais lento).",
            "default": [
              "SP"
            ],
            "items": {
              "type": "string"
            }
          },
          "modalidades": {
            "title": "Modalidades",
            "type": "array",
            "description": "Códigos do PNCP. Padrão: 6 Pregão Eletrônico, 8 Dispensa, 4 Concorrência Eletrônica.",
            "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"
              ]
            },
            "default": [
              "6",
              "8",
              "4"
            ]
          },
          "diasAteEncerramento": {
            "title": "Encerramento em até (dias)",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "Considera licitações cujo prazo de propostas termina em até N dias a partir de hoje.",
            "default": 30
          },
          "valorMinimo": {
            "title": "Valor estimado mínimo (R$)",
            "minimum": 0,
            "type": "integer",
            "description": "Descarta licitações com valor estimado abaixo deste (as de orçamento sigiloso nunca são descartadas)."
          },
          "valorMaximo": {
            "title": "Valor estimado máximo (R$)",
            "minimum": 0,
            "type": "integer",
            "description": "Descarta licitações com valor estimado acima deste."
          },
          "maxResultados": {
            "title": "Máximo de licitações",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Quantas licitações entregar no máximo, das que encerram antes para as que encerram depois.",
            "default": 15
          },
          "maxPaginasPorBusca": {
            "title": "Máximo de páginas do PNCP por UF e modalidade",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Cada página tem 50 licitações. Se o limite cortar a busca, o resultado avisa que foi parcial.",
            "default": 10
          },
          "incluirItens": {
            "title": "Incluir itens da licitação",
            "type": "boolean",
            "description": "Traz até 30 itens de cada licitação (descrição, quantidade, valor unitário estimado).",
            "default": true
          },
          "resumirComIA": {
            "title": "Resumir o edital com IA",
            "type": "boolean",
            "description": "Baixa o PDF do edital e devolve prazos, habilitação, qualificação técnica e pontos de atenção.",
            "default": false
          },
          "perfilEmpresa": {
            "title": "Perfil da sua empresa (opcional)",
            "type": "string",
            "description": "Ex.: 'ME de limpeza em Campinas, 12 funcionários, atestados de 2 prefeituras, sem certificação ISO'. A IA diz se o encaixe é provável."
          },
          "modeloIA": {
            "title": "Modelo de IA",
            "enum": [
              "claude-haiku-5-5",
              "claude-opus-5-5"
            ],
            "type": "string",
            "description": "Haiku 5.5 é rápido e barato; Opus 5.5 lê com mais cuidado editais longos e complexos.",
            "default": "claude-haiku-5-5"
          },
          "maxPaginasEdital": {
            "title": "Máximo de páginas lidas do edital",
            "minimum": 5,
            "maximum": 600,
            "type": "integer",
            "description": "Editais maiores são lidos só até esta página; o resultado avisa quando o texto foi cortado.",
            "default": 120
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}