Brazil Public Contracts API (PNCP Contratos)
Pricing
from $1.40 / 1,000 contracts
Brazil Public Contracts API (PNCP Contratos)
Get Brazilian government contracts from PNCP, the official national procurement portal: buyer, supplier, object, values and dates. Filter by date, buyer, supplier, state, keywords and value.
Pricing
from $1.40 / 1,000 contracts
Rating
0.0
(0)
Developer
br_data_hub
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
2 days ago
Last modified
Categories
Share
Get Brazilian government contracts from PNCP (Portal Nacional de Contratações Públicas), the official national procurement portal where federal, state and municipal agencies must publish their contracts under Law 14.133/2021.
Use it to find who is selling to the government, monitor competitors, discover buyers for your product, or feed contract data to an AI agent.
🇧🇷 Contratos públicos do PNCP via API: busque contratos por fornecedor (CNPJ), órgão comprador, UF, valor mínimo e palavras no objeto, com link oficial para cada contrato. Ideal para inteligência de mercado em vendas para o governo. CPF de pessoa física vem mascarado. Mais detalhes em português no fim da página.
What can you do with it?
- 🔎 Competitive intelligence: see what your competitors sell to the government, to whom and for how much.
- 🏛️ Find buyers: discover which agencies buy your kind of product or service, by state and keyword.
- 📈 Market sizing: sum contract values by agency, state or object over a period.
- 🤖 AI agents: give an agent live, structured Brazilian procurement data with a typed schema.
What you get per contract
- Buyer agency (CNPJ, name, federal/state/municipal), unit, city and state
- Supplier name and document (company CNPJ; individuals' CPF is masked)
- Contract object (description), type and category
- Initial and total value in BRL
- Signature, validity and publication dates
- Direct link to the contract page on PNCP
How to search contracts in 3 steps
- Click Try for free and set a date range (up to 31 days; empty means yesterday).
- Add filters: a supplier CNPJ to see one company's contracts, a buyer CNPJ for one agency, states and keywords.
- Click Start, then export from the Output tab or read the results through the API.
Input
| Field | Description |
|---|---|
dateFrom, dateTo | Publication date range on PNCP (YYYY-MM-DD, max 31 days). Empty = yesterday. |
buyerCnpj | Only one agency. Filtered by PNCP itself, so it is the fastest filter. |
supplierCnpj | Only contracts won by one company. |
states | Buyer states (UF), e.g. ["SP", "MG"]. |
keywords | Words in the contract object, accents and case ignored (any word matches). |
minValueBrl | Minimum total value. |
maxItems | Stop after this many contracts (default 100). |
Speed
PNCP only filters by date and buyer agency. Supplier, state, keyword and value filters are applied by the Actor while it reads every contract of the period. A full day has about 6,000 to 10,000 contracts and takes about 2 minutes to scan. Combine filters with buyerCnpj or short date ranges for fast runs.
Output example
{"pncpId": "59011676000123-2-000045/2026","pncpUrl": "https://pncp.gov.br/app/contratos/59011676000123/2026/45","buyerName": "CAMARA MUNICIPAL DE VALINHOS","buyerSphere": "Municipal","state": "SP","supplierName": "GRUPO VECTORI","object": "Aquisição de 10 (dez) licenças de software antivírus...","totalValueBrl": 1499,"publishedAt": "2026-10-20T08:12:44"}
How much does it cost?
You pay only for contracts that match your filters. Reading and filtering the whole period is free.
This Actor does one thing: PNCP contracts. Company registry data is in Brazil CNPJ Lookup, from the same publisher.
$0.002 per contract (contract event, pay per event). Charged once per contract returned that matches your filters. Scanning is free.
| You get | Free tier | Bronze tier (10% off) | Gold tier (30% off) |
|---|---|---|---|
| 100 contracts | $0.20 | $0.18 | $0.14 |
| 1,000 contracts | $2.00 | $1.80 | $1.40 |
| 10,000 contracts | $20.00 | $18.00 | $14.00 |
Discounts follow your Apify subscription tier: Bronze 10%, Silver 20%, Gold and above 30%. No subscription to this Actor and no charge for platform usage: you pay only for results. The Apify Free plan includes $5 of monthly credit, enough for about 2,500 contracts at the list price. You can cap the cost of any run with Maximum cost per run; the Actor stops when it is reached.
Data source and limits
Official public API of PNCP (pncp.gov.br/api/consulta). Data and freshness follow the source; contracts signed before agencies joined PNCP may be missing. Values are as declared by each agency.
More questions
How far back can I search?
Any period PNCP has, up to 31 days per run (by publication date on PNCP). PNCP became mandatory with Law 14.133/2021, so older contracts, or contracts of agencies that had not joined PNCP yet, may be missing. For a longer period, run the Actor once per month (an Apify schedule or a loop through the API does this).
Can I get every contract of one company (supplier CNPJ)?
Yes, within the date range. PNCP's API cannot filter by supplier, so the Actor reads every contract published in the period and keeps the ones whose supplier document equals your CNPJ. Use the full 14-digit CNPJ (punctuation is fine): the comparison is exact, so a branch CNPJ only matches that branch. A full day takes about 2 minutes to scan, a full month much longer, so keep ranges short.
Why is the buyer filter so much faster?
buyerCnpj is sent to PNCP itself, which returns only that agency's contracts. Supplier, state, keyword and minimum value are applied by the Actor while reading. Combine the buyer filter with the others for runs of a few seconds.
How do keywords work?
A contract is kept when its object (object) contains any of the words, ignoring accents and case. The match is on part of the text, so software also finds softwares. Add several words for synonyms (ambulancia, UTI movel); you never need to repeat a word with and without accents.
Are values the contract value or what was paid?
They are the values declared by the agency on PNCP: initialValueBrl (value at signature) and totalValueBrl (global value, including amendments when the agency updates it). Payments are not on PNCP. minValueBrl uses the total value.
Is personal data exposed?
When the supplier is an individual (supplierType: "PF"), the CPF is masked like the Receita Federal does (***123456**). Company CNPJs, agency names and contract data are public by law.
How do I open the original contract?
Every item has pncpUrl, the contract page on the official PNCP portal, plus pncpId (PNCP control number) and purchaseId, the tender that originated the contract.
What happens if PNCP is slow or down?
The Actor retries each page up to 5 times with growing pauses. If PNCP still does not answer, the run fails with a clear message, and only contracts already delivered are charged.
Use it via API
Run it from any language and get the results as JSON. Replace <YOUR_API_TOKEN> with your Apify API token.
curl -X POST "https://api.apify.com/v2/acts/br_data_hub~br-pncp-contracts/run-sync-get-dataset-items?token=<YOUR_API_TOKEN>" \-H "Content-Type: application/json" \-d '{"maxItems": 100}'
from apify_client import ApifyClientclient = ApifyClient("<YOUR_API_TOKEN>")run = client.actor("br_data_hub/br-pncp-contracts").call(run_input={'maxItems': 100})for item in client.dataset(run["defaultDatasetId"]).iterate_items():print(item)
You can also schedule runs, send results to webhooks, or connect the Actor to Make, Zapier, n8n, Google Sheets and other integrations.
Use it with AI agents (MCP)
This Actor is ready for AI agents: typed input and output schemas, pay-per-event pricing, limited permissions and short runs.
- Apify MCP server: add
https://mcp.apify.com/?tools=br_data_hub/br-pncp-contractsto Claude, ChatGPT, Cursor, VS Code or any MCP client, and the agent can call this Actor as a tool. - Agent frameworks: call it from LangChain, LlamaIndex, CrewAI or the OpenAI Agents SDK through the Apify integrations, or with the API call above.
- Results come as structured JSON with stable field names, documented in the Output tab.
FAQ
Where does the data come from?
Official public API of PNCP (pncp.gov.br/api/consulta). Data and freshness follow the source; contracts signed before agencies joined PNCP may be missing. Values are as declared by each agency.
How much does it cost?
$0.002 per contract. Discounts follow your Apify subscription tier: Bronze 10%, Silver 20%, Gold and above 30%. See How much does it cost? above for examples.
Do I pay for errors or empty results?
No. Charged once per contract returned that matches your filters. Scanning is free.
Can I run it on a schedule or connect it to other tools?
Yes. Use Apify schedules to run it daily or weekly, webhooks to get notified, and integrations such as Make, Zapier, n8n and Google Sheets. Everything also works through the API.
Can AI agents use it?
Yes. It works as a tool in the Apify MCP server and in agent frameworks, and AI agents can pay per event. See Use it with AI agents (MCP).
Is it legal to use this data?
The Actor reads only public, official sources and keeps personal data masked as the source publishes it. You are responsible for how you use the data, including LGPD compliance.
I found a bug or need a feature. What should I do?
Open an issue in the Issues tab. We answer within 14 days, usually much sooner.
More Actors from BR Data Hub
| Actor | What it does |
|---|---|
| Brazil CNPJ Lookup API (Consulta CNPJ) | Look up Brazilian companies by CNPJ: registration status, partners (masked CPF), activities, tax regime and sc |
| Brazil Open Tenders API (Licitações Abertas) | Find Brazilian government tenders that are open for proposals right now, from PNCP, the official national proc |
| Brazil Municipalities & IBGE Codes (Municípios) | List Brazilian municipalities, search them by name (accents and typos tolerated) or resolve IBGE codes |
| Brazil Holidays & Business Days (Feriados) | Brazilian national and state holidays for all 27 states, with the law behind each one |
| Brazil Banks & Pix Directory (Bancos e ISPB) | Every Brazilian bank and payment institution from official Banco Central lists: ISPB, COMPE bank code, short a |
| Brazil Boleto Validator & Parser (Boleto) | Validate Brazilian boletos in bulk (digitable line or barcode, bank and utility/tax slips): check digits per f |
See all our Actors at apify.com/br_data_hub.
Usar em português
Contratos públicos do PNCP via API. O Portal Nacional de Contratações Públicas (PNCP) é onde órgãos federais, estaduais e municipais publicam seus contratos pela Lei 14.133/2021. Este Actor lê a API oficial do PNCP e devolve cada contrato com órgão comprador, fornecedor, objeto, valores, datas e o link oficial.
Para que serve: inteligência de mercado em vendas para o governo (o que os concorrentes vendem, para quem e por quanto), encontrar órgãos que compram o seu produto, dimensionar mercado por UF ou objeto e alimentar agentes de IA com dados de compras públicas.
Como usar em 3 passos:
- Clique em Try for free e escolha o período de publicação (até 31 dias; vazio = ontem).
- Acrescente filtros: CNPJ do fornecedor para ver os contratos de uma empresa, CNPJ do órgão para um comprador, UFs, palavras no objeto e valor mínimo.
- Clique em Start e baixe na aba Output (JSON, CSV, Excel) ou leia pela API.
Exemplo de entrada:
{ "dateFrom": "2026-10-01", "dateTo": "2026-10-07", "states": ["SP"], "keywords": ["software"], "minValueBrl": 10000, "maxItems": 100 }
Campos principais: pncpId e pncpUrl (link do contrato no PNCP), purchaseId (compra de origem), contractNumber, type, category, object (objeto), buyerCnpj, buyerName, buyerSphere (esfera), buyerUnit, city, cityIbgeCode, state, supplierType (PJ ou PF), supplierDocument (CNPJ, ou CPF mascarado), supplierName, initialValueBrl, totalValueBrl, signedAt, validFrom, validTo, publishedAt.
Velocidade: o PNCP só filtra por data e por órgão. Os filtros de fornecedor, UF, palavra e valor são aplicados pelo Actor enquanto lê o período: um dia inteiro (6 a 10 mil contratos) leva cerca de 2 minutos. Com o CNPJ do órgão, a execução leva segundos.
O que é grátis: você paga só pelos contratos entregues. Período sem contratos que passem nos filtros, erro de entrada ou falha do PNCP não geram cobrança.
Quanto custa: $0.002 por resultado (contract); 1.000 resultados saem por $2.00. Desconto pelo nível da assinatura Apify: Bronze 10%, Silver 20%, Gold ou acima 30%. Erros e consultas sem resultado não são cobrados. Use também pela API ou por agentes de IA no servidor MCP da Apify (https://mcp.apify.com/?tools=br_data_hub/br-pncp-contracts).