{
  "openapi": "3.0.1",
  "info": {
    "title": "Licitações PNCP — Alertas de Novas Licitações (Brasil)",
    "description": "Receba as licitações novas do PNCP (Portal Nacional de Contratações Públicas) que interessam à sua empresa: filtre por palavra-chave, estado, cidade, modalidade e valor. Agende e receba alertas no Telegram, Slack, e-mail via webhook ou planilha.",
    "version": "0.1",
    "x-build-id": "qgeGrMcpi0ItiqEGy"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/juanga~pncp-licitacoes-alertas/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-juanga-pncp-licitacoes-alertas",
        "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/juanga~pncp-licitacoes-alertas/runs": {
      "post": {
        "operationId": "runs-sync-juanga-pncp-licitacoes-alertas",
        "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/juanga~pncp-licitacoes-alertas/run-sync": {
      "post": {
        "operationId": "run-sync-juanga-pncp-licitacoes-alertas",
        "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": "A licitação entra se o objeto contém QUALQUER uma destas palavras ou frases (sem diferenciar acentos/maiúsculas; numa frase, todas as palavras precisam aparecer). Vazio = todas.",
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Excluir palavras",
            "type": "array",
            "description": "Descarta licitações cujo objeto contém qualquer uma destas palavras.",
            "items": {
              "type": "string"
            }
          },
          "modalities": {
            "title": "Modalidades",
            "type": "array",
            "description": "Modalidades a monitorar. Dispensa de Licitação tem muito volume.",
            "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",
              "4"
            ]
          },
          "states": {
            "title": "Estados (UF)",
            "type": "array",
            "description": "Vazio = Brasil inteiro.",
            "items": {
              "type": "string",
              "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"
              ]
            }
          },
          "cities": {
            "title": "Cidades",
            "type": "array",
            "description": "Opcional. Nomes de municípios (ex.: Campinas). Vazio = todas.",
            "items": {
              "type": "string"
            }
          },
          "minValue": {
            "title": "Valor estimado mínimo (R$)",
            "minimum": 0,
            "type": "integer",
            "description": "Opcional. Licitações sem valor informado são descartadas quando há mínimo."
          },
          "maxValue": {
            "title": "Valor estimado máximo (R$)",
            "minimum": 0,
            "type": "integer",
            "description": "Opcional."
          },
          "lookbackDays": {
            "title": "Dias para trás",
            "minimum": 0,
            "maximum": 30,
            "type": "integer",
            "description": "Janela de publicação consultada em cada execução: hoje e os N dias anteriores (horário de Brasília). 1 cobre a virada do dia.",
            "default": 1
          },
          "firstRun": {
            "title": "Primeira execução",
            "enum": [
              "emit",
              "baseline"
            ],
            "type": "string",
            "description": "O que a primeira execução retorna.",
            "default": "emit"
          },
          "stateStoreName": {
            "title": "Nome do armazenamento de estado",
            "type": "string",
            "description": "Key-value store nomeado que guarda as licitações já retornadas.",
            "default": "pncp-licitacoes-state"
          },
          "seenRetentionDays": {
            "title": "Lembrar licitações por (dias)",
            "minimum": 1,
            "maximum": 120,
            "type": "integer",
            "description": "Por quanto tempo uma licitação retornada é lembrada.",
            "default": 30
          },
          "failOnAnyError": {
            "title": "Falhar se alguma consulta falhar",
            "type": "boolean",
            "description": "Marca a execução como falha se qualquer consulta à API do PNCP falhar.",
            "default": false
          },
          "telegramBotToken": {
            "title": "Token do bot do Telegram",
            "type": "string",
            "description": "Crie um bot com o @BotFather."
          },
          "telegramChatId": {
            "title": "Chat ID do Telegram",
            "type": "string",
            "description": "Chat, grupo ou canal onde o bot publica."
          },
          "whatsappPhone": {
            "title": "WhatsApp: seu número",
            "type": "string",
            "description": "Opcional. Recebe os alertas no WhatsApp via CallMeBot (grátis). Número com código do país, ex.: +5511999998888. Ative uma vez enviando \"I allow callmebot to send me messages\" para +34 644 51 95 23 pelo WhatsApp e cole a API key abaixo."
          },
          "whatsappApiKey": {
            "title": "WhatsApp: API key do CallMeBot",
            "type": "string",
            "description": "A chave que o CallMeBot responde no WhatsApp."
          },
          "emailTo": {
            "title": "E-mail para alertas (o da sua conta Apify)",
            "type": "string",
            "description": "Opcional. Use o e-mail da sua conta Apify: o serviço de e-mail da Apify só envia para o dono da conta. Custo de frações de centavo por envio."
          },
          "slackWebhookUrl": {
            "title": "Webhook do Slack",
            "type": "string",
            "description": "Opcional."
          },
          "discordWebhookUrl": {
            "title": "Webhook do Discord",
            "type": "string",
            "description": "Opcional."
          },
          "webhookUrl": {
            "title": "Webhook próprio",
            "type": "string",
            "description": "Recebe um POST JSON { count, tenders } com as licitações novas (use com Zapier/Make para e-mail ou planilha)."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}