# Brazil Public Tenders Feed: PNCP Licitações & Pregões (`asunoki/brazil-public-tenders-feed`) Actor

New Brazilian public tenders (pregões, concorrências, dispensas com disputa) from the official PNCP API. Filter by state, modality, keyword, value, government level, buyer. Schedule it daily and get only notices you have not seen. No API key.

- **URL**: https://apify.com/asunoki/brazil-public-tenders-feed.md
- **Developed by:** [Seisuke Nagahara](https://apify.com/asunoki) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 new tender notices

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 Feed: PNCP Licitações & Pregões

**New Brazilian public tenders (licitações, pregões eletrônicos, concorrências, dispensas com disputa) from the official PNCP API, as a daily feed.**
Filter by state (UF), modality, keyword, estimated value, government level and buyer. Schedule it daily and you get only the notices you
have not seen yet, and by default only those still open for proposals.
Price: **$0.003 per notice stored** (pay per event). Notices you filter out are free. No API key, no login.

*Em português: novas licitações e editais do Portal Nacional de Contratações Públicas (PNCP), filtrados por UF, modalidade, palavra-chave
e valor, só as que ainda recebem propostas e só as que você ainda não viu.*

### Who it is for

- **Suppliers selling to government** (empresas que vendem para o governo): a daily list of open pregões in your states and product
  keywords, with the deadline, estimated value, buyer and the platform where proposals are sent.
- **Bid consultants** (assessorias de licitação): one schedule per client, each with its own filters and its own "already seen" memory.
- **Market intelligence**: which municipalities and agencies are buying what, at what estimated value, through which platform.
- **Automation**: send new rows to Slack, e-mail, a CRM or a spreadsheet with an Apify integration, n8n, Make or Zapier.

### What you get (one row per notice)

| Field | Example |
|---|---|
| `object` (shortened) | "AQUISIÇÕES FUTURAS E EVENTUAIS DE NANOCHIPS, ANILHAS, ALICATES E LEITORES DE MICROCHIP" |
| `modality` / `modalityEn` | Pregão - Eletrônico / Reverse auction (electronic pregão) |
| `buyerName`, `buyerCnpj`, `unitName` | UNIVERSIDADE ESTADUAL PAULISTA JULIO DE MESQUITA FILHO, 48031918000124, ESP-UNESP-FACUL MEDICINA VETERIN.-C.ARACATUBA |
| `municipality`, `municipalityIbge`, `state` | Araçatuba, 3502804, SP |
| `governmentLevel`, `branch` | state, executive |
| `estimatedValueBrl`, `priceRegistration` | 431836.45, true (ata de registro de preços) |
| `proposalsOpenAt`, `proposalsCloseAt`, `openForProposals` | 2026-11-23T08:00:00-03:00, 2026-12-04T08:00:00-03:00, true |
| `publishingSystem`, `sourceSystemUrl` | Compras.gov.br (other notices: BLL Compras, Licitanet, Licitar Digital, ...), link to the notice there |
| `legalBasis` | Lei 14.133/2021, Art. 28, I |
| `noticeId`, `noticeUrl`, `pncpApiUrl` | 48031918000124-1-003490/2026, https://pncp.gov.br/app/editais/48031918000124/2026/3490 |

The full list (49 fields) is in the dataset schema. Each run also writes `report.csv` (same rows) and `OUTPUT` (run statistics),
and adds one free `summary` row at the end of the dataset.

### How to use it

1. Pick **states** (recommended: it makes runs much faster and cheaper), **keywords** in Portuguese, and optionally a **value range**,
   **government level** or **buyer name**. Modalities default to pregão eletrônico + concorrência eletrônica.
2. Run it once to see today's and yesterday's notices.
3. **Schedule it daily** with `days` = 2 (or weekly with `days` = 8). With **Only new** on, each run returns only notices not returned
   before for the same filters.

Example input, IT notices in São Paulo and Minas Gerais worth at least R$ 50,000:

```json
{ "states": ["SP", "MG"], "keywords": ["software", "sistema de gestão", "licença de uso"], "minValueBrl": 50000, "days": 2 }
```

Example input, every open pregão and concorrência of the federal government, plus dispensas with a proposal window:

```json
{ "modalities": ["pregao-eletronico", "concorrencia-eletronica", "dispensa"], "governmentLevels": ["federal"], "days": 2, "maxItems": 1000 }
```

### Cost

You pay per notice stored ($0.003), plus Apify's small start fee. A daily niche feed (one or two states + keywords) typically
returns 0 to 10 new notices, i.e. **a few cents a day**. All open pregões and concorrências of São Paulo (~450 per working day) cost about
$1.40 a day (raise `maxItems` above its default of 200 to store them all). `maxItems` (default 200) and the run's **max total charge** cap the cost; a run stops storing before it would go over your
limit, and notices it did not store stay new for the next run.

Run time: about 35 s for one state, 2.5 to 5 minutes for all of Brazil (the API returns at most 50 notices per page). Set the run
timeout to at least 30 minutes for all-Brazil feeds with several modalities.

### Why this one

- **The official source**: PNCP is where every Brazilian public body must publish its tenders under Lei 14.133/2021. Read through its
  public consultation API, not by scraping web pages.
- **Built to keep working when scheduled**: retries with back-off and `Retry-After`, per-request and per-run time limits, and a loud
  failure if the API format changes or ignores a filter (instead of quietly returning empty or wrong rows). If one modality fails,
  notices from the others are still delivered and the run reports the error.
- **Only what you can still bid on**: by default notices whose proposal deadline has passed (PNCP re-publishes some old notices) and
  suspended, revoked or annulled ones are dropped.
- **Portuguese-aware filters**: keywords ignore case and accents ("licitacao" = "LICITAÇÃO"); English labels for modalities, levels and status.
- **No contact data**: e-mail addresses, phone numbers and CPF numbers written in the text are removed.

### Honest limits

- Only what buyers publish on PNCP. Some publish a value of 0 or no value (`includeUnknownValue` decides whether those are kept when
  you filter by value). Tender documents (edital PDFs) and item lists are not downloaded: open `noticeUrl` or `sourceSystemUrl`.
- Award results, winners and contracts are not included (this is a feed of calls for tender).
- Keywords are matched on the object and additional information only, not on item descriptions or documents.
- The window is by **publication date in Brasília time**. If your schedule interval is longer than `days`, notices published in between
  are missed (the run warns about such a gap). A notice republished on a later day can appear again only if its id changed (rare).
- Updates after publication (new deadline, suspension) are not tracked: a notice is output once, as it was when first seen.
- `openForProposals` is evaluated at run time; deadlines can be changed by the buyer later.
- Text can still contain a person's name (e.g. an artist in an inexigibilidade, not selected by default); only e-mails, phones and
  CPF numbers are removed.
- `governmentLevel` and `branch` are null for state companies, consortia and Sistema S, which PNCP codes as "N".
- Not affiliated with or endorsed by PNCP, Serpro or the Brazilian government.

### Data source and reuse

Portal Nacional de Contratações Públicas (https://pncp.gov.br), consultation API. PNCP publishes in open-data format by law
(Lei 14.133/2021 art. 174 §4); federal open data and active-transparency information are "de livre utilização pelos Poderes Públicos e
pela sociedade" (Decreto 8.777/2016 art. 4), with credit to the source. Every row carries the attribution in `license`.
Details: `docs/DATA_SOURCE.md`.

### Errors

| Code | Meaning |
|---|---|
| `input_invalid` | An input value is not valid; the message says which. Nothing is charged. |
| `source_unavailable` / `source_timeout` | PNCP did not answer after retries. Notices from the other queries are still stored. |
| `source_auth` | PNCP refused the request (HTTP 401/403). Run fails. |
| `schema_changed` | The API response format changed or a filter was ignored. Run fails loudly instead of returning wrong rows. |
| `pricing_misconfigured` | Pay-per-event setup is wrong (owner side). Run stops before reading anything. |

# Actor input Schema

## `modalities` (type: `array`):

Leave empty for pregão eletrônico + concorrência eletrônica. Each modality is a separate set of API requests, so fewer modalities run faster.

## `states` (type: `array`):

State of the buying unit. Filtered by the API itself, so a state filter makes runs much faster. Leave empty for all of Brazil.

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

Only notices whose object or additional information contains at least one of these. Case and accents are ignored: "licitacao" matches "LICITAÇÃO". Use Portuguese terms, e.g. software, merenda escolar, pavimentação, uniformes.

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

Drop notices whose object or additional information contains any of these.

## `openOnly` (type: `boolean`):

Keep only notices with a proposal deadline in the future and status "Divulgada no PNCP" (not suspended, revoked or annulled). Turn off to also get direct-contracting acts and republished notices whose deadline has passed.

## `minValueBrl` (type: `integer`):

valorTotalEstimado of the notice.

## `maxValueBrl` (type: `integer`):

Leave empty for no maximum.

## `includeUnknownValue` (type: `boolean`):

Some notices publish 0 or a confidential budget. Turn off to drop them when a value filter is set.

## `governmentLevels` (type: `array`):

Leave empty for all. About 4 in 5 notices are municipal.

## `buyerNameContains` (type: `array`):

Matched on the buying organisation and unit names, ignoring case and accents, e.g. prefeitura de campinas, universidade federal, exército.

## `municipalityIbgeCodes` (type: `array`):

7-digit IBGE codes of the buying unit's municipality, e.g. 3550308 (São Paulo), 3304557 (Rio de Janeiro). Combine with the state filter for speed.

## `days` (type: `integer`):

Publication dates read on every run: today and the days before it (Brasília time). For a daily schedule use 2, for a weekly schedule 8, so nothing falls between runs.

## `onlyNew` (type: `boolean`):

Remembered per filter set in a named key-value store. Turn off to get the whole window every time.

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

You are charged per notice stored, so this caps the cost of a run. Notices cut by the limit stay new for the next run.

## `descriptionMaxChars` (type: `integer`):

The object and additional information are shortened to this length (keywords are matched on the full text). 0 leaves both out.

## `stateStoreName` (type: `string`):

Leave empty to use the default.

## Actor input object example

```json
{
  "modalities": [
    "pregao-eletronico",
    "concorrencia-eletronica"
  ],
  "openOnly": true,
  "includeUnknownValue": true,
  "days": 2,
  "onlyNew": true,
  "maxItems": 200,
  "descriptionMaxChars": 1000
}
```

# Actor output Schema

## `notices` (type: `string`):

No description

## `reportCsv` (type: `string`):

No description

## `runSummary` (type: `string`):

No description

# 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 = {
    "modalities": [
        "pregao-eletronico",
        "concorrencia-eletronica"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("asunoki/brazil-public-tenders-feed").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 = { "modalities": [
        "pregao-eletronico",
        "concorrencia-eletronica",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("asunoki/brazil-public-tenders-feed").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 '{
  "modalities": [
    "pregao-eletronico",
    "concorrencia-eletronica"
  ]
}' |
apify call asunoki/brazil-public-tenders-feed --silent --output-dataset

```

## MCP server setup

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

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/MrO6actJ1C4aIJaEL/builds/Q1KZ6hk1cyT8ifFO0/openapi.json
