pncp.gov.br APIpncp.gov.br ↗
Access Brazilian government procurement data via the PNCP API. Search contracts, procurement processes, price registration records, and annual contracting plans.
curl -X GET 'https://api.parse.bot/scraper/50f76ddd-10ad-418f-92f3-d9de4c403747/search_contratos?pagina=1&data_final=20250110&data_inicial=20250101&tamanho_pagina=10' \ -H 'X-API-Key: $PARSE_API_KEY'
Search for signed contracts (contratos/empenhos) by publication date range. Returns detailed information including contractor, values, and location. Page size is restricted by the upstream API; use 10, 20, or 50.
| Param | Type | Description |
|---|---|---|
| pagina | integer | Page number. |
| data_finalrequired | string | End date in YYYYMMDD format (e.g. 20250110). |
| data_inicialrequired | string | Start date in YYYYMMDD format (e.g. 20250101). |
| tamanho_pagina | integer | Results per page. Accepted values: 10, 20, 50. |
{
"type": "object",
"fields": {
"data": "array of contract records with contractor, values, dates, and organization details",
"totalPaginas": "total number of pages",
"totalRegistros": "total number of matching records"
},
"sample": {
"data": {
"data": [
{
"valorGlobal": 7000,
"orgaoEntidade": {
"cnpj": "00394460005887",
"razaoSocial": "MINISTERIO DA ECONOMIA"
},
"objetoContrato": "Alienação de mercadorias apreendidas pela Receita Federal",
"dataPublicacaoPncp": "2025-01-01T00:30:03",
"numeroControlePNCP": "00394460005887-2-007096/2024",
"nomeRazaoSocialFornecedor": "IMPERIO TRANSPORTES TURISTICOS LTDA"
}
],
"totalPaginas": 2720,
"totalRegistros": 27192
},
"status": "success"
}
}About the pncp.gov.br API
The PNCP API provides access to Brazil's National Public Procurement Portal across 6 endpoints, returning contracts, procurement processes (contratações), price registration records (atas), and annual contracting plans. The search_contratacoes endpoint lets you filter procurement processes by date range and modality code, while get_contratacao_detail returns full details on a single process including estimated and approved values.
Contracts and Procurement Processes
The search_contratos endpoint returns signed contracts and empenhos published within a given date range. Each record includes contractor identity, monetary values, publication dates, and the contracting organization. Pagination is controlled via pagina and tamanho_pagina, with accepted page sizes of 10, 20, or 50. The response includes totalPaginas and totalRegistros to help iterate over large result sets.
The search_contratacoes endpoint searches active procurement processes by date range and requires a modalidade code (for example, 8 for Dispensa de Licitação). Results include the procurement object, organization CNPJ, legal basis, and estimated values. Once you have a result, you can feed its sequencialCompra, organization cnpj, and ano fields directly into get_contratacao_detail to retrieve the full record — including objetoCompra, modalidadeNome, situacaoCompraNome, valorTotalEstimado, and valorTotalHomologado.
Price Registration Records and Annual Plans
The search_atas endpoint queries Atas de Registro de Preços — standing price agreements — by validity date range. Each record contains the managing organization, validity window, and procurement object description. These are commonly used to track framework agreements across Brazilian federal and state entities.
The search_pca endpoint covers Annual Contracting Plans (Plano de Contratações Anual) at the organization level. Note that date parameters influence result ordering rather than applying strict date-range filtering — results are returned ordered by most recent update. For a broader cross-document search, search_all accepts a free-text query and optional tipo_documento filter (edital, ata, contrato, or pcaorgao), returning matched items with title, description, organization, and value fields.
- Monitor newly signed government contracts by querying
search_contratosfor a specific date range and filtering by organization CNPJ. - Track procurement processes of a specific modality (e.g., Dispensa) using
search_contratacoeswith a modalidade code. - Retrieve full procurement details including approved values and status from
get_contratacao_detailusing sequencialCompra from search results. - Audit price registration agreements across agencies by pulling
search_atasrecords within a validity period. - Build a procurement intelligence feed by combining
search_allkeyword queries withtipo_documentofilters for contracts or editals. - Compile organization-level annual spending plans via
search_pcafor budget transparency reporting. - Cross-reference contractor CNPJs across contracts and procurement processes to analyze supplier patterns.
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 250 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does PNCP have an official developer API?+
What does `get_contratacao_detail` return that the search endpoints don't?+
get_contratacao_detail returns the full procurement record for a single process, including objetoCompra (detailed description), modalidadeNome, situacaoCompraNome (current status), valorTotalEstimado, and valorTotalHomologado (the formally approved value). The search endpoints return summary-level fields and are intended for discovery, not full record retrieval.How does date filtering work in `search_pca`?+
search_pca, the data_inicial and data_final parameters influence the ordering of results rather than applying strict date-range filtering. Results are returned ordered by most recent update. If you need strictly date-bounded PCA results, you should filter the returned records on your side after fetching.Does the API return procurement item-level line data (e.g., individual items within a contract)?+
Are procurement documents or attached files accessible through this API?+
objetoCompra, dates, and values, but does not return binary attachments or document URLs from the procurement dossier. You can fork this API on Parse and revise it to add an endpoint targeting document or attachment references for a given procurement process.