# PNCP Brazil Public Procurement Scraper (Licitações) (`dados_publicos_br/pncp-licitacoes`) Actor

Search and monitor Brazilian public tenders (licitações) from PNCP, the official national procurement portal. Filter by keyword, state, city, agency, type and value.

- **URL**: https://apify.com/dados_publicos_br/pncp-licitacoes.md
- **Developed by:** [Dados Públicos BR](https://apify.com/dados_publicos_br) (community)
- **Categories:** Lead generation, Business, Automation
- **Stats:** 2 total users, 1 monthly users, 50.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.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

## PNCP Brazil Public Procurement Scraper (Licitações)

Search and monitor **Brazilian public tenders (licitações)** from the **PNCP — Portal Nacional de Contratações Públicas**, the official national procurement portal where federal, state and municipal bodies must publish their tenders under Law 14.133/2021.

Get clean, structured data on every tender: what is being bought, by whom, where, the estimated value, and the proposal deadline, filtered down to just the opportunities you care about.

### What you can do with it

- 🔔 **Find open tenders to bid on**: get every tender currently accepting proposals that mentions *notebook*, *uniforme*, *pavimentação* or any keyword you sell.
- 📊 **Market research on government spending**: pull everything published in a period, by state, agency or procurement type.
- 🤖 **Feed your own alerts, CRM or BI**: schedule the Actor daily and send new tenders to Slack, e-mail, Google Sheets or a webhook through Apify integrations.
- 🏛️ **Monitor a specific agency or city** by CNPJ or IBGE city code.

### How to use

1. Open this Actor in Apify Console (you can try it on Apify's free plan).
2. Fill in the input, or keep the example values to see how the output looks.
3. Click **Start** and wait for the run to finish.
4. Download the results as JSON, CSV or Excel from the run's output, or get them through the Apify API.
5. To get fresh data automatically, create an Apify **Schedule** for the Actor (for example, every morning).

### Input examples

**Open tenders for IT equipment in São Paulo and Minas Gerais, worth at least R$ 50,000:**

```json
{
  "modo": "abertas",
  "palavrasChave": ["notebook", "computador", "desktop"],
  "palavrasExcluidas": ["locação", "computadorizado"],
  "ufs": ["SP", "MG"],
  "valorMinimo": 50000
}
```

**Everything published yesterday nationwide (any type):**

```json
{ "modo": "publicadas" }
```

**All electronic auctions (pregões) from one city hall (Mauá/SP) in 2026:**

```json
{
  "modo": "publicadas",
  "cnpjOrgao": "46.522.959/0001-98",
  "modalidades": ["6"],
  "dataInicial": "2026-01-01",
  "dataFinal": "2026-12-31"
}
```

#### Main options

| Field | Description |
|---|---|
| `modo` | `abertas`: tenders currently accepting proposals. `publicadas`: everything published in a date range. |
| `palavrasChave` | Keywords matched against the tender object. Accent- and case-insensitive; a term must start a word (`pneu` matches *pneus*, `ar` does not match *particular*). |
| `modoPalavrasChave` | `any` (default) or `all`. |
| `palavrasExcluidas` | Skip tenders containing these terms. |
| `ufs` | Brazilian states (e.g. `SP`, `RJ`). Empty = whole country. |
| `modalidades` | Procurement types (Pregão Eletrônico, Dispensa, Concorrência…). Empty = all. |
| `dataInicial` / `dataFinal` | Period. Ranges over 365 days are split automatically. |
| `valorMinimo` / `valorMaximo` | Estimated value range in BRL. |
| `codigoMunicipioIbge` / `cnpjOrgao` | Restrict to one city or one public body. |
| `incluirCanceladas` | Include revoked, annulled or suspended tenders (off by default). |
| `maxResultados` | Stop after N results (default 1000). |

### Output

One row per tender, deduplicated by its PNCP control number:

```json
{
  "numeroControlePNCP": "46522959000198-1-000140/2025",
  "url": "https://pncp.gov.br/app/editais/46522959000198/2025/140",
  "objeto": "Fornecimento de Artefatos de Concreto e Derivados",
  "modalidade": "Pregão - Eletrônico",
  "situacao": "Divulgada no PNCP",
  "registroDePrecos": true,
  "valorEstimado": 1022916.6,
  "dataPublicacao": "2025-10-15T17:17:24",
  "dataAberturaPropostas": "2026-10-15T09:00:00",
  "dataEncerramentoPropostas": "2026-10-28T08:59:00",
  "orgaoCnpj": "46522959000198",
  "orgaoNome": "MUNICIPIO DE MAUA",
  "esfera": "Municipal",
  "municipio": "Mauá",
  "codigoIbge": "3529401",
  "uf": "SP",
  "amparoLegal": "Lei 14.133/2021, Art. 28, I",
  "linkSistemaOrigem": null
}
```

Also included: `informacaoComplementar`, `modoDisputa`, `instrumentoConvocatorio`, `valorHomologado`, `poder`, `unidadeNome`, `processo`, `numeroCompra`, `anoCompra`, `sequencialCompra`, `linkProcessoEletronico`. Download as JSON, CSV, Excel or via API.

**Notes on the data:**

- Dates are in Brasília time (UTC−3), exactly as published by PNCP.
- `valorEstimado: 0` usually means the agency kept the budget confidential (*orçamento sigiloso*) or did not report it.
- Always confirm deadlines and requirements in the official notice (`url`) before bidding.

### How much does it cost?

You pay **US$ 0.003 per tender** delivered to your dataset (US$ 3 per 1,000), plus a tiny start fee per run. Pages scanned and records filtered out are free.

- A daily alert that finds 20 tenders: about **US$ 0.06 per day**.
- 1,000 tenders: about **US$ 3**.
- Control your spend with `maxResultados` and the run's maximum charge setting.

### Performance and limits

PNCP enforces a rate limit, so this Actor paces its requests (about one per second) and automatically waits and retries when throttled. Keyword searches scan the official listing and filter it, which takes about 1 minute per 1,000 tenders scanned. Narrow by state (`ufs`) or procurement type for faster runs.

### Data source and legality

All data comes from the **official public PNCP API** (`pncp.gov.br/api/consulta`), published under Brazil's open data and transparency laws (Lei 14.133/2021 and Lei 12.527/2011). It contains information about public bodies and procurement processes, not personal data. This Actor is not affiliated with the Brazilian government.

### FAQ

**How often should I run it?** For bid alerts, once a day with `modo: "abertas"` is enough. Use Apify Schedules and pair it with an integration (e-mail, Slack, webhook).

**Does it download the tender documents (PDF)?** Not yet: it returns the link to each tender's page on PNCP, where the documents are available.

**Can I use it from my code or an AI agent?** Yes. Every Apify Actor can be called through the Apify API and the official clients, and AI agents can find and run it through the Apify MCP server.

**Is the data official?** Yes. It comes straight from the official public source listed under "Data source", with no manual edits.

**Something broke or you need a field?** Open an issue on the Actor's *Issues* tab.

### Related Actors

More Brazilian public data from the same publisher:

- [Brazil government contracts and price records](https://apify.com/dados_publicos_br/pncp-contratos-atas): contracts, purchase orders and price registration records (atas): who won, what, how much.
- [Brazil government purchase prices](https://apify.com/dados_publicos_br/pncp-itens-precos): awarded unit prices and winning suppliers for any product or service, with price statistics.
- [Brazil Central Bank indicators](https://apify.com/dados_publicos_br/bcb-indicadores): Selic, CDI, IPCA, IGP-M, exchange rates and more, with accumulated totals.
- [Brazil holidays and business days](https://apify.com/dados_publicos_br/feriados-dias-uteis): national and banking holidays, business-day counts and date math.

***

#### 🇧🇷 Resumo em português

Busca e monitora **licitações públicas do Brasil** no **PNCP**, o portal oficial. Filtre por palavra-chave (sem se preocupar com acentos), UF, município, órgão, modalidade e valor estimado. O modo `abertas` traz só o que ainda está recebendo propostas, e o modo `publicadas` traz tudo o que foi publicado num período. Você paga apenas pelos resultados entregues. Ideal para empresas que vendem para o governo, consultorias de licitação e análises de compras públicas.

# Actor input Schema

## `modo` (type: `string`):

<b>abertas</b>: tenders currently accepting proposals, closing up to the end date.<br><b>publicadas</b>: everything published in PNCP between the start and end dates (any status).

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

Matched against the tender object (objeto). Accent- and case-insensitive. Leave empty to get everything.

## `modoPalavrasChave` (type: `string`):

How multiple keywords are combined.

## `palavrasExcluidas` (type: `array`):

Tenders whose object contains any of these are skipped (e.g. "locação", "manutenção").

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

Leave empty for the whole country.

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

Leave empty for all types.

## `dataInicial` (type: `string`):

Only for mode <b>publicadas</b>. Default: yesterday. Ranges longer than 365 days are split automatically.

## `dataFinal` (type: `string`):

<b>abertas</b>: proposals closing up to this date (default: today + 30 days).<br><b>publicadas</b>: published up to this date (default: today).

## `valorMinimo` (type: `integer`):

Skips tenders with a lower or unknown estimated value.

## `valorMaximo` (type: `integer`):

Skips tenders with a higher estimated value.

## `codigoMunicipioIbge` (type: `string`):

7-digit IBGE code, e.g. 3550308 for São Paulo.

## `cnpjOrgao` (type: `string`):

Only tenders from this public body.

## `incluirCanceladas` (type: `boolean`):

Include tenders that were revoked, annulled or suspended (revogadas, anuladas, suspensas). Off by default.

## `maxResultados` (type: `integer`):

Stops after this many tenders. You are only charged for results delivered.

## Actor input object example

```json
{
  "modo": "abertas",
  "palavrasChave": [
    "material",
    "medicamento"
  ],
  "modoPalavrasChave": "any",
  "ufs": [
    "SP"
  ],
  "incluirCanceladas": false,
  "maxResultados": 20
}
```

# Actor output Schema

## `results` (type: `string`):

All rows delivered by this run (dataset items).

## `stats` (type: `string`):

Run statistics: queries, pages scanned, results delivered and why the run stopped.

# 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": [
        "material",
        "medicamento"
    ],
    "ufs": [
        "SP"
    ],
    "maxResultados": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("dados_publicos_br/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 = {
    "palavrasChave": [
        "material",
        "medicamento",
    ],
    "ufs": ["SP"],
    "maxResultados": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("dados_publicos_br/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 '{
  "palavrasChave": [
    "material",
    "medicamento"
  ],
  "ufs": [
    "SP"
  ],
  "maxResultados": 20
}' |
apify call dados_publicos_br/pncp-licitacoes --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,dados_publicos_br/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/zykhDs5PjsZucF3ba/builds/dX7AyHO0oeHk4uebv/openapi.json
