portaldecompraspublicas.com.br APIportaldecompraspublicas.com.br ↗
Access Brazilian public procurement data via 5 endpoints. Search tenders by state, status, modality, date range, and retrieve full process details and timelines.
curl -X GET 'https://api.parse.bot/scraper/94fb6edf-2207-48b6-9256-33b865eb528c/search_processes?uf=100143&page=1&modalidade=1' \ -H 'X-API-Key: $PARSE_API_KEY'
Search for procurement processes with various filters. Returns paginated results sorted by most recent publication date.
| Param | Type | Description |
|---|---|---|
| uf | string | State (UF) code from get_search_parameters ufs array (e.g. '100143' for RS, '100135' for SP). |
| page | string | Page number for pagination. |
| orgao | string | Government entity name to filter by. |
| objeto | string | Keyword/object search term (e.g. 'computadores', 'equipamento'). |
| status | string | Status code from get_search_parameters status array (e.g. '1' for Recebendo Propostas, '2' for Em Andamento, '3' for Finalizado). |
| processo | string | Process number to search for. |
| tipoData | string | Date type filter: '0' for Publication date, '1' for Opening date. |
| dataFinal | string | End date in YYYY-MM-DD format for date range filter. |
| municipio | string | Municipality code. Defaults to '0' (all municipalities). |
| julgamento | string | Judgment type code from get_search_parameters julgamentos array. |
| modalidade | string | Modality code from get_search_parameters modalidades array (e.g. '1' for Pregão, '3' for Dispensa). |
| realizacao | string | Realization type code from get_search_parameters realizacoes array (e.g. '1' for Eletrônico, '2' for Presencial). |
| dataInicial | string | Start date in YYYY-MM-DD format for date range filter. |
{
"type": "object",
"fields": {
"result": "array of procurement process summaries including codigoLicitacao, identificacao, numero, resumo, razaoSocial, status, tipoLicitacao, urlReferencia",
"quantidadePaginas": "integer total number of pages",
"quantidadeRegistros": "integer total number of matching records"
},
"sample": {
"data": {
"result": [
{
"numero": "013/2024",
"resumo": "CHAMAMENTO PÚBLICO PARA CREDENCIAMENTO DE PARECERISTAS PARA O SETOR CULTURAL DE ATIBAIA.",
"status": {
"codigo": 1,
"descricao": "Recebendo Propostas"
},
"razaoSocial": "Prefeitura Municipal da Estância de Atibaia",
"identificacao": "54.756/2024",
"isExclusivoME": false,
"tipoLicitacao": {
"tipoLicitacao": "Credenciamento",
"modalidadeLicitacao": "Credenciamento"
},
"urlReferencia": "/sp/prefeitura-municipal-da-estancia-de-atibaia-3319/cred-013-2024-2025-343584",
"codigoLicitacao": 343584
}
],
"quantidadePaginas": 5,
"quantidadeRegistros": 50
},
"status": "success"
}
}About the portaldecompraspublicas.com.br API
This API exposes 5 endpoints covering public procurement processes listed on Portal de Compras Públicas, a Brazilian government tender platform. The search_processes endpoint returns paginated tender summaries filterable by state (UF), status, keyword, date range, and government entity. Companion endpoints deliver full process details, chronological event timelines, and the complete set of valid filter codes needed to query the system.
What the API Covers
Portal de Compras Públicas aggregates public procurement notices from Brazilian government entities at the municipal and state level. The API provides structured access to this data across five endpoints. search_processes is the primary search surface, accepting filters for uf (state code), orgao (entity name), objeto (keyword), status, processo (process number), and a date range via tipoData, dataFinal. Results include codigoLicitacao, identificacao, numero, resumo, razaoSocial, status, tipoLicitacao, and urlReferencia fields per record, plus quantidadePaginas and quantidadeRegistros for pagination.
Process Detail and Timeline
get_process_detail accepts a slug taken from the urlReferencia field in search results and returns the complete record: resumo, tipoLicitacao, numeroProcesso, statusProcesso (with codigo and descricao), codigoLicitacao, and razaoSocialComprador. get_process_timeline takes the codigoLicitacao integer and returns frasesChat, an ordered array of event objects each containing apelido, dataHoraFrase, and frase. Newly published processes may return an empty frasesChat array with codigoUltimaFrase set to 0.
Filter Codes and Benefit Card Search
Before querying search_processes, call get_search_parameters to retrieve the valid code lists: ufs, status, julgamentos, modalidades, and realizacoes. Each entry carries a codigo and descricao. A separate endpoint, search_benefit_card_processes, runs a preset set of benefit-related keyword queries (vale refeição, vale alimentação, vale transporte, cartão benefício) and returns deduplicated results with a total_found count — useful for vendors specifically tracking benefit card tenders without constructing individual searches.
- Monitor new procurement notices in a specific Brazilian state by polling
search_processeswith the relevantufcode and astatusof 'Recebendo Propostas'. - Build a tender alert service that surfaces benefit card contracts using
search_benefit_card_processesand notifies sales teams of matching opportunities. - Aggregate buyer entity activity by filtering
search_processesbyorgaoand collectingrazaoSocialandtipoLicitacaoacross results. - Audit process history by pulling the full event log from
get_process_timelinefor a givencodigoLicitacaoand tracking document uploads and status changes. - Populate a procurement dashboard with live tender counts and pagination metadata (
quantidadePaginas,quantidadeRegistros) fromsearch_processes. - Validate and translate UF and status codes for a localized UI by querying
get_search_parametersonce and caching theufsandstatusarrays. - Track a specific tender end-to-end by resolving its
urlReferenciathroughget_process_detailand then fetching itsfrasesChattimeline.
| 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 Portal de Compras Públicas offer an official developer API?+
What does `get_search_parameters` return and why should I call it first?+
get_search_parameters returns five arrays: ufs (state codes), status, julgamentos (judgment types), modalidades (procurement modalities), and realizacoes (realization types). Each entry has a codigo and descricao. The search_processes endpoint requires numeric codes — not plain text — for fields like uf and status, so calling get_search_parameters first ensures you pass valid values.Are process documents or official notice attachments accessible through the API?+
How does pagination work in `search_processes`?+
quantidadePaginas (total pages) and quantidadeRegistros (total matching records). Pass the page parameter as a string to step through pages. There is no cursor mechanism — page-number pagination only.Does `get_process_timeline` always return events for a process?+
frasesChat array. In that case codigoUltimaFrase is 0. Events are system-generated and appear as the process progresses through document uploads, republications, and status changes, so timeline data grows over a process's lifecycle.