Discover/Portaldecompraspublicas API
live

Portaldecompraspublicas 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.

Endpoint health
verified 4d ago
search_benefit_card_processes
get_process_timeline
get_process_detail
get_search_parameters
search_processes
5/5 passing latest checkself-healing
Endpoints
5
Updated
21d ago

What is the Portaldecompraspublicas 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.

Try it
State (UF) code from get_search_parameters ufs array (e.g. '100143' for RS, '100135' for SP).
Page number for pagination (1-based).
Government entity name to filter by.
Keyword/object search term to match against process summaries (e.g. 'computadores', 'equipamento').
Status code: '1' for Recebendo Propostas, '2' for Em Andamento, '3' for Finalizado, '4' for Iminência de deserto, '25' for Em Republicação.
Process number to search for.
Date type filter: '1' for Publication date, '2' for Opening date. Must be provided when using dataInicial/dataFinal.
End date in YYYY-MM-DD format for date range filter.
Municipality code. Defaults to '0' (all municipalities).
Judgment type code from get_search_parameters julgamentos array.
Modality code from get_search_parameters modalidades array (e.g. '1' for Pregão, '3' for Dispensa).
Realization type code: '1' for Eletrônico, '2' for Presencial, '3' for Simples informação.
Start date in YYYY-MM-DD format for date range filter.
api.parse.bot/scraper/94fb6edf-2207-48b6-9256-33b865eb528c/<endpoint>
Ready to send
Fill in the parameters and hit sign in to send to see live response data here.
Call it over HTTPgrab a free API key at signup
curl -X GET 'https://api.parse.bot/scraper/94fb6edf-2207-48b6-9256-33b865eb528c/search_processes?uf=100143&page=1&objeto=computadores&status=1&municipio=0&julgamento=1&modalidade=1&realizacao=1' \
  -H 'X-API-Key: $PARSE_API_KEY'
Python SDK · recommended

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 portaldecompraspublicas-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.

"""Walkthrough: Portal de Compras Públicas SDK — search procurement processes, drill into details and timelines."""
from parse_apis.portal_de_compras_públicas_api import PortalCompras, ProcessStatus, RealizationType, ProcessNotFound

client = PortalCompras()

# Search for electronic procurement processes currently receiving proposals
for process in client.processes.search(query="computadores", status=ProcessStatus.RECEBENDO_PROPOSTAS, limit=5):
    print(process.resumo, process.razao_social, process.status.descricao)

# Drill into one process for full details
process = client.processes.search(query="equipamento", realizacao=RealizationType.ELETRONICO, limit=1).first()
if process:
    detail = process.details()
    print(detail.numero_processo, detail.tipo_licitacao, detail.tipo_julgamento, detail.legislacao_aplicavel)

    # Walk the process timeline — document uploads, status changes
    for event in process.timeline(limit=3):
        print(event.data_hora_frase, event.apelido, event.frase[:80])

# Fetch available filter options for building search queries
filters = client.filters.get()
print(filters.modalidades[0].codigo, filters.modalidades[0].descricao)

# Typed error handling: catch a not-found when the slug is stale
try:
    stale = client.processes.search(query="licitação", limit=1).first()
    if stale:
        _ = stale.details()
except ProcessNotFound as exc:
    print(f"Process gone: {exc}")

print("exercised: processes.search / process.details / process.timeline / filters.get")
All endpoints · 5 totalmissing one? ·

Search for procurement processes with various filters. Returns paginated results sorted by most recent publication date. Each result includes process identification, buyer info, status, modality, and a URL slug for fetching full details. Pagination via integer page counter; the response includes total pages and current page position.

Input
ParamTypeDescription
ufstringState (UF) code from get_search_parameters ufs array (e.g. '100143' for RS, '100135' for SP).
pageintegerPage number for pagination (1-based).
orgaostringGovernment entity name to filter by.
objetostringKeyword/object search term to match against process summaries (e.g. 'computadores', 'equipamento').
statusstringStatus code: '1' for Recebendo Propostas, '2' for Em Andamento, '3' for Finalizado, '4' for Iminência de deserto, '25' for Em Republicação.
processostringProcess number to search for.
tipoDatastringDate type filter: '1' for Publication date, '2' for Opening date. Must be provided when using dataInicial/dataFinal.
dataFinalstringEnd date in YYYY-MM-DD format for date range filter.
municipiostringMunicipality code. Defaults to '0' (all municipalities).
julgamentostringJudgment type code from get_search_parameters julgamentos array.
modalidadestringModality code from get_search_parameters modalidades array (e.g. '1' for Pregão, '3' for Dispensa).
realizacaostringRealization type code: '1' for Eletrônico, '2' for Presencial, '3' for Simples informação.
dataInicialstringStart date in YYYY-MM-DD format for date range filter.
Response
{
  "type": "object",
  "fields": {
    "total": "integer total number of matching records",
    "result": "array of procurement process summaries",
    "nextPage": "integer or null next page number",
    "pageCount": "integer total number of pages",
    "currentPage": "integer current page number"
  }
}

About the Portaldecompraspublicas API

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.

Reliability & maintenanceVerified

The Portaldecompraspublicas API is a managed, monitored endpoint for portaldecompraspublicas.com.br — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when portaldecompraspublicas.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 portaldecompraspublicas.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.

Last verified
4d ago
Latest check
5/5 endpoints passing
Maintenance
Monitored & self-healing
Will this API break when the source site changes?+
It's built not to. Every endpoint is health-checked on a schedule with automated test probes. When the source site changes and a check fails, the API is automatically queued for repair and re-verified — that's the self-healing layer. Each API page shows when its endpoints were last verified. And because marketplace APIs are shared, any fix reaches everyone using it.
Is this an official API from the source site?+
No — Parse APIs are independent, managed REST wrappers over publicly available data. That is the point: where a site has no official API (or only a limited one), Parse gives you a maintained, monitored endpoint for that data and keeps it working as the site changes — so you get a stable contract over a source that never promised one.
Can I fix or extend this API myself if I need a new endpoint or field?+
Yes — and you don't have to wait on us. This API was generated by the Parse agent, which stays attached. Describe the change in plain English ("add an endpoint that returns reviews", "fix the price field") in the revise box on the API page or via the revise_api MCP tool, and the agent rebuilds it against the live site in minutes. Contributing the change back to the public API is free.
What happens if I call an endpoint that has an issue?+
Errors are machine-readable: a bad call returns a clean status with the list of available endpoints and a repair hint, so an agent (or you) can recover or trigger a fix instead of failing silently. Confirmed failures feed the automatic repair queue.
Common use cases
  • Monitor new procurement notices in a specific Brazilian state by polling search_processes with the relevant uf code and a status of 'Recebendo Propostas'.
  • Build a tender alert service that surfaces benefit card contracts using search_benefit_card_processes and notifies sales teams of matching opportunities.
  • Aggregate buyer entity activity by filtering search_processes by orgao and collecting razaoSocial and tipoLicitacao across results.
  • Audit process history by pulling the full event log from get_process_timeline for a given codigoLicitacao and tracking document uploads and status changes.
  • Populate a procurement dashboard with live tender counts and pagination metadata (quantidadePaginas, quantidadeRegistros) from search_processes.
  • Validate and translate UF and status codes for a localized UI by querying get_search_parameters once and caching the ufs and status arrays.
  • Track a specific tender end-to-end by resolving its urlReferencia through get_process_detail and then fetching its frasesChat timeline.
Pricing & limitsSee full pricing →
TierPriceCredits/monthRate limit
Free$0/mo1005 req/min
Hobby$30/mo1,00020 req/min
Developer$100/mo5,000100 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.

Frequently asked questions
Does Portal de Compras Públicas offer an official developer API?+
Portal de Compras Públicas does not publish a documented public developer API. Access to structured procurement data is not offered through an official developer program.
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?+
Not currently. The API covers process metadata, buyer information, status, and timeline events, but does not return file attachments or links to edital (notice) documents. You can fork the API on Parse and revise it to add an endpoint that retrieves document attachments for a given process.
How does pagination work in `search_processes`?+
Results are sorted by most recent publication date. The response includes 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?+
No. Newly opened processes may return an empty 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.
Page content last updated . Spec covers 5 endpoints from portaldecompraspublicas.com.br.
Related APIs in Government PublicSee all →
portalcompraspublicas.com.br API
Search and access detailed information about public tenders, bids, and procurement documents from Brazilian municipalities and states. Retrieve tender items, clarification logs, winner details, and all related documentation to monitor and analyze public purchasing activity across Brazil.
portaltransparencia.gov.br API
Search and analyze Brazilian government spending, including public expenses, contracts, civil servant salaries, benefits, travel records, and sanctions data. Track government transparency information by department, budget programs, and public tenders all in one place.
pncp.gov.br API
Search and retrieve detailed information about Brazil's public procurement contracts, including bidding results, price registries, and annual contracting plans from the official PNCP portal. Monitor government procurement activities by looking up specific contracts, procurement processes, and procurement records all in one place.
licitacoes-e.com API
Search and analyze Brazilian public tenders from Banco do Brasil, including filtering by buyer and tender status to find procurement opportunities. Get detailed information about specific tenders to track bids, deadlines, and procurement details.
alertalicitacao.com.br API
Search and browse Brazilian government procurement opportunities (licitações) by keyword or state to find relevant bidding announcements. Access detailed information about individual procurement listings and discover available opportunities across different Brazilian states.
licitaja.com.br API
Search Brazilian government procurement bids by keyword and filter by specific agencies to find tender opportunities, with access to details like estimated values, bid timelines, descriptions, and itemized lots. Get AI-generated summaries and direct links to bid documents (edital) to help you quickly evaluate procurement opportunities.
transparenciaportal.gov.br API
Track and analyze Brazilian government spending by accessing detailed records on politician amendments, public servant salaries, beneficiary payments, and government payment card transactions. Monitor how public funds are allocated across different government bodies and identify spending patterns through comprehensive financial data from Brazil's official transparency portal.
biddingo.com API
Search and filter government procurement bids and RFPs across different regions and categories to find relevant opportunities. Access detailed project descriptions and bid information to help you discover and evaluate contracting opportunities that match your business needs.