# BR Licitações Monitor — Alertas do PNCP (`geodetic_marigold/br-licitacoes-monitor`) Actor

Monitore licitações públicas do PNCP (Lei 14.133) por palavra-chave, UF e modalidade. A cada execução entrega SÓ as novas com propostas abertas — objeto, órgão, valor estimado, prazo e link do edital. Agende diário e nunca perca um pregão do seu nicho. Paga por licitação nova entregue.

- **URL**: https://apify.com/geodetic\_marigold/br-licitacoes-monitor.md
- **Developed by:** [Antonio Fernando Rincon de Mendonça](https://apify.com/geodetic_marigold) (community)
- **Categories:** Lead generation, Automation, Developer tools
- **Stats:** 3 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$50.00 / 1,000 licitação nova entregues

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js/docs.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## BR Licitações Monitor — Alertas do PNCP

Monitore **licitações públicas do Brasil** por palavra-chave e receba **só as novas** a
cada execução: objeto, órgão, UF/município, valor estimado, prazo de propostas e link
direto do edital. Fonte: **PNCP** (Portal Nacional de Contratações Públicas, da Lei
14.133/2021) — API oficial, pública, sem chave.

O monitor consulta as contratações com **recebimento de propostas ABERTO** — ou seja,
as que ainda dá tempo de participar.

> 💸 **Cobrança no valor:** **$0.05 por licitação nova entregue** (um filtro de nicho
> típico, ~10 novas/dia, sai em torno de **US$ 15/mês** — bem abaixo dos serviços de
> alerta tradicionais). Dedup garantido pelo `numeroControlePNCP` — a mesma licitação
> **nunca é cobrada duas vezes**. Execuções sem novidade custam **zero**. Use termos
> específicos do seu nicho: palavras muito genéricas + Brasil inteiro = muito volume.

### Como funciona

1. Você define **palavras-chave** (ex.: `software`, `merenda escolar`, `engenharia`),
   opcionalmente **UFs** e **modalidades**, e **agenda** o Actor (diário via Schedules).
2. Cada execução varre o PNCP (pregão eletrônico e dispensa por padrão), casa o objeto
   da licitação com suas palavras-chave (sem distinção de acentos/maiúsculas) e compara
   com o histórico do que já foi entregue (Key-Value Store nomeado
   `br-licitacoes-monitor-state`, na sua conta).
3. Só o que é **novo** vira item no dataset — pronto para e-mail, Slack, n8n, planilha.

A primeira execução entrega as licitações **abertas agora** no seu nicho (é exatamente
o que você quer saber no dia 1). Das execuções seguintes em diante, só novidade.

### Casos de uso

- **Fornecedores de governo** — nunca perder um pregão do seu nicho/região.
- **Consultorias de licitação** — radar por cliente (palavras-chave por segmento).
- **Distribuidores/indústria** — demanda pública por categoria de produto.
- **Análise de mercado público** — série de licitações por tema, com valor estimado.

### Input

| Campo | Tipo | Descrição |
|-------|------|-----------|
| `palavrasChave` | array | Termos buscados no objeto (qualquer um casando, entra). Obrigatório. |
| `ufs` | array | Filtro por estados (ex.: `["SP","MG"]`). Vazio = Brasil inteiro. |
| `modalidades` | array | Códigos PNCP. Padrão `[6, 8]` = Pregão Eletrônico + Dispensa (maior volume). |
| `maxItems` | integer | Teto de novas entregues por execução (padrão `200`). |

#### Exemplo

```json
{
  "palavrasChave": ["software", "sistema de gestão"],
  "ufs": ["SP"],
  "modalidades": [6],
  "maxItems": 50
}
````

### Output

```json
{
  "numeroControlePNCP": "12120272000104-1-000002/2025",
  "objeto": "Registro de preços para a aquisição de equipamentos...",
  "orgao": "CONSORCIO PUBLICO INTERMUNICIPAL DO RIO GRANDE DO NORTE",
  "uf": "RN",
  "municipio": "Natal",
  "modalidade": "Pregão - Eletrônico",
  "valorEstimado": 125623.94,
  "srp": false,
  "dataEncerramentoProposta": "2026-07-16T15:00:00",
  "linkPNCP": "https://pncp.gov.br/app/editais/12120272000104/2025/2",
  "linkSistemaOrigem": "https://cnetmobile.estaleiro.serpro.gov.br/...",
  "matchedKeywords": ["equipamentos"],
  "foundAt": "2026-07-16T12:00:00.000Z"
}
```

### Limites, declarados

- **A busca é no texto do objeto** da licitação. Termo muito específico pode não casar
  com a redação do órgão — prefira 2-4 termos do seu nicho (qualquer um casando, entra).
- **Cobertura = PNCP.** Contratações da Lei 14.133 publicadas no portal nacional.
  Processos antigos sob a lei 8.666 ou publicados só em diários locais não aparecem.
- **Modalidades varridas por código** (padrão 6 e 8, as de maior volume). Consulte a
  tabela oficial do PNCP para outros códigos.
- **Se mudar as palavras-chave**, licitações abertas que passarem a casar são entregues
  (e cobradas) — o histórico registra o que foi *entregue*, não o que foi *visto*.
- Teto defensivo de varredura: ~2.000 registros por modalidade por execução.
- Dado público oficial; não é aconselhamento jurídico sobre participação em licitações.

### O funil completo de dados BR (se encaixam)

1. **Achar** empresas por CNAE/UF → [br-company-finder](https://apify.com/geodetic_marigold/br-company-finder)
2. **Enriquecer** CNPJ (perfil, sócios, vagas) → [brazilian-company-signals](https://apify.com/geodetic_marigold/brazilian-company-signals)
3. **Vigiar** mudanças cadastrais → [br-company-monitor](https://apify.com/geodetic_marigold/br-company-monitor)
4. **Licitações do nicho** → este Actor.

### Agendamento (o jeito certo de usar)

Console Apify → **Schedules** → diário (ex.: 7h) apontando para este Actor com suas
palavras-chave. Integra com API, webhooks, n8n/Make e MCP (agentes de IA operam o
monitor sozinhos).

# Actor input Schema

## `palavrasChave` (type: `array`):

Termos buscados no objeto da licitação (sem distinção de maiúsculas/acentos). Ex.: "software", "merenda escolar", "engenharia". A licitação entra se casar com QUALQUER termo.

## `ufs` (type: `array`):

Filtre por estados (ex.: SP, RJ, MG). Vazio = Brasil inteiro.

## `modalidades` (type: `array`):

Códigos de modalidade da Lei 14.133 no PNCP. Padrão: 6 (Pregão Eletrônico) e 8 (Dispensa Eletrônica) — as de maior volume. Outros códigos: consulte a tabela de modalidades do PNCP.

## `maxItems` (type: `integer`):

Teto de licitações NOVAS entregues (e cobradas) por execução.

## Actor input object example

```json
{
  "palavrasChave": [
    "software",
    "sistema de gestão"
  ],
  "modalidades": [
    6,
    8
  ],
  "maxItems": 200
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "palavrasChave": [
        "software",
        "sistema de gestão"
    ],
    "modalidades": [
        6,
        8
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("geodetic_marigold/br-licitacoes-monitor").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "palavrasChave": [
        "software",
        "sistema de gestão",
    ],
    "modalidades": [
        6,
        8,
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("geodetic_marigold/br-licitacoes-monitor").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "palavrasChave": [
    "software",
    "sistema de gestão"
  ],
  "modalidades": [
    6,
    8
  ]
}' |
apify call geodetic_marigold/br-licitacoes-monitor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=geodetic_marigold/br-licitacoes-monitor",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "BR Licitações Monitor — Alertas do PNCP",
        "description": "Monitore licitações públicas do PNCP (Lei 14.133) por palavra-chave, UF e modalidade. A cada execução entrega SÓ as novas com propostas abertas — objeto, órgão, valor estimado, prazo e link do edital. Agende diário e nunca perca um pregão do seu nicho. Paga por licitação nova entregue.",
        "version": "0.1",
        "x-build-id": "KmPtrvjarbySQ6pky"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/geodetic_marigold~br-licitacoes-monitor/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-geodetic_marigold-br-licitacoes-monitor",
                "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/geodetic_marigold~br-licitacoes-monitor/runs": {
            "post": {
                "operationId": "runs-sync-geodetic_marigold-br-licitacoes-monitor",
                "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/geodetic_marigold~br-licitacoes-monitor/run-sync": {
            "post": {
                "operationId": "run-sync-geodetic_marigold-br-licitacoes-monitor",
                "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",
                        "uniqueItems": true,
                        "type": "array",
                        "description": "Termos buscados no objeto da licitação (sem distinção de maiúsculas/acentos). Ex.: \"software\", \"merenda escolar\", \"engenharia\". A licitação entra se casar com QUALQUER termo.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "ufs": {
                        "title": "UFs (opcional)",
                        "uniqueItems": true,
                        "type": "array",
                        "description": "Filtre por estados (ex.: SP, RJ, MG). Vazio = Brasil inteiro.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "modalidades": {
                        "title": "Modalidades (códigos PNCP)",
                        "type": "array",
                        "description": "Códigos de modalidade da Lei 14.133 no PNCP. Padrão: 6 (Pregão Eletrônico) e 8 (Dispensa Eletrônica) — as de maior volume. Outros códigos: consulte a tabela de modalidades do PNCP.",
                        "default": [
                            6,
                            8
                        ]
                    },
                    "maxItems": {
                        "title": "Máximo de licitações novas por execução",
                        "minimum": 1,
                        "maximum": 1000,
                        "type": "integer",
                        "description": "Teto de licitações NOVAS entregues (e cobradas) por execução.",
                        "default": 200
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
