# Brazil Gov Purchase Prices — Compras.gov / PNCP winners (`t0ld/compras-gov-item-prices-scraper`) Actor

What Brazilian government agencies really pay: item-level estimated and awarded unit prices, winning suppliers, quantities and PNCP links from Compras.gov / PNCP (Lei 14.133). Search by keyword, class, dates.

- **URL**: https://apify.com/t0ld/compras-gov-item-prices-scraper.md
- **Developed by:** [T0LD Studio](https://apify.com/t0ld) (community)
- **Categories:** Lead generation, Other
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$3.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 Gov Purchase Prices — Compras.gov / PNCP items & winners

Search **what the Brazilian government actually pays** for goods and services. This Actor reads the official open-data API of **Compras.gov.br / PNCP (Lei 14.133/2021 purchases)** and returns one clean row per purchased **item**: description, quantity, **estimated unit price**, **awarded (winning) unit price**, supplier company, buyer, status, CATMAT/CATSER catalog code and a link to the purchase on PNCP.

### What can I use it for?

- **Suppliers and bidders**: benchmark prices before bidding ("how much did agencies pay for 'cadeira giratória'?").
- **Price research (pesquisa de preços)** for procurement teams, with real winning prices and discount vs. estimate.
- **Competitor intelligence**: which companies win which items, at what price, for which buyers.
- **Journalists and watchdogs**: unit prices of medicines, equipment, services across agencies.

### Input

| Field | Description |
|---|---|
| `keywords` | Words that must appear in the item description (accent/case-insensitive). |
| `catalogClassCodes` | CATMAT class codes, filtered on the government server (fast). |
| `catalogItemCodes` | Exact CATMAT/CATSER item codes (applied after download). |
| `materialOrService` | `both`, `M` (goods) or `S` (services). |
| `onlyWithResult` | Only items that already have a winner (real paid prices). Default on. |
| `daysBack` / `dateFrom` / `dateTo` | Inclusion-date window in PNCP. |
| `minUnitPrice` / `maxUnitPrice` | Price range (awarded price, or estimate if none). |
| `maxPagesScanned` | Safety limit (500 items per page). |
| `maxItems` | Max results. |

Example:

```json
{ "keywords": ["notebook", "computador portátil"], "dateFrom": "2026-11-01", "dateTo": "2026-11-20", "onlyWithResult": true, "maxItems": 500 }
```

### Output

```json
{
  "itemId": "9263890600112202600007",
  "pncpUrl": "https://pncp.gov.br/app/editais/29599447000100/2026/67",
  "description": "Suporte tipo: ajustável e desmontável ... apoio para notebook ...",
  "type": "material",
  "category": "Informática (TIC)",
  "catalogItemCode": 602089,
  "catalogClassCode": 7290,
  "unit": "Unidade",
  "quantity": 100,
  "estimatedUnitPrice": 21.7,
  "awardedUnitPrice": 21.7,
  "awardedTotal": 2170,
  "discountVsEstimatePercent": 0,
  "status": "Homologado",
  "supplierDocument": "63279748000195",
  "supplierName": "ARC PHARMA LTDA",
  "buyerCnpj": "29599447000100",
  "resultDate": "2026-11-19"
}
```

### Notes

- The government API publishes with a delay of a few days, so the newest days may be empty.
- Winners that are **individuals (CPF)** are not exposed: name/document are left empty and `supplierIsIndividual` is true. Only public procurement data is returned.
- Pay per result (`result` event). Keyword filtering is done after download (about 10,000+ items per day are published) — for rare items use a short date window or a catalog class code.
- Not affiliated with the Brazilian government.

# Actor input Schema

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

Keep only items whose description contains ANY of these words (accent/case-insensitive), e.g. 'notebook', 'cadeira', 'dipirona'. Leave empty for all items. Matching is done after download, so combine with a date range and 'Max pages scanned'.

## `catalogItemCodes` (type: `array`):

Optional official CATMAT/CATSER item codes (e.g. '602089'). Applied after download, so combine with a date range or a catalog class code.

## `catalogClassCodes` (type: `array`):

Optional CATMAT class codes (e.g. '7290' = computer accessories). Filtered on the government server, so it is fast. Find codes in the 'catalogClassCode' field of earlier results.

## `materialOrService` (type: `string`):

Restrict to physical goods (materials), services, or both.

## `onlyWithResult` (type: `boolean`):

Keep only items that already have a winning bid (real paid prices). Turn off to include open/estimated-only items.

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

Used when 'Date from' is empty: items included in PNCP in the last N days. Default 7.

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

Start date (YYYY-MM-DD) of PNCP inclusion. Leave empty to use 'Last N days'.

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

End date (YYYY-MM-DD). Leave empty for today.

## `minUnitPrice` (type: `number`):

Skip items whose awarded (or estimated) unit price is below this value.

## `maxUnitPrice` (type: `number`):

Skip items whose awarded (or estimated) unit price is above this value.

## `maxPagesScanned` (type: `integer`):

Safety limit: each page has 500 items from the government API. Keyword search scans pages until Max results is reached or this limit.

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

Maximum number of items to return.

## Actor input object example

```json
{
  "keywords": [
    "notebook"
  ],
  "catalogItemCodes": [],
  "catalogClassCodes": [],
  "materialOrService": "both",
  "onlyWithResult": true,
  "daysBack": 7,
  "maxPagesScanned": 100,
  "maxItems": 100
}
```

# Actor output Schema

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

Awarded and estimated unit prices of items bought by Brazilian government bodies.

## `resultsFull` (type: `string`):

All fields of every result.

# 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 = {
    "keywords": [
        "notebook"
    ],
    "catalogItemCodes": [],
    "catalogClassCodes": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("t0ld/compras-gov-item-prices-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 = {
    "keywords": ["notebook"],
    "catalogItemCodes": [],
    "catalogClassCodes": [],
}

# Run the Actor and wait for it to finish
run = client.actor("t0ld/compras-gov-item-prices-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 '{
  "keywords": [
    "notebook"
  ],
  "catalogItemCodes": [],
  "catalogClassCodes": []
}' |
apify call t0ld/compras-gov-item-prices-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,t0ld/compras-gov-item-prices-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/ySc31AuRKheAOdx0x/builds/4mS4XZGoLeU0Tr0pm/openapi.json
