# Brazil PNCP Public Tenders Monitor (`downright_blessing/brazil-pncp-tenders-monitor`) Actor

Monitor Brazilian public procurement tenders (licitações / editais / pregão) from PNCP — Portal Nacional de Contratações Públicas. Official public API → structured JSON for bid desks, GovTech, compliance and supplier intel.

- **URL**: https://apify.com/downright\_blessing/brazil-pncp-tenders-monitor.md
- **Developed by:** [Joao Pedro Rosado](https://apify.com/downright_blessing) (community)
- **Categories:** Automation, Developer tools, AI
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 1,000 tender result rows

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

## Brazil PNCP Public Tenders Monitor

Monitor **Brazil PNCP** (**Portal Nacional de Contratações Públicas**) public procurement **tenders** from the **official public Consulta API**. Pull structured notices across federal, state and municipal buyers — objeto, buyer CNPJ, UF, modality, estimated values in BRL, proposal deadlines and deep links — with no login, browser or HTML scraping.

Use this Actor when you need clean JSON of Brazilian public procurement notices for bid desks, GovTech pipelines, supplier compliance or market intelligence.

**Store:** [brazil-pncp-tenders-monitor](https://apify.com/downright_blessing/brazil-pncp-tenders-monitor) · **Sibling:** [Awarded Contracts](https://apify.com/downright_blessing/brazil-pncp-awarded-contracts)

***

### What it does

1. Calls the official PNCP endpoint `contratacoes/publicacao` for the `dateFrom`–`dateTo` publication window.
2. Optionally filters by UF (state), buyer CNPJ (`orgaoCnpj`) and keywords in `objetoCompra`.
3. Writes one normalized Dataset row per notice, including a `pncpUrl` deep link.

Source base: `https://pncp.gov.br/api/consulta` — public government open data.

### Who it's for

- Bid desks and GovTech / procurement SaaS
- Supplier compliance, KYC and risk enrichment
- LatAm market-intel and public-spend research
- Agents / MCP tools that need Brazil procurement as structured data

### Input summary

| Field | Required | Description |
|---|---|---|
| `dateFrom` / `dateTo` | yes | Publication window as `YYYYMMDD` |
| `modalidadeId` | yes | PNCP modality code (default `6` = Pregão Eletrônico) |
| `uf` | no | Two-letter state (`SP`, `RJ`, …) |
| `orgaoCnpj` | no | Buyer CNPJ (14 digits) |
| `keywords` | no | Keep notices whose `objetoCompra` matches ANY term |
| `maxItems` | no | Hard Dataset cap (default 100; also caps pay-per-event spend) |
| `pageSize` | no | API page size 10–50 (default 50) |

#### Common PNCP modality codes

| Id | Name (approx.) |
|---|---|
| 4 | Concorrência |
| 6 | Pregão Eletrônico |
| 7 | Pregão Presencial |
| 8 | Dispensa |
| 9 | Inexigibilidade |

Confirm against current PNCP docs before production schedules.

### Output fields

One Dataset row per tender notice. Key fields:

`numeroControlePNCP`, `numeroCompra`, `anoCompra`, `sequencialCompra`, `processo`, `objetoCompra`, `modalidadeId`, `modalidadeNome`, `modoDisputaNome`, `situacaoCompraNome`, `valorTotalEstimado`, `valorTotalHomologado`, `currency` (`BRL`), `dataPublicacaoPncp`, `dataAberturaProposta`, `dataEncerramentoProposta`, `orgaoCnpj`, `orgaoRazaoSocial`, `uf`, `municipio`, `amparoLegal`, `linkSistemaOrigem`, `pncpUrl`, `scrapedAt`.

### Pricing

**Pay-per-event** is already configured on the Store. You are charged for Actor starts and for result rows pushed to the Dataset. Use `maxItems` as your spend cap. Exact event prices appear on the Actor’s Store pricing panel.

### Quick start (Apify Console)

1. Open [brazil-pncp-tenders-monitor](https://apify.com/downright_blessing/brazil-pncp-tenders-monitor) → **Try for free** / **Start**.
2. Set `dateFrom` and `dateTo` (e.g. last 7–10 days as `YYYYMMDD`).
3. Keep default `modalidadeId = 6`, or change modality / add `uf` / `keywords`.
4. Set `maxItems` (e.g. 50 for a smoke run).
5. Run → open the default Dataset for JSON/CSV export, or schedule daily.

Example input:

```json
{
  "dateFrom": "20260901",
  "dateTo": "20260910",
  "modalidadeId": 6,
  "uf": "SP",
  "keywords": ["software", "cloud"],
  "maxItems": 100
}
```

### Related Actors (Brazil open data)

- [Brazil PNCP Awarded Contracts](https://apify.com/downright_blessing/brazil-pncp-awarded-contracts) — published contracts / valores finais
- [Brazil CEIS/CNEP Sanctions Delta](https://apify.com/downright_blessing/brazil-ceis-cnep-sanctions-delta) — Portal da Transparência sanctions
- [Brazil TCU Acórdãos Keyword Monitor](https://apify.com/downright_blessing/brazil-tcu-acordaos-keyword-monitor) — TCU open-data decisions
- [Brazil NCM / TIPI Lookup](https://apify.com/downright_blessing/brazil-ncm-tipi-lookup) — Mercosur NCM + Portal Único attributes

### Legal / data source

Public government open data via the **official PNCP Consulta API**. No login, cookies or ToS-walled HTML. Respect rate limits; identify a clear User-Agent; do not hammer the service. Not intended for PII harvesting beyond what the public notices already publish.

***

### Português (resumo)

Monitora **licitações** do **PNCP** (Portal Nacional de Contratações Públicas) pela API pública oficial. Filtra por período, UF, CNPJ do órgão e palavras-chave no objeto. Ideal para desks de licitação, compliance e inteligência de gasto público. Modelo **pay-per-event** na Store; use `maxItems` para limitar custo.

# Actor input Schema

## `mode` (type: `string`):

recent = notices published in date range; filter locally by keywords after fetch.

## `dateFrom` (type: `string`):

Inclusive start of PNCP publication window. Example: 20260901

## `dateTo` (type: `string`):

Inclusive end of PNCP publication window. Example: 20260910

## `modalidadeId` (type: `integer`):

PNCP codigoModalidadeContratacao. Common: 6=Pregão Eletrônico, 8=Dispensa, 9=Inexigibilidade, 4=Concorrência. See README for full list.

## `uf` (type: `string`):

Optional 2-letter UF (e.g. SP, RJ, PR). Empty = all states.

## `keywords` (type: `array`):

Keep only notices whose objetoCompra matches ANY keyword (case-insensitive). Empty = keep all.

## `orgaoCnpj` (type: `string`):

Optional 14-digit CNPJ of contracting body. Empty = all.

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

Hard cap on dataset rows (also caps Apify pay-per-result billing).

## `pageSize` (type: `integer`):

API page size (PNCP requires >= 10).

## Actor input object example

```json
{
  "mode": "recent",
  "dateFrom": "20260901",
  "dateTo": "20260910",
  "modalidadeId": 6,
  "keywords": [],
  "maxItems": 100,
  "pageSize": 50
}
```

# Actor output Schema

## `tenders` (type: `string`):

Default dataset items: PNCP notices (objeto, orgao, UF, dates, values, pncpUrl).

# 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 = {
    "dateFrom": "20260901",
    "dateTo": "20260910"
};

// Run the Actor and wait for it to finish
const run = await client.actor("downright_blessing/brazil-pncp-tenders-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 = {
    "dateFrom": "20260901",
    "dateTo": "20260910",
}

# Run the Actor and wait for it to finish
run = client.actor("downright_blessing/brazil-pncp-tenders-monitor").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 '{
  "dateFrom": "20260901",
  "dateTo": "20260910"
}' |
apify call downright_blessing/brazil-pncp-tenders-monitor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,downright_blessing/brazil-pncp-tenders-monitor"
        }
    }
}
```

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/XzN9eYtHGmfl1UJl1/builds/7PY75PRuQFQDA8D9I/openapi.json
