# Brazil Public Tenders & Auctions (PNCP) – Licitações e Leilões (`joao_marini/pncp-licitacoes`) Actor

Daily Brazilian government tenders AND public auctions (vehicles, scrap, real estate) from official PNCP API. Licitações, pregões e leilões. CSV/Excel. $5/1k.

- **URL**: https://apify.com/joao_marini/pncp-licitacoes.md
- **Developed by:** [Joao Luiz Marini](https://apify.com/joao_marini) (community)
- **Categories:** Lead generation, Business, Automation
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 results

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 Public Tenders & Auctions (PNCP) — Licitações e Leilões

### Why this Actor

Get **Brazilian government tenders and public auctions** (vehicles, scrap, unserviceable goods, real estate) from the official PNCP open-data API in one clean, normalized dataset. Whole-word keyword matching avoids false positives, results are deduplicated, and you **pay only per result** ($5 per 1,000). No login, no browser, runs in seconds.

### Example output (real records)

| Agency | City/UF | Modality | Object | Estimated value (BRL) | Proposals until |
|---|---|---|---|---|---|
| Município de Rio Brilhante | Rio Brilhante/MS | Leilão – Eletrônico | Public auction of unserviceable movable goods (vehicles, scrap and others) | 72,360.00 | 2026-11-03 08:30 |
| SAAE Salto | Salto/SP | Leilão – Eletrônico | Sale of vehicles, miscellaneous goods and one scrap vehicle | 203,600.00 | 2026-10-30 10:00 |
| Município de Belo Horizonte | Belo Horizonte/MG | Leilão – Eletrônico | Sale of real estate owned by the municipality | 40,463,000.00 | 2026-11-03 10:00 |

### Ready-made inputs

- **Vehicle auctions in São Paulo:** `{"onlyAuctions": true, "uf": "SP", "keywords": ["veículo", "veículos", "sucata"], "wholeWord": false}`
- **Open software tenders:** `{"mode": "open", "keywords": ["software", "licença de software"]}`
- **Dispensas of the last week in MG:** `{"mode": "published", "uf": "MG", "modalidades": ["8"], "dateFrom": "YYYY-MM-DD (7 days ago)"}`
- **Cleaning services, excluding vehicles:** `{"keywords": ["limpeza", "conservação"], "excludeKeywords": ["veículo"], "modalidades": ["6"]}`

### FAQ

**How much do 1,000 auctions cost?** About $5 (one dataset item = one result) plus Apify's tiny start fee.
**Can I schedule it daily?** Yes — use Apify Schedules (e.g. every morning) with `mode: open` to get only tenders still accepting proposals.
**Does it work with Make, Zapier or n8n?** Yes — via the Apify integrations/API or a webhook on run finish; results come as JSON/CSV/Excel.

### Integrations

- **Google Sheets** (Apify integration) for a live tender sheet.
- **Webhooks** on run success to push new tenders to your CRM or Slack.
- **n8n / Make / Zapier** through the Apify app or REST API.
- **MCP (AI agents):** available through the Apify MCP server, so agents can search Brazilian tenders directly.

**Find Brazilian government tenders (licitações) in minutes.** This Actor searches the official **PNCP – Portal Nacional de Contratações Públicas** open-data API (Law 14.133/2021) and returns clean, deduplicated records: agency, CNPJ, procurement object, estimated value, dates, and a direct link to the tender notice (edital).

### 🔨 Public auctions (leilões públicos)

Set `onlyAuctions: true` (or modalities `1` and `13`) to get **auctions run by Brazilian public bodies** published on PNCP:

- **Vehicles** (cars, motorcycles, trucks, buses, scrap vehicles) from city halls and agencies
- **Unserviceable goods** (bens inservíveis: furniture, IT equipment, scrap)
- **Machinery** (tractors, backhoes, equipment)
- **Real estate** owned by municipalities and public companies
  Each record has `tipo` (`leilao` / `licitacao`) and `categoriaLeilao` (`veiculos`, `bens_inserviveis`, `maquinas_equipamentos`, `imoveis`; keyword-based, may be empty).

### Use cases

- Sales teams selling to the Brazilian government (B2G): daily lead lists of new pregões/dispensas.
- Bid monitoring by keyword, state (UF) or city (IBGE code).
- Journalists, researchers, compliance & market-intelligence analysts.

### Input

| Field | Description |
|---|---|
| mode | `open` (default): tenders **still accepting proposals** (deadline between now and dateTo, default +30 days). `published`: tenders published in a date range. |
| keywords | Exact phrases, accent/case-insensitive, whole-word by default (`wholeWord`). Empty = all. |
| excludeKeywords | Drop results containing these words. |
| uf | State, e.g. `SP`, `MG`. |
| municipioIbge | 7-digit IBGE code, e.g. `3550308` (São Paulo). |
| modalidades | Optional in `open` mode (empty = all). 1–13 (6 = Pregão eletrônico, 8 = Dispensa, 4 = Concorrência eletrônica…). |
| dateFrom / dateTo | `published`: publication range (default last 30 days). `open`: dateTo = latest deadline. |
| maxResults | Stop after N unique results (default 20). |
| maxRunTimeSecs | Time budget; stops gracefully and keeps results (default 240 s, 0 = no limit). |

Tip: use specific keywords ("licença de software", "desenvolvimento de sistema") — generic words like "sistema" also match "sistema de abastecimento".

### Output (per tender)

`numeroControlePNCP, orgao, cnpj, unidade, uf, municipio, modalidade, objeto, valorEstimado, dataPublicacao, dataAberturaProposta, dataEncerramentoProposta, situacao, linkEdital, linkSistemaOrigem, matchedKeywords` … Export as JSON, CSV, Excel.

### Pricing

Pay per event: you pay per result stored in the dataset (Apify's standard `apify-default-dataset-item` event), plus Apify's standard start event.

### Reliability

Concurrent pagination (default 4 parallel requests, 50/page), exponential backoff with Retry-After on 429/5xx, polite delay between requests, dedupe by PNCP control number.

### Data source & legal

Public data published by Brazilian public bodies on PNCP, freely accessible without login (gov.br/pncp "Dados Abertos"). This Actor is **not affiliated** with the Brazilian Government. Data accuracy is the responsibility of each publishing agency.

***

## 🇧🇷 Buscador de Licitações do PNCP — Pregão, Dispensa, Concorrência

**Encontre licitações públicas no Brasil em minutos.** Consulta a API oficial de dados abertos do **PNCP** (Lei 14.133/2021) e entrega registros limpos e sem duplicatas: órgão, CNPJ, objeto, valor estimado, datas de abertura/encerramento de propostas e link do edital.

**Para quem:** empresas que vendem para o governo, consultorias de licitação, jornalistas e pesquisadores.
**Modo padrão:** só licitações com propostas em aberto.
**Leilões públicos:** `onlyAuctions: true` traz leilões de prefeituras e órgãos (veículos, bens inservíveis, máquinas, imóveis públicos), com campos `tipo` e `categoriaLeilao`.
**Filtros:** palavras-chave (com ou sem acento), exclusões, UF, município (código IBGE), modalidade e período.
**Exporta:** JSON, CSV, Excel — ideal para alertas diários de novas licitações.

Palavras-chave SEO: leilão público, leilão de veículos prefeitura, bens inservíveis, leilão de imóveis públicos, licitações, pregão eletrônico, dispensa de licitação, PNCP API, compras públicas, edital, licitação São Paulo, B2G Brasil.

# Actor input Schema

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

open = tenders still accepting proposals until dateTo (/contratacoes/proposta). published = tenders published between dateFrom and dateTo.

## `onlyAuctions` (type: `boolean`):

Return only public auctions: modalities 1 (Leilão eletrônico) and 13 (Leilão presencial) — vehicles, unserviceable goods, machinery and real estate sold by public bodies. Overrides 'modalidades'.

## `wholeWord` (type: `boolean`):

Each keyword is matched as an exact phrase on word boundaries (e.g. 'software' won't match 'softwares'; use both if needed).

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

Match any keyword in the procurement object (accent/case-insensitive). Empty = all.

## `excludeKeywords` (type: `array`):

Skip results whose object contains any of these.

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

Two-letter state code, e.g. SP. Empty = all states.

## `municipioIbge` (type: `string`):

7-digit IBGE city code, e.g. 3550308 (São Paulo).

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

Modalities. Empty in 'open' mode = all modalities; 'published' mode defaults to 6 and 8.

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

Only for 'published' mode. Default: 30 days ago (computed at run time).

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

'open': latest proposal deadline to include (default: today+30 days, computed at run time); API returns only tenders still open. 'published': end of publication range (default: today).

## `maxResults` (type: `integer`):

Maximum number of records to return (each record is charged as one 'result' event). The run stops as soon as this limit is reached.

## `maxPagesPerModality` (type: `integer`):

Max pages per modality (50 records/page)

## `requestDelaySecs` (type: `number`):

Delay between requests (s)

## `concurrency` (type: `integer`):

Pages fetched in parallel. A shared cooldown applies on HTTP 429; requestDelaySecs is the minimum spacing between request starts.

## `maxRunTimeSecs` (type: `integer`):

Stop gracefully after this many seconds and keep the results found so far (keyword searches scan many pages). 0 = no limit.

## Actor input object example

```json
{
  "mode": "open",
  "onlyAuctions": false,
  "wholeWord": true,
  "uf": "",
  "municipioIbge": "",
  "maxResults": 20,
  "maxPagesPerModality": 200,
  "requestDelaySecs": 0.5,
  "concurrency": 4,
  "maxRunTimeSecs": 240
}
```

# Actor output Schema

## `overview` (type: `string`):

All notices in the default dataset, shown with the 'overview' view.

# 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 = {
    "maxResults": 20,
    "maxRunTimeSecs": 240
};

// Run the Actor and wait for it to finish
const run = await client.actor("joao_marini/pncp-licitacoes").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 = {
    "maxResults": 20,
    "maxRunTimeSecs": 240,
}

# Run the Actor and wait for it to finish
run = client.actor("joao_marini/pncp-licitacoes").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 '{
  "maxResults": 20,
  "maxRunTimeSecs": 240
}' |
apify call joao_marini/pncp-licitacoes --silent --output-dataset

```

## MCP server setup

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

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/zsTRN7w4ooNYMaqwV/builds/TyqPsGudagUZIyudb/openapi.json
