# Brazil Government Purchase Prices (PNCP Item Prices) (`dados_publicos_br/pncp-itens-precos`) Actor

What Brazilian public agencies actually paid per unit: awarded unit prices, winning suppliers and price statistics for any product or service, from PNCP, the official national procurement portal.

- **URL**: https://apify.com/dados_publicos_br/pncp-itens-precos.md
- **Developed by:** [Dados Públicos BR](https://apify.com/dados_publicos_br) (community)
- **Categories:** Business, Lead generation, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.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 Government Purchase Prices (PNCP Item Prices)

**What did Brazilian public agencies actually pay, per unit?** Type a product or service (`notebook`, `papel A4`, `pneu 175/70`, `ar condicionado`) and get every **awarded unit price** found in recent purchases on **PNCP**, the official national procurement portal. Each result includes the winning supplier, quantity, estimated vs. awarded price, agency, city and a link to the purchase. A price summary (median and quartiles per unit of measure) comes with every run.

### Who uses it

- 💼 **Suppliers bidding in public tenders**: price your bid from what agencies really paid, not from guesses.
- 🏛️ **Public buyers**: build the price research (*pesquisa de preços*) that Law 14.133/2021 requires before a purchase, with official public sources.
- 📊 **Analysts and journalists**: compare prices across states and agencies and spot outliers.

### How to use

1. Open this Actor in Apify Console (you can try it on Apify's free plan).
2. Fill in the input, or keep the example values to see how the output looks.
3. Click **Start** and wait for the run to finish.
4. Download the results as JSON, CSV or Excel from the run's output, or get them through the Apify API.
5. To get fresh data automatically, create an Apify **Schedule** for the Actor (for example, every morning).

### Input example

```json
{
  "termo": "notebook",
  "palavrasExcluidas": ["locação"],
  "ufs": ["SP", "MG", "RJ"],
  "mesesAtras": 12,
  "maxResultados": 200
}
```

**Match modes** (`correspondencia`):

- `inicio` (default): the item name must **start** with the term. "Notebook Core i5…" matches; "Suporte para notebook" and "Memória RAM – aplicação: notebook" do not. Leading codes like `7003.61049-Notebook` are ignored. This keeps price statistics clean.
- `qualquer`: the term may appear anywhere in the item description. You get more results, but accessories and kits will show up too.

### Output

One row per awarded price (an item can have several winners in price-registration tenders):

`descricao`, `unidadeMedida`, `unidadeNormalizada` (UN, CX, PCT, KG…), `quantidadeEstimada`, `valorUnitarioEstimado`, `valorUnitarioHomologado`, `quantidadeHomologada`, `valorTotalHomologado`, `percentualDesconto`, `dataResultado`, `fornecedorTipo`, `fornecedorDocumento`, `fornecedorNome`, `fornecedorPorte`, `criterioJulgamento`, `situacaoItem`, `modalidade`, `orgaoCnpj`, `orgaoNome`, `unidadeNome`, `esfera`, `municipio`, `codigoIbge`, `uf`, `dataPublicacao`, `numeroControlePncpCompra`, `compraUrl`, `numeroItem`.

Example row (supplier anonymized here; the Actor returns the real public record):

```json
{
  "descricao": "NOTEBOOK. O equipamento deverá estar em linha de produção pelo fabricante. Computador portátil (notebook) com processador…",
  "unidadeMedida": "UN",
  "unidadeNormalizada": "UN",
  "quantidadeEstimada": 7,
  "valorUnitarioEstimado": 5880.68,
  "valorUnitarioHomologado": 5350,
  "fornecedorTipo": "PJ",
  "fornecedorNome": "EMPRESA EXEMPLO LTDA",
  "modalidade": "Pregão - Eletrônico",
  "municipio": "Independência",
  "uf": "RS",
  "compraUrl": "https://pncp.gov.br/app/editais/87612826000190/2026/958"
}
```

**Price summary** (saved as `resumo` in the run's `STATS` record). This is real output for `notebook`, last 12 months, 30 prices, October 2026:

```json
[{ "unidadeMedida": "UN", "amostras": 30, "minimo": 2330, "p25": 4047.5, "mediana": 4699.5, "p75": 5713.31, "maximo": 29106.38, "media": 7134.51 }]
```

Use the **median and quartiles** rather than the mean: a few high-spec machines can pull the average up a lot.

**Privacy:** when the winner is an individual (`fornecedorTipo: "PF"`), the CPF is masked (`***.456.789-**`), following the Brazilian government's own transparency-portal practice.

### Performance

Most recent purchases come first. Each purchase takes about **2–4 seconds** to inspect at the pace PNCP allows, so 30 prices take about 1.5 minutes. `maxCompras` caps the run time. You are charged only for prices delivered.

### How much does it cost?

You pay **US$ 0.005 per awarded price** delivered to your dataset (US$ 5 per 1,000), plus a tiny start fee per run. Purchases inspected without a matching item are free.

- A price research with 50 awarded prices: about **US$ 0.25**.
- 1,000 prices: about **US$ 5**.
- Control your spend with `maxResultados` and the run's maximum charge setting.

### Data source and limits

- Official public data from **PNCP** under Law 14.133/2021 and Brazil's Access to Information Law. This Actor is not affiliated with the Brazilian government.
- Purchases are found with the PNCP website's own search. Items and awarded prices come from the PNCP API.
- Agencies type units and descriptions freely, so always check the unit and the description before comparing prices. Purchases that were revoked, annulled or suspended are skipped, and so are cancelled results.

### FAQ

**Can I use it from my code or an AI agent?** Yes. Every Apify Actor can be called through the Apify API and the official clients, and AI agents can find and run it through the Apify MCP server.

**Is the data official?** Yes. It comes straight from the official public source listed under "Data source", with no manual edits.

**Something broke or you need a field?** Open an issue on the Actor's *Issues* tab.

### Related Actors

More Brazilian public data from the same publisher:

- [Brazil public tenders (PNCP Licitações)](https://apify.com/dados_publicos_br/pncp-licitacoes): open and recently published government tenders, filtered by keyword, state, agency and value.
- [Brazil government contracts and price records](https://apify.com/dados_publicos_br/pncp-contratos-atas): contracts, purchase orders and price registration records (atas): who won, what, how much.
- [Brazil Central Bank indicators](https://apify.com/dados_publicos_br/bcb-indicadores): Selic, CDI, IPCA, IGP-M, exchange rates and more, with accumulated totals.
- [Brazil holidays and business days](https://apify.com/dados_publicos_br/feriados-dias-uteis): national and banking holidays, business-day counts and date math.

***

#### 🇧🇷 Resumo em português

**Quanto o governo pagou, por unidade?** Informe um produto ou serviço e receba os **preços unitários homologados** de compras públicas recentes do **PNCP**: fornecedor vencedor, quantidade, preço estimado × homologado, órgão, cidade e link. Cada execução traz também um **resumo estatístico** (mediana e quartis por unidade de medida). Serve para **precificar propostas** em licitações e para a **pesquisa de preços** exigida pela Lei 14.133/2021. O CPF de fornecedores pessoa física é mascarado. Você paga apenas pelos resultados entregues.

# Actor input Schema

## `termo` (type: `string`):

What to price, in Portuguese, as it is usually written in tenders: <code>notebook</code>, <code>papel A4</code>, <code>pneu 175/70</code>, <code>ar condicionado</code>. Accent- and case-insensitive.

## `correspondencia` (type: `string`):

"Starts with" keeps price statistics clean by skipping accessories and kits that only mention the term.

## `palavrasExcluidas` (type: `array`):

Skip items whose description contains any of these words, e.g. <code>locação</code> to ignore rentals.

## `ufs` (type: `array`):

Empty = all of Brazil.

## `mesesAtras` (type: `integer`):

Only purchases published in the last N months.

## `materialOuServico` (type: `string`):

Restrict to goods (material) or services (serviço).

## `incluirSemResultado` (type: `boolean`):

Also return items still without a result, with the agency's <b>estimated</b> unit price only.

## `maxResultados` (type: `integer`):

Each awarded price (one per winning supplier) is one result. Most recent purchases come first.

## `maxCompras` (type: `integer`):

Safety limit on run time: each purchase takes about 2–4 seconds to inspect.

## Actor input object example

```json
{
  "termo": "notebook",
  "correspondencia": "inicio",
  "mesesAtras": 12,
  "materialOuServico": "todos",
  "incluirSemResultado": false,
  "maxResultados": 10,
  "maxCompras": 35
}
```

# Actor output Schema

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

All rows delivered by this run (dataset items).

## `stats` (type: `string`):

Run statistics and the price summary (median and quartiles per unit of measure).

# 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 = {
    "termo": "notebook",
    "maxResultados": 10,
    "maxCompras": 35
};

// Run the Actor and wait for it to finish
const run = await client.actor("dados_publicos_br/pncp-itens-precos").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 = {
    "termo": "notebook",
    "maxResultados": 10,
    "maxCompras": 35,
}

# Run the Actor and wait for it to finish
run = client.actor("dados_publicos_br/pncp-itens-precos").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 '{
  "termo": "notebook",
  "maxResultados": 10,
  "maxCompras": 35
}' |
apify call dados_publicos_br/pncp-itens-precos --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,dados_publicos_br/pncp-itens-precos"
        }
    }
}
```

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/wbTZpCtMtEJoAv0HT/builds/tCZZCG0LEQVDT2aYF/openapi.json
