Portalcompraspublicas APIportalcompraspublicas.com.br ↗
Access Brazilian public tender data via 8 endpoints: listings, full details, items, documents, clarifications, winners, and filter parameters.
What is the Portalcompraspublicas API?
This API exposes 8 endpoints covering public procurement data from Brazil's Portal de Compras Públicas, spanning tender listings, full tender details, attached documents, clarification logs, and award results. The list_licitacoes endpoint lets you search and paginate across all active and historical tenders, filtering by state code, modality, status, and date range. Coverage spans all 27 Brazilian states and multiple procurement modalities including Pregão Eletrônico and others returned by get_search_parameters.
curl -X GET 'https://api.parse.bot/scraper/0885dad1-c891-4d2b-8aad-4da7804545e2/list_licitacoes?page=1&limit=5&objeto=ambulancia&data_final=2026-07-11&data_inicial=2026-06-11&codigo_status=1' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace portalcompraspublicas-com-br-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
from parse_apis.portal_de_compras_públicas_api import PortalCompras, TenderStatus, TenderNotFound
portal = PortalCompras()
# Discover filter parameters
params = portal.filterparams.get()
print(params.modalidades[0].codigo, params.modalidades[0].descricao)
# List all states
for state in portal.states.list():
print(state.codigo, state.descricao)
# Search for tenders receiving proposals
for tender in portal.tenders.search(codigo_status=TenderStatus.RECEBENDO_PROPOSTAS):
print(tender.codigo_licitacao, tender.numero, tender.resumo)
print(tender.status.descricao, tender.tipo_licitacao.modalidade_licitacao)
print(tender.unidade_compradora.nome_unidade_compradora, tender.unidade_compradora.uf)
# Get full detail via the URL slug
detail = tender.detail()
print(detail.tipo_pregao, detail.tipo_julgamento, detail.legislacao_aplicavel)
# List items for this tender
for item in tender.items.list():
print(item.codigo, item.descricao, item.quantidade, item.situacao.descricao)
# List attached documents
for doc in tender.documents.list():
print(doc.nome, doc.tipo, doc.url)
# List winners (awarded items)
for winner in tender.winners.list():
print(winner.codigo, winner.descricao, winner.melhor_lance)
break
List or search for public tenders (licitações) with optional filters and pagination. Returns paginated results ordered by most recent. Supports filtering by state, modality, status, date range, and keyword. Each result includes a urlReferencia slug for detail lookup and a codigoLicitacao for items/documents/clarifications/winners.
| Param | Type | Description |
|---|---|---|
| page | integer | Page number (1-based). |
| limit | integer | Number of results per page. |
| objeto | string | Search keyword for the tender object/description. |
| codigo_uf | integer | State (UF) code to filter by, from list_ufs or get_search_parameters. |
| data_final | string | End date filter in YYYY-MM-DD format. |
| data_inicial | string | Start date filter in YYYY-MM-DD format. |
| codigo_status | integer | Status code filter. |
| codigo_modalidade | integer | Modality code filter, from get_search_parameters. |
{
"type": "object",
"fields": {
"total": "integer total number of matching tenders",
"result": "array of tender summary objects",
"nextPage": "integer or null, next page number",
"pageCount": "integer total number of pages",
"currentPage": "integer current page number",
"previousPage": "integer or null, previous page number"
},
"sample": {
"data": {
"total": 386927,
"result": [
{
"numero": "01/2026",
"resumo": "Constitui-se objeto do presente Edital...",
"status": {
"codigo": 1,
"descricao": "Recebendo Propostas"
},
"razaoSocial": "Prefeitura Municipal de Porto Grande",
"tipoLicitacao": {
"tipoLicitacao": "Chamamento Público",
"tipoJulgamento": "Maior Pontuação",
"tipoRealizacao": "Eletrônico",
"codigoTipoLicitacao": 30,
"modalidadeLicitacao": "Chamamento Público - 13.019"
},
"urlReferencia": "/ap/prefeitura-municipal-de-porto-grande-3447/cmp-01-2026-2026-485985",
"codigoLicitacao": 485985,
"unidadeCompradora": {
"uf": "AP",
"cidade": "Porto Grande",
"nomeUnidadeCompradora": "Prefeitura Municipal de Porto Grande",
"codigoUnidadeCompradora": 6098
},
"dataHoraPublicacao": "2026-06-09T12:48:00Z"
}
],
"nextPage": 2,
"pageCount": 38693,
"currentPage": 1,
"previousPage": null
},
"status": "success"
}
}About the Portalcompraspublicas API
Tender Listings and Details
The list_licitacoes endpoint returns paginated tender summaries, each including codigoLicitacao, numero, resumo, razaoSocial, status, and urlReferencia. You can narrow results using objeto (keyword search on the tender description), codigo_uf (state code), codigo_modalidade, codigo_status, and date range filters data_inicial/data_final. Status codes cover active states like 1 (Recebendo Propostas), 2 (Em Andamento), and 3 (Finalizado), among others. To get the full record for any tender, pass its urlReferencia slug to get_licitacao_detail, which returns fields including tipoPregao, numeroProcesso, dataHoraAbertura, statusProcesso, and razaoSocialComprador.
Items, Documents, and Clarifications
list_licitacao_items takes a codigo_licitacao and returns either flat items or lot-grouped items depending on the isLote boolean in the response — when true, results are nested under lotes; when false, under itens.result. list_documents returns all attachments for a tender, including the document nome, tipo (Edital, Documento Anexo, Relatorio, Documento), and a download url — note that some entries have a null url and instead use tipoDownLoad and parametros fields to construct dynamic links. list_clarifications returns the tender's chat log as frasesChat objects with apelido, dataHoraFrase, and frase, paginated in reverse chronological order.
Winners and Reference Data
list_licitacao_winners scans a tender's items and returns those with situacao codes 7 (Homologado), 8 (Adjudicado), or 9 in the vencedores array, alongside a totalVencedores count. For tenders that are still open, this returns an empty array. Two utility endpoints support filter construction: list_ufs returns all 27 state codes and abbreviations, and get_search_parameters returns a superset including valid modalidades, status, julgamentos, and realizacoes arrays — useful for building a complete filter UI or validating inputs before querying.
The Portalcompraspublicas API is a managed, monitored endpoint for portalcompraspublicas.com.br — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when portalcompraspublicas.com.br changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official portalcompraspublicas.com.br API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Monitor new public tenders in a specific Brazilian state by filtering
list_licitacoeswithcodigo_ufanddata_inicial - Track award outcomes by polling
list_licitacao_winnersfor tenders approaching their closing date - Download and archive all tender documents using the
urlandtipoDownLoadfields fromlist_documents - Build a supplier alert system that matches
objetokeywords in tender descriptions to company product categories - Audit procurement activity for a specific buying organization using
razaoSocialCompradorfromget_licitacao_detail - Analyze clarification patterns by extracting Q&A threads from
list_clarificationsacross multiple tenders - Populate a tender search UI with valid filter options using
get_search_parametersfor modalities, statuses, and states
| 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 | 100 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 Portal de Compras Públicas have an official developer API?+
How does `list_licitacao_items` handle tenders with lots versus individual items?+
isLote boolean. When false, item records appear under itens.result. When true, they are grouped under lotes with their own paginated result array. Check isLote first before traversing the response.Some document entries in `list_documents` have a null `url` — what does that mean?+
tipoDownLoad integer and parametros fields are used instead of a direct URL. The specific document link must be constructed from those fields rather than read directly from url.Does the API expose supplier bid amounts or proposal details for active tenders?+
list_licitacao_winners) and clarification chat logs, but individual supplier bid amounts during the active bidding phase are not exposed. You can fork this API on Parse and revise it to add an endpoint covering proposal data if that becomes available.Can I filter tenders by municipality rather than just by state?+
list_licitacoes endpoint filters by codigo_uf (state level) and keyword (objeto), but there is no dedicated municipality-level filter parameter. You can fork this API on Parse and revise it to add municipality filtering if the underlying data supports it.