# Brazil Tenders Scraper: PNCP Licitações & Editais (`sidehustler/brazil-tenders-feed`) Actor

Brazil public tenders API: new licitações, pregões, dispensas and concorrências from the official PNCP API, federal, state and municipal. Filter by UF, city, modality, buyer CNPJ, keyword, value, deadline. Edital documents, only-new monitoring. JSON, CSV or Excel. Sem login.

- **URL**: https://apify.com/sidehustler/brazil-tenders-feed.md
- **Developed by:** [Side Hustler](https://apify.com/sidehustler) (community)
- **Categories:** Business, Lead generation, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% 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 Licitações & Editais

Get **new Brazilian public tenders — licitações, pregões eletrônicos, dispensas, concorrências, credenciamentos and more — from federal, state and municipal governments** as clean structured data from the **official PNCP (Portal Nacional de Contratações Públicas) API**. Filter by **state (UF), city, modality, government level, buyer CNPJ, keyword, estimated value and proposal deadline**, add **edital documents**, schedule it in **"only new since last run"** mode, and export to JSON, CSV, Excel, Google Sheets, Slack, Make, Zapier, n8n or your CRM.

*Em português:* receba novas **licitações e editais publicados no PNCP** de todo o Brasil, com filtros por UF, município, modalidade, esfera, CNPJ do órgão, palavras-chave, valor estimado e prazo de propostas, e modo de monitoramento "somente novos".

No login, no scraping, no proxies — only the official public API.

### Quick start (60 seconds)

Click **Try for free** then **Start** with the prefilled input. You get up to 50 Brazilian tenders published in the last day. Add `states`, `keywords`, `modalities` or `buyerCnpjs` to narrow it down.

```json
{
  "mode": "published",
  "lastDays": 1,
  "maxResults": 50
}
```

### What can this PNCP scraper do?

- 🇧🇷 **All of Brazil** — every buyer that publishes to PNCP under the Lei 14.133/2021 (thousands of new processes per business day).
- 🧭 **Two modes** — **newly published** in a date window (fast, ideal for daily feeds) or **currently open for proposals**.
- 🏷️ **Modalities** — pregão eletrônico, dispensa, concorrência, credenciamento, concurso, diálogo competitivo, leilão… (inexigibilidade excluded by default).
- 📍 **Location** — states (UF), municipalities (name or IBGE code), government level (federal/state/municipal).
- 🔎 **Keywords and exclusions** — accent-insensitive (`licitacao` matches `licitação`).
- 💰 **Estimated value range** in BRL.
- ⏰ **Deadlines** — only open, or only **closing within N days**; deadlines carry the correct state time-zone offset.
- 📎 **Edital documents** — optional list of published files with download links.
- 🔁 **Monitoring mode** — `onlyNew: true` delivers only processes you haven't received yet.
- 🛡️ **Built for a flaky API** — timeouts, retries with exponential backoff, parallel queries and a fallback query keep runs reliable when PNCP is slow.

### Why this Actor

| Feature | This Actor | Typical PNCP Actors on the Store |
|---|---|---|
| Official PNCP API, no login | ✅ | ✅ |
| Filters: state, modality, keyword | ✅ | ✅ |
| Municipality, government level, buyer CNPJ, value range (min **and** max), exclude keywords | ✅ all | Partly |
| Deadline within N days, only open | ✅ | Partly |
| Newly published **and** currently-open modes | ✅ both | Usually one |
| Edital documents with download links | ✅ optional | Rare |
| "Only new since last run" monitoring with change detection | ✅ | Some |
| Deadlines with correct time-zone offset per state | ✅ | Rare |
| Timeouts, retries, parallel queries, fallback query | ✅ | Varies |
| Same output fields as our other tender feeds (EU TED, UK, World Bank, SAM.gov, Brazil), so you can combine them | ✅ | — |
| Price per result | **$0.002** | about $0.001–$0.06 |

### Use cases

- **Suppliers and B2G sales teams** — every new pregão and dispensa in your states and segment, every morning.
- **Licitação consultancies** — monitor many clients' niches with separate `monitorId`s.
- **Market intelligence** — who buys what, at what estimated value, across municipalities.
- **International companies entering Brazil** — the same English field names as our EU, UK, US and World Bank feeds.

### Input

| Field | What it does | Example |
|---|---|---|
| `mode` | `published` (default) or `open` | `"published"` |
| `states` | UF codes | `["SP", "MG"]` |
| `modalities` | Codes or names | `["6", "dispensa"]` |
| `municipalities` | City names or IBGE codes | `["Campinas"]` |
| `spheres` | `federal`, `state`, `municipal`, `district` | `["municipal"]` |
| `buyerCnpjs` / `buyers` | Specific buyers / name contains | `["prefeitura"]` |
| `keywords` / `excludeKeywords` | Match any / drop any | `["software", "licença"]` |
| `minValue` / `maxValue` | Estimated value (BRL) | `50000` |
| `lastDays` | Published in the last N days (default 1) | `3` |
| `publishedFrom` / `publishedTo` | Exact publication date range | `"2026-11-01"` |
| `onlyOpen` / `deadlineWithinDays` | Only open / closing within N days | `true` / `10` |
| `onlyPriceRegistration` | Only SRP (registro de preços) | `false` |
| `maxResults` | Max processes saved (default 50) | `500` |
| `onlyNew`, `reportUpdates`, `monitorId` | Monitoring mode | `true`, `true`, `"ti-sp"` |
| `includeDocuments` | Add edital file links | `true` |

#### Example: IT tenders in São Paulo state, still open, over R$ 50,000

```json
{
  "states": ["SP"],
  "keywords": ["software", "licença", "sistema", "informática"],
  "minValue": 50000,
  "onlyOpen": true,
  "lastDays": 3,
  "maxResults": 300
}
```

#### Example: daily monitor of construction concorrências in the South

```json
{
  "states": ["PR", "SC", "RS"],
  "modalities": ["4", "5"],
  "keywords": ["obra", "engenharia", "pavimentação"],
  "lastDays": 2,
  "onlyNew": true,
  "monitorId": "obras-sul",
  "includeDocuments": true,
  "maxResults": 1000
}
```

### Output

```json
{
  "noticeId": "10221786000120-1-000090/2026",
  "source": "PNCP",
  "title": "Contratação de empresa de engenharia para ampliação e adequação da E.M.E.I.E.F. ...",
  "description": "Contratação de empresa de engenharia para ampliação e adequação ...",
  "status": "open",
  "statusRaw": "Divulgada no PNCP",
  "noticeType": "Concorrência - Eletrônica",
  "modalityId": 4,
  "procedureType": "Concorrência - Eletrônica / Aberto",
  "priceRegistration": false,
  "legalBasis": "Lei 14.133/2021, Art. 28, II",
  "buyerName": "MUNICIPIO DE NOVO PROGRESSO",
  "buyerUnit": "PREFEITURA MUNICIPAL DE NOVO PROGRESSO",
  "buyerCnpj": "10221786000120",
  "buyerSphere": "municipal",
  "buyerCountry": "BRA",
  "buyerCity": "Novo Progresso",
  "buyerRegion": "PA",
  "municipalityIbge": "1505031",
  "value": 5628179.71,
  "currency": "BRL",
  "valueType": "estimated",
  "publicationDate": "2026-11-12",
  "proposalsOpenFrom": "2026-11-12T00:01:00-03:00",
  "deadline": "2026-12-17T07:00:00-03:00",
  "daysUntilDeadline": 34,
  "isOpen": true,
  "url": "https://pncp.gov.br/app/editais/10221786000120/2026/90",
  "submissionUrl": "https://bnccompras.com/Process/ProcessView?param1=...",
  "documents": [{ "title": "Edital", "type": "Edital", "url": "https://pncp.gov.br/pncp-api/v1/orgaos/.../arquivos/1" }],
  "changeType": null
}
```

A `RUN_SUMMARY` record shows the mode, window, number of API requests, processes scanned and saved, and any API warnings.

### Run it from code (API)

```bash
curl -X POST "https://api.apify.com/v2/acts/sidehustler~brazil-tenders-feed/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"mode": "published", "lastDays": 1, "maxResults": 50}'
```

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("sidehustler/brazil-tenders-feed").call(run_input={"mode": "published", "lastDays": 1, "maxResults": 50})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item.get("title"), item.get("deadline"), item.get("url"))
```

### How much does it cost?

Pay only for results: **$0.002 per process saved** ($2 per 1,000) plus a tiny $0.00005 Actor-start fee. No subscription. A daily monitor delivering 100 new tenders costs about **$0.20 a day**. Platform usage is minimal (256 MB memory). Cap spending with the run's **maximum charge** setting.

### FAQ

**Is this legal? Where does the data come from?**
From PNCP's official public consultation API ([swagger](https://pncp.gov.br/api/consulta/swagger-ui/index.html)). Publishing procurement data on PNCP is mandatory and public under **Lei 14.133/2021** and the **Access to Information Law (Lei 12.527/2011)**. The Actor makes a modest number of requests with retries and back-off. Source: *Portal Nacional de Contratações Públicas (PNCP)*. This Actor is independent and not endorsed by the Brazilian Government.

**Does it collect personal data?**
It outputs procurement data about public bodies (names, CNPJs, units). It does not output the names of individual users who entered the data.

**PNCP is slow sometimes — will my run fail?**
Every request has a timeout and up to 4 retries with exponential back-off; queries run a few at a time; a failing query is skipped (and noted in `RUN_SUMMARY.warnings`) instead of failing the run; if everything fails a minimal fallback query is tried. Use **"newly published"** mode for the fastest runs. "Currently open" mode can take a few minutes without a state filter.

**Why is `classificationCodes` empty?**
PNCP classifies items, not processes; the field exists so all our feeds share one schema. Use keywords to target segments.

**What time zone are deadlines in?**
PNCP gives local times; the Actor adds the right offset for the buyer's state (UTC−3 for most, UTC−4/−5 for western states).

**Is there a PNCP API or scraper for licitações?**
PNCP publishes an official API. This Actor wraps it with retries, timeouts and a fallback query, because PNCP can be slow, and returns clean JSON/CSV with filters.

**Posso filtrar licitações por estado e palavra-chave?**
Sim. Use `states` (UF, por exemplo `SP`) e `keywords` (sem acento funciona). Também filtre por modalidade, município, CNPJ do órgão e valor.

**Can I get the edital documents?**
Yes. Turn on `includeDocuments` to add the list of published files with download links.

### Limitations

- Coverage is what buyers publish on PNCP; some municipalities still publish only on their own portals.
- "Newly published" mode uses the PNCP publication date; amendments to older processes aren't re-delivered unless they fall in the window.
- `includeDocuments` adds one request per tender and makes runs slower.

### More tender feeds by sidehustler

Our feeds use the same core output fields (`title`, `buyerName`, `buyerCountry` as ISO-3, `value`, `currency`, `deadline`, `isOpen`, `url`), so you can combine them into one global bid pipeline. The UK, World Bank, SAM.gov and Brazil feeds also share the full normalised schema (status, classification codes, documents) and the "only new since last run" monitoring mode.

| Feed | Coverage | Source |
|---|---|---|
| [EU Public Tenders Feed (TED)](https://apify.com/sidehustler/ted-eu-tenders-feed) | EU/EEA tenders above EU thresholds | Official TED API |
| [UK Public Tenders Feed](https://apify.com/sidehustler/uk-tenders-feed) | Find a Tender + Contracts Finder | Official OCDS APIs |
| [World Bank Procurement Notices Feed](https://apify.com/sidehustler/worldbank-tenders-feed) | World Bank-financed tenders in 100+ countries | Official World Bank API |
| [US Federal Contract Opportunities Feed (SAM.gov)](https://apify.com/sidehustler/sam-gov-tenders-feed) | US federal opportunities | Official SAM.gov public data extract |
| [Brazil Public Tenders Feed (PNCP)](https://apify.com/sidehustler/brazil-tenders-feed) | Federal, state and municipal tenders in Brazil | Official PNCP API |

### Feedback

Need another field or filter (e.g. item-level catalogue codes)? Open an issue on the **Issues** tab — we respond quickly.

***

*Source: Portal Nacional de Contratações Públicas (PNCP), public data under Lei 14.133/2021. This Actor is not affiliated with or endorsed by the Government of Brazil.*

# Actor input Schema

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

"Newly published" returns processes published in the date window — ideal for daily feeds. "Currently open" returns everything still accepting proposals regardless of publication date.

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

Two-letter state codes, e.g. SP, RJ, MG. Leave empty for all of Brazil.

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

Codes or names: 6 Pregão eletrônico, 8 Dispensa, 4 Concorrência eletrônica, 12 Credenciamento, 5 Concorrência presencial, 7 Pregão presencial, 3 Concurso, 2 Diálogo competitivo, 10 Manifestação de interesse, 11 Pré-qualificação, 1/13 Leilão, 9 Inexigibilidade. Default: all competitive modalities (everything except 9).

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

Match any of these words or phrases in the object (objeto), buyer or description — accent-insensitive, so "licitacao" matches "licitação". OR logic.

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

Drop notices whose title or description contains any of these.

## `municipalities` (type: `array`):

City names (São Paulo) or IBGE codes (3550308).

## `spheres` (type: `array`):

Leave empty for all.

## `buyerCnpjs` (type: `array`):

Only these buying organisations (CNPJ, with or without punctuation).

## `buyers` (type: `array`):

e.g. prefeitura, secretaria de saúde, universidade.

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

Keep only notices with a known value at or above this (in the notice currency). Notices without a value are excluded when set.

## `maxValue` (type: `integer`):

Keep only notices with a known value at or below this.

## `lastDays` (type: `integer`):

Newly published mode: publication date within the last N days (1 = yesterday and today). Used only when no date range is set below.

## `publishedFrom` (type: `string`):

Optional start of the publication/update date range. Overrides "last N days".

## `publishedTo` (type: `string`):

Optional end of the date range (inclusive).

## `onlyOpen` (type: `boolean`):

Keep only notices whose submission deadline is in the future.

## `deadlineWithinDays` (type: `integer`):

Keep only open notices whose deadline falls within the next N days (e.g. 14). Leave empty to ignore.

## `onlyPriceRegistration` (type: `boolean`):

Keep only Sistema de Registro de Preços processes.

## `deadlineUntil` (type: `string`):

Only for "Currently open" mode: include processes whose proposal deadline is on or before this date (default: one year ahead).

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

Maximum number of notices to save. Newest first. You pay only for saved results.

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

Remember what earlier runs delivered and save only notices that are new (or changed, see below). Ideal for daily schedules. State is kept per Monitor ID in a named key-value store in your account.

## `reportUpdates` (type: `boolean`):

In monitoring mode, re-deliver a notice when its title, status, deadline or value changes (changeType = updated).

## `monitorId` (type: `string`):

Name for this monitoring feed, so different schedules/tasks keep separate memories (e.g. it-london). Letters, digits, dashes.

## `descriptionMaxLength` (type: `integer`):

Truncate descriptions to this many characters (0 = no limit).

## `includeDocuments` (type: `boolean`):

Adds the list of published files (edital, termo de referência, anexos) with download links. One extra API call per tender.

## `maxPagesPerQuery` (type: `integer`):

Safety cap on API pages (50 processes each) per day/modality/state query.

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

PNCP is slow at times; a few parallel queries keep runs fast while staying polite.

## `maxRunSeconds` (type: `integer`):

Stop fetching new pages after this time and save what was found. Prevents runaway runs.

## Actor input object example

```json
{
  "mode": "published",
  "lastDays": 1,
  "onlyOpen": false,
  "onlyPriceRegistration": false,
  "maxResults": 50,
  "onlyNew": false,
  "reportUpdates": true,
  "descriptionMaxLength": 1000,
  "includeDocuments": false,
  "maxPagesPerQuery": 20,
  "concurrency": 3,
  "maxRunSeconds": 300
}
```

# Actor output Schema

## `tenders` (type: `string`):

One item per notice, newest first.

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

Window, filters, records scanned, saved and any source warnings.

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("sidehustler/brazil-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("sidehustler/brazil-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 '{}' |
apify call sidehustler/brazil-tenders-feed --silent --output-dataset

```

## MCP server setup

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