# Licitações PNCP Scraper: Brazil Public Tenders (`allanmxr/brazil-public-tenders`) Actor

Flat JSON of Brazilian government tenders from PNCP: object, agency, city, state, modality, estimated value, proposal dates and edital links. Search by keyword, state, city, agency and value. Monitor mode returns only new licitações, ideal for daily bid alerts. No login, no API key, no proxy.

- **URL**: https://apify.com/allanmxr/brazil-public-tenders.md
- **Developed by:** [Allan Marcelino](https://apify.com/allanmxr) (community)
- **Categories:** Lead generation, Business, 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 tenders

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 Scraper (Licitações, Editais, Pregões) | PNCP

Search and monitor **Brazilian government tenders** from **PNCP**, the official National Public Procurement Portal (*Portal Nacional de Contratações Públicas*). Get clean, flat JSON with the tender object, agency, city, state, modality, estimated value, proposal dates and links to the edital and its attachments. No login, no API key.

If you sell to the Brazilian government, you already know the problem: tenders are scattered across thousands of municipalities, states and federal agencies. This Actor turns PNCP into a searchable feed you can filter by keyword, state, city, agency, modality and value, and run on a schedule so you only see **new** tenders.

### What you get

- **Every modality**: pregão eletrônico and presencial, concorrência, dispensa, inexigibilidade, credenciamento, leilão, concurso, diálogo competitivo and more (Lei 14.133/2021).
- **Every level of government**: federal, state and municipal agencies across all 27 states.
- **Keyword search** over the tender object, with several keywords in one run (results are merged and deduplicated).
- **Monitor mode** (`onlyNewSinceLastRun`): schedule the Actor daily and receive only tenders you have not seen before.
- **Attachment links**: direct download links for the edital and annexes.
- **Filters**: status, modality, state, municipality, government sphere and branch, agency CNPJ or name, excluded words, price registry, active only, estimated value range, publication date (fixed or last N days) and minimum days to the deadline.
- **Official data, no blocking**: it reads the public API behind pncp.gov.br, so there are no proxies, captchas or browsers involved.

### Who it is for

Suppliers and consultants who sell to the Brazilian government, bid-alert and procurement intelligence teams, law firms and analysts who follow public spending.

### Use cases

- **Lead generation for government suppliers**: get notified when an agency publishes a tender for your product or service (IT equipment, medical supplies, cleaning, school meals, construction, software).
- **Bid alerts**: a daily feed of new tenders for your keywords and states, sent to Slack, email or your CRM through Apify integrations.
- **Market intelligence**: how many tenders, from which agencies and at what estimated value, in your niche and region.
- **Price benchmarking**: estimated values by modality, state and object.
- **Compliance and procurement monitoring**: follow every tender published by a specific agency.

### Input

Everything is optional. With an empty input you get the 100 most recently updated open tenders in Brazil.

| Field | Description |
|---|---|
| `maxItems` | Maximum number of tenders. Default `100`. |
| `keywords` | Words in the same item must all appear (AND): `notebook` finds more than `notebook manutencao`. Separate items are alternatives (OR), merged and deduplicated. Only tenders whose title or object contains the words (accent and case insensitive) are returned: PNCP also matches line items and attachments, and those tenders are dropped. |
| `excludeKeywords` | Drop tenders whose title or object contains any of these words. |
| `status` | `open` (receiving proposals), `proposalsClosed` (being judged), `closed` (concluded) or `all`. Default `open`. |
| `modalities` | Pregão Eletrônico, Dispensa de Licitação, Credenciamento and the others. Empty means all. |
| `onlyActive` | Skip suspended, revoked and annulled tenders. |
| `onlyPriceRegistry` | Only price registry (SRP) tenders. |
| `states`, `municipalities` | State abbreviations (UF); city names (`Barueri`, or `Barueri/SP`) or 7-digit IBGE codes. |
| `spheres`, `branches` | Federal, state or municipal agencies; executive, legislative or judiciary. |
| `agencyCnpj`, `agencyName` | One agency by CNPJ (punctuation allowed), or any agency or unit whose name contains the text. |
| `minValue`, `maxValue` | Estimated value range in BRL. Tenders with undisclosed value are excluded when a range is set. |
| `publishedWithinDays` | Published in the last N days, relative to the run day (made for schedules). |
| `minDaysToDeadline` | Proposal deadline at least N days away, relative to the run day. |
| `publicationDateFrom/To` | Fixed publication date range (`YYYY-MM-DD`) for one-off searches. |
| `includeAttachments` | Add edital and annex links (one extra request per tender). Default `true`. |
| `includeItems` | Add each tender's line items, up to 500 (one extra request per tender). Default `false`. |
| `onlyNewSinceLastRun`, `monitorName` | Monitor mode. Output only tenders not returned by previous runs with the same name. |

An invalid range (`minValue` above `maxValue`, or publication start after end) fails the run right away with a clear message.

#### Example input

```json
{
  "keywords": ["notebook", "computador"],
  "excludeKeywords": ["manutencao"],
  "status": "open",
  "states": ["SP", "RJ"],
  "modalities": ["6", "8"],
  "minValue": 50000,
  "publishedWithinDays": 7,
  "onlyNewSinceLastRun": true,
  "monitorName": "it-equipment-southeast",
  "maxItems": 200
}
```

### Output

Each tender is one flat dataset item. Dates are ISO 8601 in Brasília time (UTC-3).

```json
{
  "tenderId": "45780095000141-1-000078/2026",
  "title": "Edital nº 14 | Processo 10802/2026",
  "object": "REGISTRO DE PRECOS PARA FUTURA E EVENTUAL AQUISICAO DE COMPUTADORES E NOTEBOOKS POR MEIO DE ATA DE REGISTRO DE PRECOS",
  "agencyName": "MUNICIPIO DE CAMPO LIMPO PAULISTA",
  "agencyCnpj": "45780095000141",
  "unitName": "Prefeitura Municipal",
  "sphere": "Municipal",
  "branch": "Não se aplica",
  "city": "Campo Limpo Paulista",
  "cityIbgeCode": "3509601",
  "state": "SP",
  "modality": "Pregão - Eletrônico",
  "estimatedValue": 24550680.0,
  "publicationDate": "2026-11-17T16:34:58-03:00",
  "updatedAt": "2026-11-17T16:34:58-03:00",
  "proposalOpeningDate": "2026-11-16T09:00:00-03:00",
  "proposalDeadline": "2026-12-02T09:00:00-03:00",
  "status": "open",
  "situation": "active",
  "isPriceRegistry": true,
  "disputeMode": "Aberto",
  "legalBasis": ["Lei 14.133/2021, Art. 28, I"],
  "judgmentCriteria": ["Menor preço"],
  "url": "https://pncp.gov.br/app/editais/45780095000141/2026/78",
  "originSystemUrl": null,
  "electronicProcessUrl": null,
  "matchedKeyword": "notebook",
  "additionalInfo": null,
  "attachments": [
    {
      "title": "EDITAL",
      "type": "Edital",
      "url": "https://pncp.gov.br/pncp-api/v1/orgaos/45780095000141/compras/2026/78/arquivos/1"
    }
  ],
  "items": null,
  "scrapedAt": "2026-11-17T21:39:18+00:00"
}
```

`tenderId` is the PNCP control number, unique per tender. `estimatedValue` is `null` when the agency keeps the budget confidential or did not inform it. `items` is filled only with `includeItems`. `updatedAt` is the last update on PNCP: results are sorted by it, most recent first, not strictly by publication date. `situation` is `active`, `revoked`, `annulled` or `suspended`. `originSystemUrl` is the electronic bidding platform where proposals are submitted, when the agency informed it.

### Monitor mode: a daily feed of new tenders

1. Set your keywords, states and filters.
2. Turn on `onlyNewSinceLastRun` and give the search a `monitorName`.
3. Create a **Schedule** in Apify (for example every day at 8:00).
4. Add an **integration** (Slack, email, Google Sheets, webhook) to receive the dataset.

The first run returns everything that matches (up to `maxItems`) and remembers it. Every later run returns only what is new. The memory lives in a named key-value store, so it persists between runs. If more tenders match than `maxItems`, the remainder comes in the next run, nothing is skipped.

### Pricing

Pay per event: **US$ 2.00 per 1,000 tenders** (US$ 0.002 per tender, event `tender`), charged for each tender written to the dataset. Platform usage is included. Attachment links cost nothing extra.

| Run | Cost |
|---|---|
| 200 tenders | US$ 0.40 |
| 1,000 tenders | US$ 2.00 |
| Daily monitor run with 15 new tenders | US$ 0.03 |

In monitor mode you only pay for tenders you have not received before.

### FAQ

**Where does the data come from?**
From PNCP (pncp.gov.br), the official portal created by Lei 14.133/2021, where Brazilian public agencies must publish their procurement notices. The Actor uses the same public search the website uses.

**Does it cover federal tenders from Compras.gov.br (ComprasNet)?**
Federal agencies publish their Lei 14.133 tenders on PNCP, so they are included. Compras.gov.br open data repeats the same PNCP records for current tenders, so it is not queried separately and nothing is duplicated.

**Is this legal?**
The data is public by law. The Actor reads a public endpoint, at a gentle pace, and returns only information about tenders and public agencies. It does not collect personal data fields (no CPF, personal names, phone numbers or personal emails). The free-text tender object is published as is by each agency.

**How fresh is the data?**
PNCP search reflects publications within minutes. For alerts, run the Actor daily or several times a day in monitor mode.

**Why are some `estimatedValue` fields null?**
Agencies can keep the budget confidential (*orçamento sigiloso*) or not inform it. Those tenders are still returned unless you set a value range.

**How many results can I get?**
Open tenders in Brazil number around 40,000 at any time. PNCP only pages through the first 10,000 results of a search. When you use filters applied after the search (value, dates, agency name, excluded words, monitor mode) or ask for more than 10,000 items, a bigger search is split by state and then by modality, so open searches are fully covered. For `closed` (millions of tenders) some state and modality slices still exceed 10,000: the Actor reads the 10,000 most recently updated of each and logs a warning. Add keywords or filters to narrow it.

**Can I search in English?**
Tender objects are written in Portuguese, so Portuguese keywords match best (`notebook`, `merenda escolar`, `medicamento`, `obra`, `software`).

**Is there a time zone?**
Dates carry the Brasília offset (-03:00).

### Limits and notes

- The Actor reads public data only. It does not log in, bid or submit anything.
- Value, date and agency-name filters are applied after the search, so very selective filters on broad searches read more pages. Combine them with keywords or states to run faster.
- Coverage is whatever agencies publish on PNCP. Some small municipalities publish late or only partially, which is outside the Actor's control.

### Em português

Extraia **licitações, editais e pregões** do **PNCP** (Portal Nacional de Contratações Públicas) em JSON limpo: objeto, órgão, cidade, UF, modalidade, valor estimado, datas de proposta e links do edital e anexos. Busque por palavra-chave, estado, município, órgão, modalidade e valor. O **modo monitor** devolve só as licitações novas desde a última execução, ideal para alerta diário de oportunidades. Sem login, sem chave de API e sem proxy.

Buscas típicas: licitação de notebook em São Paulo, pregão eletrônico de merenda escolar, dispensa de licitação por município, editais abertos de TI.

**Preço:** US$ 2,00 por 1.000 licitações (US$ 0,002 por item entregue). Exemplo: 200 licitações custam US$ 0,40.

### Other Actors by the same author

- [Brazil Vehicle Auctions Scraper](https://apify.com/allanmxr/brazil-vehicle-auctions-scraper)
- [Brazil Real Estate Scraper](https://apify.com/allanmxr/brazil-real-estate-scraper)
- [Brazil Real Estate Auctions Scraper](https://apify.com/allanmxr/brazil-real-estate-auctions)
- [Mexico Vehicle Auctions Scraper](https://apify.com/allanmxr/mexico-vehicle-auctions-scraper)

# Actor input Schema

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

Maximum number of tenders in the output.

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

Words searched in the tender title and object (Portuguese works best). Only tenders whose title or object contains the words are returned (accent and case insensitive), even if PNCP matched them through line items or attachments. Words in the same item must all appear (AND): "notebook" returns far more tenders than "notebook manutencao". Separate items are alternatives (OR): each runs as its own search and results are merged without duplicates. Leave empty for no keyword filter.

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

Drop tenders whose title or object contains any of these words (accent and case insensitive), e.g. "manutencao", "locacao".

## `status` (type: `string`):

Open = still receiving proposals. Proposals closed = deadline passed, being judged. Closed = concluded (awarded, revoked, annulled, failed). All = the three.

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

Procurement modalities, ordered by how many tenders each has. Empty means every modality.

## `onlyActive` (type: `boolean`):

Skip tenders that were suspended, revoked or annulled.

## `onlyPriceRegistry` (type: `boolean`):

Only tenders for a price registry (Sistema de Registro de Preços).

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

Brazilian states of the contracting unit. Empty means the whole country.

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

City names ("Barueri", or "Barueri/SP" to disambiguate) or 7-digit IBGE codes (3505708).

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

Federal, state or municipal agencies. Empty means all.

## `branches` (type: `array`):

Executive, legislative or judiciary. Empty means all.

## `agencyCnpj` (type: `string`):

Only tenders from this contracting agency (14 digits, punctuation allowed).

## `agencyName` (type: `string`):

Only tenders whose agency or unit name contains this text (accent and case insensitive).

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

Tenders with undisclosed value are excluded when a value range is set.

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

Must not be lower than the minimum.

## `publishedWithinDays` (type: `integer`):

Relative to the day of the run, so it works on a schedule. 1 = today and yesterday.

## `minDaysToDeadline` (type: `integer`):

Relative to the day of the run. Use it to skip tenders that are about to close, e.g. 3. Tenders without a deadline are excluded.

## `publicationDateFrom` (type: `string`):

Fixed publication date on PNCP (for a one-off search). Use the last N days field on schedules.

## `publicationDateTo` (type: `string`):

Only tenders published on or before this date.

## `includeAttachments` (type: `boolean`):

Adds the edital and annex download links. Costs one extra request per tender.

## `includeItems` (type: `boolean`):

Adds each tender's line items (description, quantity, unit, estimated unit price), up to 500 per tender. Costs one extra request per tender.

## `onlyNewSinceLastRun` (type: `boolean`):

Remembers the tenders already returned (in a named key-value store that survives between runs) and outputs only new ones. Schedule the Actor daily to get a feed of new tenders.

## `monitorName` (type: `string`):

Only used in monitor mode. Use a different name for each scheduled search so each keeps its own history. Keeping the same name between runs preserves that history.

## Actor input object example

```json
{
  "maxItems": 10,
  "keywords": [
    "computador"
  ],
  "status": "open",
  "onlyActive": false,
  "onlyPriceRegistry": false,
  "includeAttachments": true,
  "includeItems": false,
  "onlyNewSinceLastRun": false,
  "monitorName": "default"
}
```

# Actor output Schema

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

All scraped items in the default dataset.

# 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 = {
    "maxItems": 10,
    "keywords": [
        "computador"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("allanmxr/brazil-public-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 = {
    "maxItems": 10,
    "keywords": ["computador"],
}

# Run the Actor and wait for it to finish
run = client.actor("allanmxr/brazil-public-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 '{
  "maxItems": 10,
  "keywords": [
    "computador"
  ]
}' |
apify call allanmxr/brazil-public-tenders --silent --output-dataset

```

## MCP server setup

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