# Brazil Tenders Scraper - PNCP Public Procurement (Licitações) (`northbound-labs/brazil-pncp-tenders`) Actor

Scrape new Brazilian government tenders (licitações) from the official PNCP API: buyer, object, modality, value, dates. Filter by state, keyword.

- **URL**: https://apify.com/northbound-labs/brazil-pncp-tenders.md
- **Developed by:** [NorthBound Labs](https://apify.com/northbound-labs) (community)
- **Categories:** Lead generation, Business, Automation
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 95.5% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.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 Tenders Scraper - PNCP Public Procurement (Licitações)

Get **new Brazilian government tenders (licitações) from PNCP**, the official national public procurement portal: agency, object, modality, estimated value and proposal deadlines. Filter by state (UF), modality, keyword and value, and get only new tenders on every scheduled run.

- **Official source:** the official PNCP consulta API.
- **No login, no browser, no personal data.**
- **Monitoring built in:** turn on *Only new since last run* and schedule it for a daily alert feed.
- **Export** to JSON, CSV, Excel, HTML or straight into Google Sheets, Slack, Zapier, Make, n8n or your own code via the Apify API.

### What can you use it for?

- **Companies bidding on Brazilian government tenders:** a daily list of new pregões and dispensas in your states.
- **Bid-alert services:** alerts by UF, modality and keyword.
- **Procurement market research** in Brazil.

### How to use it

1. Click **Try for free** (or **Start**). The input is pre-filled, so the first run works with one click and finishes in seconds.
2. Adjust the filters in the **Input** tab (see the table below).
3. Click **Start** and open the **Output** tab. The *Overview* view shows the key columns; *All fields* shows everything.
4. Download the results (JSON, CSV, Excel...) or connect them to your tools (see *Scheduling and integrations*).

### Input

| Field | Name | What it does |
|---|---|---|
| `daysBack` | Days back | How many days back to look. Default 1. On scheduled runs with 'Only new since last run' on, a small window (1-3 days) is enough. |
| `keywords` | Keywords | Match any keyword (case-insensitive). Empty = all. |
| `modalities` | Modalities | PNCP modality codes (6 = Pregão Eletrônico, 8 = Dispensa, 4 = Concorrência Eletrônica, ...). Default 6 and 8. |
| `states` | States (UF) | e.g. SP, RJ. Empty = all. |
| `minValue` | Minimum estimated value (BRL) | 0 = no filter. |
| `maxItems` | Max results | Stop after this many results. You pay per result ($2 per 1,000), so this caps your cost: 100 results = $0.20. |
| `onlyNew` | Only new since last run | Skip records already returned by earlier runs of this Actor in your Apify account, so each run outputs only new ones. Turn on for scheduled daily alerts; leave off for a one-off full export. |

Example input:

```json
{
  "daysBack": 1,
  "keywords": [
    "software"
  ],
  "maxItems": 20,
  "onlyNew": true
}
```

### Output

Each result is one record with these fields:

| Field | Description |
|---|---|
| `numeroControlePNCP` | PNCP control number. |
| `objeto` | What is being procured (objeto). |
| `orgaoNome` | Buying agency (órgão). |
| `orgaoCnpj` | CNPJ of the buying agency. |
| `esfera` | F = federal, E = state, M = municipal. |
| `poder` | E = executive, L = legislative, J = judiciary. |
| `unidadeNome` | Buying unit. |
| `uf` | State (UF). |
| `municipio` | Municipality. |
| `codigoIbge` | IBGE municipality code. |
| `modalidadeId` | PNCP modality code. |
| `modalidade` | e.g. Pregão - Eletrônico, Dispensa. |
| `modoDisputa` | Bidding mode. |
| `situacao` | Notice status on PNCP. |
| `srp` | Price registration system (ata de registro de preços). |
| `processo` | Administrative process number. |
| `numeroCompra` | Purchase number. |
| `valorTotalEstimado` | Total estimated value. |
| `valorTotalHomologado` | Total homologated value, when available. |
| `dataPublicacao` | Publication date on PNCP. |
| `dataAberturaProposta` | Proposal opening date. |
| `dataEncerramentoProposta` | Proposal deadline. |
| `linkSistemaOrigem` | Link to the originating purchasing system. |
| `noticeUrl` | Notice page on pncp.gov.br. |

Sample result (from a real run, long values shortened):

```json
{
  "numeroControlePNCP": "00394452000103-1-021979/2026",
  "objeto": "Aquisição de combustíveis (Óleo Diesel S-10 e Gasolina Comum), nos termos da tabela abaixo, conforme\ncondições e exigências estabelecidas neste instrumento.",
  "orgaoNome": "COMANDO DO EXERCITO",
  "orgaoCnpj": "00394452000103",
  "esfera": "F",
  "poder": "E",
  "unidadeNome": "6 BATALHAO DE ENGENHARIA DE CONSTRUCAO/RR",
  "uf": "RR",
  "municipio": "Boa Vista",
  "codigoIbge": "1400100",
  "modalidadeId": 6,
  "modalidade": "Pregão - Eletrônico",
  "modoDisputa": "Aberto-Fechado",
  "situacao": "Divulgada no PNCP",
  "srp": true,
  "processo": "64044.003790/2026-07",
  "numeroCompra": "70",
  "valorTotalEstimado": 4336600,
  "valorTotalHomologado": null,
  "dataPublicacao": "2026-10-13T07:00:01",
  "dataAberturaProposta": "2026-10-13T08:00:00",
  "dataEncerramentoProposta": "2026-10-23T09:30:00",
  "linkSistemaOrigem": "https://cnetmobile.estaleiro.serpro.gov.br/comprasnet-web/public/compras/acompanhamento-compra?compra=16035305000702026",
  "noticeUrl": "https://pncp.gov.br/app/editais/00394452000103/2026/21979"
}
```

### Scheduling and integrations

- **Daily alerts:** in Apify Console, open **Schedules**, create a schedule (for example every day at 08:00) for this Actor with `onlyNew: true`. Each run then returns only records that are new since the previous run.
- **Webhooks:** add a webhook on *Run succeeded* to call your own endpoint, Slack or a workflow tool when new data is ready.
- **Zapier, Make, n8n, Google Sheets, Slack, email:** use Apify's ready-made integrations on the Actor's **Integrations** tab to push each run's dataset wherever you work.
- **API:** run it and get results in one call:

```bash
curl -X POST "https://api.apify.com/v2/acts/northbound-labs~brazil-pncp-tenders/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"daysBack": 1, "keywords": ["software"], "maxItems": 20, "onlyNew": true}'
```

Or with the Apify Python client: `ApifyClient(token).actor("northbound-labs/brazil-pncp-tenders").call(run_input={...})`.

### Pricing

This Actor uses **pay-per-event** pricing, so you pay only for what you get:

- **$2.00 per 1,000 results** ($0.002 per result).
- An Actor start event of $0.00005 per run at the default 512 MB memory.

| You get | Cost |
|---|---|
| 20 results (the pre-filled test run) | about $0.04 |
| 100 results | about $0.20 |
| 1,000 results | about $2.00 |
| A daily schedule returning ~50 new results a day for 30 days | about $3.00 a month |

Set **Max results** to cap the cost of any run. Apify's free plan includes monthly credit you can use to try it.

### FAQ

**Which modalities are included by default?**
6 (Pregão Eletrônico) and 8 (Dispensa). Add others, e.g. 4 (Concorrência Eletrônica), in **Modalities**.

**Are field names in Portuguese?**
Yes. Fields keep PNCP's original names (objeto, orgaoNome, uf...) so they match PNCP documentation.

**Do I need an account on the source site?**
No. The Actor reads public, logged-out data from PNCP (Portal Nacional de Contratações Públicas) through its official interface.

**Does it return personal data?**
No. Output is limited to organisation-level and record-level fields.

**How fresh is the data?**
As fresh as the source: every run queries it live.

**Is it legal to use this data?**
The data comes from an official public source. You are responsible for using it in line with the source's terms and the laws that apply to you.

**Something broken, or a field you need?**
Open an issue on the **Issues** tab. We read every issue and reply as fast as we can.

# Actor input Schema

## `daysBack` (type: `integer`):

How many days back to look. Default 1. On scheduled runs with 'Only new since last run' on, a small window (1-3 days) is enough.

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

Match any keyword (case-insensitive). Empty = all.

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

PNCP modality codes (6 = Pregão Eletrônico, 8 = Dispensa, 4 = Concorrência Eletrônica, ...). Default 6 and 8.

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

e.g. SP, RJ. Empty = all.

## `minValue` (type: `integer`):

0 = no filter.

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

Stop after this many results. You pay per result ($2 per 1,000), so this caps your cost: 100 results = $0.20.

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

Skip records already returned by earlier runs of this Actor in your Apify account, so each run outputs only new ones. Turn on for scheduled daily alerts; leave off for a one-off full export.

## Actor input object example

```json
{
  "daysBack": 1,
  "keywords": [
    "software"
  ],
  "modalities": [
    "6",
    "8"
  ],
  "minValue": 0,
  "maxItems": 20,
  "onlyNew": false
}
```

# Actor output Schema

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

All records returned by the run (default dataset, 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 = {
    "daysBack": 1,
    "keywords": [
        "software"
    ],
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("northbound-labs/brazil-pncp-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 = {
    "daysBack": 1,
    "keywords": ["software"],
    "maxItems": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("northbound-labs/brazil-pncp-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 '{
  "daysBack": 1,
  "keywords": [
    "software"
  ],
  "maxItems": 20
}' |
apify call northbound-labs/brazil-pncp-tenders --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,northbound-labs/brazil-pncp-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/8pSu1GMYZ4E4bW6bj/builds/lx9KUdNbCOyPkYwzo/openapi.json
