# Radar de Diários Oficiais (`sh4dowstormsjv/radar-de-diarios-oficiais`) Actor

Alertas quando uma palavra-chave, empresa ou CNPJ aparece nos diários oficiais de municípios brasileiros: licitações, contratos, nomeações. Só novidades a cada execução.

- **URL**: https://apify.com/sh4dowstormsjv/radar-de-diarios-oficiais.md
- **Developed by:** [Richard Santos](https://apify.com/sh4dowstormsjv) (community)
- **Stats:** 2 total users, 1 monthly users, 72.7% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.00 / 1,000 alerta encontrados

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/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Radar de Diários Oficiais Municipais

**Receba alertas quando uma palavra-chave, uma empresa ou um CNPJ aparecer nos diários oficiais de municípios brasileiros.** Licitações, contratos, nomeações, sanções: em vez de abrir PDF por PDF, você recebe só o trecho que importa, com o link do diário.

Os dados vêm do [Querido Diário](https://queridodiario.ok.org.br), projeto da Open Knowledge Brasil que reúne os diários de centenas de cidades.

### Para quem é

| Você é... | O que monitorar | Exemplo de configuração |
|---|---|---|
| **Fornecedor do governo** | Novas licitações do seu ramo nas cidades onde vende | `termos`: `["pregão eletrônico uniforme escolar", "material de limpeza"]`, `municipios`: `["Campinas/SP", "Sorocaba/SP"]` |
| **Advogado ou compliance** | Tudo que sai sobre um cliente | `cnpjs`: `["12.345.678/0001-95"]`, `termos`: `["Construtora Exemplo Ltda"]` |
| **Empresa** | Seus próprios contratos, aditivos e notificações | `termos`: `["Nome da Sua Empresa"]` |
| **Jornalista ou pesquisador** | Um tema em uma cidade | `termos`: `["dispensa de licitação"]`, `municipios`: `["Salvador/BA"]` |

### Como usar

1. **Termos:** escreva as frases que quer encontrar. Cada uma é buscada exatamente como escrita.
2. **CNPJs (opcional):** com ou sem pontuação; buscamos os dois formatos.
3. **Municípios (opcional):** escreva o nome com a UF, como `Campinas/SP`. Vazio = todas as cidades cobertas.
4. **Agende** para rodar todo dia (em *Schedules*). Com **Só novidades** ligado (padrão), cada execução traz só o que é novo, sem repetir alertas nem cobrar duas vezes pelo mesmo trecho.
5. **Quer refazer uma busca ou só testar?** Desligue **Só novidades**: o robô busca tudo nos últimos dias escolhidos e não mexe na memória do agendamento.

### O que você recebe

Uma linha por trecho encontrado:

| data | municipio | uf | termoEncontrado | trecho | urlDiario |
|---|---|---|---|---|---|
| 2026-10-03 | Salto | SP | pregão eletrônico | ...Referente – Pregão Eletrônico nº 41/2026 Valor Total – R$ 3.700,00... | https://data.queridodiario.ok.org.br/... |

Exporte em Excel, CSV ou JSON, ou conecte a e-mail, Slack, Google Sheets e outras integrações da Apify.

### Preço

Você paga por alerta encontrado. Se nada novo apareceu, a execução custa quase nada.

### Limitações

- Cobre as cidades que o Querido Diário já indexa (não todos os 5.570 municípios).
- Diários publicados só como imagem, sem texto, podem não ser encontrados.

***

### English

**Get alerts when a keyword, company name or CNPJ (Brazilian company ID) appears in Brazilian municipal official gazettes** (*diários oficiais*): public tenders, contracts, appointments and sanctions. Data comes from [Querido Diário](https://queridodiario.ok.org.br) by Open Knowledge Brasil.

- **Input:** search phrases (in Portuguese), optional CNPJs, optional cities as `Name/UF` (e.g. `Campinas/SP`) or IBGE codes.
- **Output:** one row per match with date, city, state, matched term, text excerpt and gazette PDF link.
- **Incremental:** schedule it daily; each run returns only new matches.
- **Pricing:** pay per alert found.

Para desenvolvedores: veja [docs/DESENVOLVIMENTO.md](docs/DESENVOLVIMENTO.md).

# Actor input Schema

## `termos` (type: `array`):

Frases buscadas exatamente como escritas, sem diferenciar maiúsculas. Ex.: "pregão eletrônico", "merenda escolar", nome de uma empresa ou pessoa. / Exact phrases to search for (Portuguese).

## `cnpjs` (type: `array`):

CNPJs de empresas a monitorar, com ou sem pontuação (ex.: 12.345.678/0001-95). / Brazilian company IDs to monitor.

## `municipios` (type: `array`):

Cidades a monitorar. Escreva o nome com a UF (ex.: "Campinas/SP", "Belo Horizonte/MG") ou o código IBGE. Deixe vazio para buscar em todas as cidades cobertas. / Cities as "Name/UF" or IBGE code; empty = all covered cities.

## `diasRetroativos` (type: `integer`):

Quantos dias para trás buscar na primeira execução, ou sempre que "Só novidades" estiver desligado. Com "Só novidades" ligado, as execuções seguintes trazem apenas o que saiu desde a última. / Days back on the first run, or on every run when "Only new" is off.

## `maxAlertas` (type: `integer`):

Limite de alertas por execução, para controlar o custo (cada alerta é cobrado). O que passar do limite vem na próxima execução. / Max alerts per run (cost control); the rest comes in the next run.

## `tamanhoTrecho` (type: `integer`):

Quantos caracteres do texto do diário mostrar em volta do termo encontrado. / Excerpt length in characters.

## `somenteNovos` (type: `boolean`):

Ligado: o robô lembra o que já entregou e cada execução traz só alertas novos, sem repetir (ideal para agendar). Desligado: busca tudo de novo nos últimos dias escolhidos, sem mexer nessa memória (bom para testar). / On: each run returns only new alerts (best for schedules). Off: re-runs the full search without touching the memory.

## Actor input object example

```json
{
  "termos": [
    "pregão eletrônico"
  ],
  "diasRetroativos": 7,
  "maxAlertas": 50,
  "tamanhoTrecho": 400,
  "somenteNovos": true
}
```

# Actor output Schema

## `alertas` (type: `string`):

Trechos encontrados, com data, município, UF, termo encontrado e link do diário. / Matched excerpts with date, city, state, matched term and gazette link.

# 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 = {
    "termos": [
        "pregão eletrônico"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("sh4dowstormsjv/radar-de-diarios-oficiais").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 = { "termos": ["pregão eletrônico"] }

# Run the Actor and wait for it to finish
run = client.actor("sh4dowstormsjv/radar-de-diarios-oficiais").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "termos": [
    "pregão eletrônico"
  ]
}' |
apify call sh4dowstormsjv/radar-de-diarios-oficiais --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,sh4dowstormsjv/radar-de-diarios-oficiais"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/Exgyd2laJAfFbfh4q/builds/3Nd2meug0lB5nhBhH/openapi.json
