# Brazil Open Tenders API (Licitações Abertas) (`br_data_hub/br-pncp-open-tenders`) Actor

Find Brazilian government tenders that are open for proposals right now, from PNCP, the official national procurement portal. Filter by state, city, type, agency, keywords and estimated value.

- **URL**: https://apify.com/br_data_hub/br-pncp-open-tenders.md
- **Developed by:** [br_data_hub](https://apify.com/br_data_hub) (community)
- **Categories:** AI, Lead generation, Business
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.40 / 1,000 open tenders

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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 Open Tenders API (Licitações Abertas)

Find **Brazilian government tenders that are open for proposals right now**, from **PNCP** (Portal Nacional de Contratações Públicas), the official national procurement portal where federal, state and municipal agencies must publish their tenders under Law 14.133/2021.

Use it to find sales opportunities with the government, build a daily alert of new tenders for your product, or give an AI agent a live view of Brazilian public procurement.

> 🇧🇷 **Licitações abertas do PNCP via API:** encontre editais com propostas abertas agora, por UF, modalidade (pregão eletrônico, concorrência, dispensa...), município, órgão, valor estimado e palavras no objeto, com prazo de encerramento e link do edital. Ideal para alertas diários de oportunidades. Mais detalhes em português no fim da página.

### What can you do with it?

- 💼 **Find sales opportunities:** every open tender for your product in the states you serve, with the closing date.
- 🔔 **Daily alerts:** schedule a run every morning and get only new tenders by e-mail, Slack or webhook.
- 🗺️ **Map demand:** see which agencies and cities buy what you sell, and their estimated budgets.
- 🤖 **AI agents:** let an agent search live Brazilian public tenders and draft bid summaries.

### What you get per tender

- Buyer agency (CNPJ, name, federal/state/municipal), unit, city and state
- Tender object (what the agency wants to buy) and additional information
- Type (pregão, concorrência, dispensa, credenciamento...), dispute mode and legal basis
- Estimated total value in BRL (when the agency publishes it)
- Proposal opening and **closing date and time** (Brasília time)
- Link to the tender page on PNCP and to the agency's own system

### How to find open tenders in 3 steps

1. Click **Try for free** and pick the **states** (empty means the whole country) and tender **types**.
2. Add **keywords** for your product (accents and case are ignored) and, if you want, a minimum estimated value.
3. Click **Start**. Tenders closing soonest come with the deadline in Brasília time; export them or schedule a daily run.

### Input

| Field | Description |
|---|---|
| `states` | Buyer states (UF), e.g. `["SP", "MG"]`. Filtered by PNCP. Default `["DF"]`; empty = whole country. |
| `modalities` | Tender types, e.g. electronic reverse auction (pregão eletrônico). Filtered by PNCP. Empty = all. |
| `closingBefore` | Only tenders whose proposals close by this date (YYYY-MM-DD). Empty = 30 days from today. |
| `keywords` | Words in the tender object, accents and case ignored (any word matches). |
| `buyerCnpj` | Only one agency. Filtered by PNCP. |
| `cityIbgeCode` | Only one city (7-digit IBGE code). Filtered by PNCP. |
| `minEstimatedValueBrl` | Minimum estimated value. Tenders without an estimate are skipped when set. |
| `maxItems` | Stop after this many tenders (default 50). |

#### Speed

Brazil has about 25,000 tenders open at any time. State, type, agency and city are filtered by PNCP itself, so use them. Keywords and value are checked by the Actor while reading the results. PNCP returns 50 tenders per page and the first page of a query can take up to a minute; the next pages take about 2 seconds. Example: São Paulo + pregão eletrônico + keyword "software" finished in about 30 seconds.

### Output example

```json
{
  "pncpId": "45781176000166-1-001353/2025",
  "pncpUrl": "https://pncp.gov.br/app/editais/45781176000166/2025/1353",
  "modality": "Pregão - Eletrônico",
  "object": "Contratação de empresa especializada para prestação de serviço de locação de sistema web...",
  "estimatedValueBrl": 4330766.67,
  "proposalsCloseAt": "2026-11-05T07:30:00",
  "buyerName": "MUNICIPIO DE AMERICANA",
  "city": "Americana",
  "state": "SP"
}
```

### How much does it cost?

You pay only for open tenders that match your filters. Reading the PNCP pages and filtering is free.

This Actor does one thing: open tenders. Signed contracts are in **Brazil Public Contracts (PNCP)** and company data in **Brazil CNPJ Lookup**, from the same publisher.

**$0.002 per open tender** (`tender` event, pay per event). Charged once per open tender returned that matches your filters. Scanning is free.

| You get | Free tier | Bronze tier (10% off) | Gold tier (30% off) |
|---|---|---|---|
| 100 open tenders | $0.20 | $0.18 | $0.14 |
| 1,000 open tenders | $2.00 | $1.80 | $1.40 |
| 10,000 open tenders | $20.00 | $18.00 | $14.00 |

Discounts follow your Apify subscription tier: Bronze 10%, Silver 20%, Gold and above 30%. No subscription to this Actor and no charge for platform usage: you pay only for results.
The Apify Free plan includes $5 of monthly credit, enough for about **2,500 open tenders** at the list price.
You can cap the cost of any run with **Maximum cost per run**; the Actor stops when it is reached.

### Data source and limits

Official public API of PNCP (`pncp.gov.br/api/consulta`). Data follows what each agency publishes; some agencies publish late or without an estimated value. Tenders whose deadline already passed are removed from the results. Always confirm the rules in the official notice before bidding.

### More questions

#### Does it return only tenders that are still open?

Yes. It reads PNCP's list of tenders receiving proposals and also drops any tender whose closing date and time (`proposalsCloseAt`, Brasília time) has already passed when the run reads it, because PNCP sometimes still lists them.

#### Which tender types can I filter?

The 13 PNCP modalities: electronic reverse auction (pregão eletrônico), in-person reverse auction, electronic and in-person competition (concorrência), competitive dialogue, contest, auctions (leilão), direct purchase by exemption (dispensa), unenforceability (inexigibilidade), expression of interest, pre-qualification and accreditation (credenciamento). Pick several at once; each state × type pair is one PNCP query, and duplicates are removed.

#### How do I get alerts for my product every day?

Save an input with your states, types and keywords as a **task** and add an Apify **schedule** (for example every morning). Each run returns every tender open at that moment, so to see only the new ones, sort or filter by `publishedAt` in your sheet or automation, or connect a webhook / integration (Slack, e-mail, Google Sheets).

#### Where do keywords look?

In the tender object and in the additional information, ignoring accents and case. A tender is kept when **any** keyword appears as part of that text (`software` also finds `softwares`).

#### Why do some tenders have no estimated value?

Agencies may keep the estimate confidential (Law 14.133/2021 allows it) or publish it later. Those come with `estimatedValueBrl: null`; if you set `minEstimatedValueBrl`, they are skipped.

#### Where do I download the notice (edital)?

`pncpUrl` opens the tender page on PNCP, where the notice and attachments are. `sourceSystemUrl` and `electronicProcessUrl` point to the agency's own system (Compras.gov.br, BLL, Licitanet and others) when the agency provides them. Always confirm dates and rules in the notice before bidding.

#### Why does the first page take so long?

PNCP takes up to a minute to answer the first page of each new query; the next pages take about 2 seconds. Filters sent to PNCP (state, type, agency and city IBGE code) make each query smaller, so use them instead of scanning the whole country.

#### How do I filter by city?

Use `cityIbgeCode` with the 7-digit IBGE code (São Paulo is `3550308`). Our **Brazil Municipalities & IBGE Codes** Actor finds the code from a city name.

### Use it via API

Run it from any language and get the results as JSON. Replace `<YOUR_API_TOKEN>` with your [Apify API token](https://console.apify.com/settings/integrations).

```bash
curl -X POST "https://api.apify.com/v2/acts/br_data_hub~br-pncp-open-tenders/run-sync-get-dataset-items?token=<YOUR_API_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"states": ["DF"]}'
```

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_API_TOKEN>")
run = client.actor("br_data_hub/br-pncp-open-tenders").call(run_input={'states': ['DF']})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)
```

You can also schedule runs, send results to webhooks, or connect the Actor to Make, Zapier, n8n, Google Sheets and other [integrations](https://docs.apify.com/platform/integrations).

### Use it with AI agents (MCP)

This Actor is ready for AI agents: typed input and output schemas, pay-per-event pricing, limited permissions and short runs.

- **Apify MCP server:** add `https://mcp.apify.com/?tools=br_data_hub/br-pncp-open-tenders` to Claude, ChatGPT, Cursor, VS Code or any MCP client, and the agent can call this Actor as a tool.
- **Agent frameworks:** call it from LangChain, LlamaIndex, CrewAI or the OpenAI Agents SDK through the Apify integrations, or with the API call above.
- Results come as structured JSON with stable field names, documented in the **Output** tab.

### FAQ

#### Where does the data come from?

Official public API of PNCP (`pncp.gov.br/api/consulta`). Data follows what each agency publishes; some agencies publish late or without an estimated value. Tenders whose deadline already passed are removed from the results. Always confirm the rules in the official notice before bidding.

#### How much does it cost?

$0.002 per open tender. Discounts follow your Apify subscription tier: Bronze 10%, Silver 20%, Gold and above 30%. See **How much does it cost?** above for examples.

#### Do I pay for errors or empty results?

No. Charged once per open tender returned that matches your filters. Scanning is free.

#### Can I run it on a schedule or connect it to other tools?

Yes. Use Apify schedules to run it daily or weekly, webhooks to get notified, and integrations such as Make, Zapier, n8n and Google Sheets. Everything also works through the API.

#### Can AI agents use it?

Yes. It works as a tool in the Apify MCP server and in agent frameworks, and AI agents can pay per event. See **Use it with AI agents (MCP)**.

#### Is it legal to use this data?

The Actor reads only public, official sources and keeps personal data masked as the source publishes it. You are responsible for how you use the data, including LGPD compliance.

#### I found a bug or need a feature. What should I do?

Open an issue in the **Issues** tab. We answer within 14 days, usually much sooner.

### More Actors from BR Data Hub

| Actor | What it does |
|---|---|
| [Brazil CNPJ Lookup API (Consulta CNPJ)](https://apify.com/br_data_hub/br-cnpj-lookup) | Look up Brazilian companies by CNPJ: registration status, partners (masked CPF), activities, tax regime and sc |
| [Brazil Public Contracts API (PNCP Contratos)](https://apify.com/br_data_hub/br-pncp-contracts) | Get Brazilian government contracts from PNCP, the official national procurement portal: buyer, supplier, objec |
| [Brazil Municipalities & IBGE Codes (Municípios)](https://apify.com/br_data_hub/br-ibge-localities) | List Brazilian municipalities, search them by name (accents and typos tolerated) or resolve IBGE codes |
| [Brazil Holidays & Business Days (Feriados)](https://apify.com/br_data_hub/br-holidays) | Brazilian national and state holidays for all 27 states, with the law behind each one |
| [Brazil Banks & Pix Directory (Bancos e ISPB)](https://apify.com/br_data_hub/br-bank-pix-directory) | Every Brazilian bank and payment institution from official Banco Central lists: ISPB, COMPE bank code, short a |
| [Brazil Boleto Validator & Parser (Boleto)](https://apify.com/br_data_hub/br-boleto-parser) | Validate Brazilian boletos in bulk (digitable line or barcode, bank and utility/tax slips): check digits per f |

See all our Actors at [apify.com/br_data_hub](https://apify.com/br_data_hub).

### Usar em português

**Licitações abertas do PNCP via API.** O Actor busca na API oficial do Portal Nacional de Contratações Públicas (PNCP) as licitações com recebimento de propostas aberto agora, de órgãos federais, estaduais e municipais, e devolve objeto, modalidade, valor estimado, prazo de encerramento (horário de Brasília) e os links do edital.

**Para que serve:** achar oportunidades de venda para o governo, montar alertas diários de editais do seu produto, mapear quais órgãos e cidades compram o que você vende e dar a um agente de IA acesso às licitações em tempo real.

**Como usar em 3 passos:**

1. Clique em **Try for free** e escolha as **UFs** (vazio = Brasil inteiro) e as **modalidades** (pregão eletrônico, concorrência, dispensa, credenciamento...).
2. Acrescente **palavras-chave** do seu produto (acentos e maiúsculas são ignorados) e, se quiser, um **valor estimado mínimo**, um **órgão** (CNPJ) ou um **município** (código IBGE).
3. Clique em **Start**, baixe na aba **Output** ou agende uma execução diária com envio por e-mail, Slack ou webhook.

**Exemplo de entrada:**

```json
{ "states": ["SP", "MG"], "modalities": ["electronic-reverse-auction"], "keywords": ["software", "licença"], "minEstimatedValueBrl": 50000, "maxItems": 50 }
```

**Campos principais:** `pncpId`, `pncpUrl` (página do edital no PNCP), `sourceSystemUrl` e `electronicProcessUrl` (sistema do órgão), `tenderNumber`, `processNumber`, `modality`, `disputeMode`, `legalBasis`, `isPriceRegistration` (registro de preços), `object`, `additionalInfo`, `estimatedValueBrl`, `status`, `proposalsOpenAt`, `proposalsCloseAt` (prazo final), `buyerCnpj`, `buyerName`, `buyerSphere`, `buyerUnit`, `city`, `cityIbgeCode`, `state`, `publishedAt`.

**Bom saber:** licitações com prazo já vencido são descartadas; sem `closingBefore`, o Actor busca as que encerram nos próximos 30 dias. Órgãos podem manter o valor estimado em sigilo (vem `null`). Confira sempre as regras no edital antes de participar.

**O que é grátis:** você paga só pelas licitações entregues. Consulta sem resultado, erro de entrada ou falha do PNCP não geram cobrança.

**Quanto custa:** $0.002 por resultado (`tender`); 1.000 resultados saem por $2.00. Desconto pelo nível da assinatura Apify: Bronze 10%, Silver 20%, Gold ou acima 30%. Erros e consultas sem resultado não são cobrados. Use também pela API ou por agentes de IA no servidor MCP da Apify (`https://mcp.apify.com/?tools=br_data_hub/br-pncp-open-tenders`).

# Actor input Schema

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

Enter buyer states, e.g. SP, MG, DF, one per line. PNCP filters them itself. Leave empty for the whole country (slower).

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

Pick the procurement modalities to return, e.g. Pregão eletrônico. Leave empty for all.

## `closingBefore` (type: `string`):

Type a date as YYYY-MM-DD to get only tenders whose proposal deadline is on or before it. Leave empty for 30 days from today.

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

Enter words to look for in the tender object, one per line, e.g. software or ambulância. A tender matching any word is kept; accents and case are ignored.

## `buyerCnpj` (type: `string`):

Type a government agency CNPJ to get only its tenders.

## `cityIbgeCode` (type: `string`):

Type a 7-digit IBGE city code to get only tenders of agencies in that city, e.g. 3550308 for São Paulo.

## `minEstimatedValueBrl` (type: `integer`):

Set a minimum estimated value in reais, e.g. 50000. Tenders without an estimate are skipped when this is set.

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

Set the maximum number of matching tenders to return, e.g. 50.

## Actor input object example

```json
{
  "states": [
    "DF"
  ],
  "modalities": [],
  "closingBefore": "",
  "keywords": [],
  "buyerCnpj": "",
  "cityIbgeCode": "",
  "maxItems": 50
}
```

# Actor output Schema

## `dataset` (type: `string`):

Dataset with all results

# 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 = {
    "states": [
        "DF"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("br_data_hub/br-pncp-open-tenders").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 = { "states": ["DF"] }

# Run the Actor and wait for it to finish
run = client.actor("br_data_hub/br-pncp-open-tenders").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 '{
  "states": [
    "DF"
  ]
}' |
apify call br_data_hub/br-pncp-open-tenders --silent --output-dataset

```

## MCP server setup

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

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/mNm0NaxlN1W2gT2P7/builds/Se4N4hWmfynSY5Znh/openapi.json
