# Brazil Public Tenders Scraper: PNCP Editais (`datadesk-io/brazil-public-tenders-scraper`) Actor

Scrape Brazilian public tenders from the official PNCP API: objeto, buyer/CNPJ, modality, status, values, city/UF, dates and portal URL. Alerts. No login. $2 per 1,000 tenders.

- **URL**: https://apify.com/datadesk-io/brazil-public-tenders-scraper.md
- **Developed by:** [DataDesk](https://apify.com/datadesk-io) (community)
- **Categories:** Lead generation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 93.8% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.60 / 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.
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 Public Tenders Scraper (PNCP)

Scrape **Brazilian public tenders (contratações / editais)** from the official **Portal Nacional de Contratações Públicas (PNCP)** consultation API. Every tender comes with **objeto, buyer (órgão/CNPJ), modality, status, estimated/awarded value, city/UF, dates and portal URL**. No login, no proxies. **$2 per 1,000 tenders.**

### Try it now (one click)

1. Click **Start**. The prefilled input is a small test: in our latest check (Nov 13, 2026) it returned **20 tenders in about 2 seconds**.
2. Change the input to what you need (search terms, filters, max results).
3. Download the results as CSV, Excel or JSON, or get them via API, webhooks, Make or Zapier.

**Price example:** 100 tenders = **$0.205**, 1,000 tenders = **$2.005** ($2.00 per 1,000 tenders + $0.005 per run). Silver and Gold plan users pay 10% and 20% less per tender. Apify's free plan includes $5 of usage every month, enough for about 2,497 tenders. Runs that find nothing are not charged.

#### Sample of real results

*Real rows from a local test run on Nov 13, 2026 (some columns). Each tender also includes a link to the source and the other fields listed below.*

| Title | Buyer name | Modality | Status | Estimated value |
|---|---|---|---|---|
| A presente licitação tem como objeto a esc… | MUNICIPIO DE LINDOESTE | Pregão - Eletrônico | Divulgada no PNCP | 113,462 |
| Aquisição de equipamentos médico-hospitala… | MUNICIPIO DE PEROLA D'OESTE | Pregão - Eletrônico | Divulgada no PNCP | 84,476.22 |
| A presente licitação tem como objeto a esc… | MUNICIPIO DE LINDOESTE | Pregão - Eletrônico | Divulgada no PNCP | 301,321.37 |

### What you get

| Tender fields | Buyer & place |
|---|---|
| title (objeto), status, modality, disputeMode | buyerName, buyerCnpj, buyerSphere |
| estimatedValue, awardedValue, processNumber | city, state, unitName |
| openingAt, closingAt, publishedAt, url | sourceSystemUrl |

### Sources and coverage

| Source | Coverage | Data |
|---|---|---|
| **PNCP** `/api/consulta/v1/contratacoes/publicacao` | Federal, state and municipal purchases published on PNCP | Official tender metadata, values, dates, buyer, UF |

### How to use it

1. Click **Try for free**: prefilled last 1 day of Pregão Eletrônico (modality 6).
2. Optionally set keywords (objeto), UF, more modalities or a date range.
3. Export the dataset.

### Input examples

**Yesterday's electronic auctions:**

```json
{"daysBack": 1, "modalities": [6], "maxTenders": 20}
```

**IT-related in SP (keyword filter):**

```json
{"daysBack": 3, "modalities": [6, 7], "keywords": ["software", "sistema", "tecnologia"], "state": "SP", "maxTenders": 50}
```

**Alerts:**

```json
{"daysBack": 1, "modalities": [6], "onlyNewTenders": true, "alertsKey": "pncp-pregao"}
```

#### Input fields

| Field | Type | Description |
|---|---|---|
| `daysBack` | integer | Calendar days ending at dateTo (default today BRT). |
| `dateFrom` / `dateTo` | string | Optional YYYY-MM-DD bounds. |
| `modalities` | array | PNCP modality codes. 6 = Pregão Eletrônico (default). |
| `keywords` | array | Keep tenders whose objeto contains any keyword. |
| `state` | string | Optional UF filter, e.g. SP, RJ, MG. |
| `maxTenders` | integer | Global cap. |
| `onlyNewTenders` / `alertsKey` | boolean / string | Alerts mode. |

### Pricing

**$0.005** start + **$0.002 per tender** ($2 / 1,000). 20 tenders ≈ $0.045.

### MCP

Ask for "Brazil PNCP public tenders for software in SP".

### FAQ

**API key?** Not required for the public consultation endpoint.
**Same as ChileCompra Actor?** Sister product for Brazil's PNCP.

### Limitations

- API requires a modality code per request; we loop the modalities you select.
- Keyword and UF filters are applied client-side after each page.

### Output fields

| Field | Description |
|---|---|
| `title` | Tender title as published by the source |
| `buyerName` | Buyer (public body) that published the tender |
| `modality` | Procurement modality, e.g. electronic auction, minimum value |
| `status` | Status as reported by the source, e.g. active, closed |
| `estimatedValue` | Estimated contract value, when published |
| `state` | Brazilian state (UF) of the buyer |
| `city` | City or town |
| `closingAt` | Deadline to submit offers |
| `url` | Link to the tender on the official source |

### Start now

Click **Start** to run the prefilled example, then adjust the input. Missing a field, filter or source? Open an issue on the **Issues** tab and tell us what you need.

### Support

datadesk.io@proton.me

***

**ES:** Extrae licitaciones públicas de Brasil (**PNCP**): objeto, órgano, modalidad, valor y UF. Sin login. **$2 / 1.000.**
**PT:** Extrai contratações públicas do **PNCP**: objeto, órgão, modalidade, valor e UF. Sem login. **$2 / 1.000.**

# Actor input Schema

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

How many calendar days ending at dateTo / today.

## `dateFrom` (type: `string`):

Optional start date.

## `dateTo` (type: `string`):

Optional end date (default today BRT).

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

PNCP codigoModalidadeContratacao list. 6=Pregão Eletrônico.

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

Keep tenders whose objeto contains any of these words.

## `state` (type: `string`):

Optional Brazilian state code, e.g. SP, RJ, MG.

## `maxTenders` (type: `integer`):

Global cap.

## `onlyNewTenders` (type: `boolean`):

Return only tenders not seen before.

## `alertsKey` (type: `string`):

Name for this alert memory.

## Actor input object example

```json
{
  "daysBack": 1,
  "modalities": [
    6
  ],
  "keywords": [
    "software",
    "sistema",
    "tecnologia"
  ],
  "state": "SP",
  "maxTenders": 20,
  "onlyNewTenders": true
}
```

# Actor output Schema

## `results` (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 = {
    "daysBack": 1,
    "modalities": [
        6
    ],
    "maxTenders": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("datadesk-io/brazil-public-tenders-scraper").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,
    "modalities": [6],
    "maxTenders": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("datadesk-io/brazil-public-tenders-scraper").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,
  "modalities": [
    6
  ],
  "maxTenders": 20
}' |
apify call datadesk-io/brazil-public-tenders-scraper --silent --output-dataset

```

## MCP server setup

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

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/ZbkwIFcMwTomuhcLH/builds/305hN5OHuqP5xl6Ls/openapi.json
