Discover/Gov API
live

Gov APIportaltransparencia.gov.br

Access Brazilian federal government data: public expenses, contracts, civil servants, benefits, travel records, sanctions, and tenders via a single structured API.

Endpoint health
verified 4d ago
get_server_details
list_servers
search_public_expenses
list_contracts
list_benefits
9/9 passing latest checkself-healing
Endpoints
10
Updated
21d ago

What is the Gov API?

This API exposes 10 endpoints covering Brazil's Federal Government Transparency Portal (portaltransparencia.gov.br), returning structured data on public expenditures, contracts, civil servants, sanctions, and more. The list_contracts endpoint alone returns fields like numeroContrato, dataAssinatura, situacao, and valorContratado. All monetary values are denominated in Brazilian Real, and every endpoint supports pagination via limit and offset parameters.

Try it
Start date in DD/MM/YYYY format.
End date in DD/MM/YYYY format.
Maximum number of results per page.
Pagination offset (number of records to skip).
api.parse.bot/scraper/9e04b0c7-3205-4861-90a2-170abdecae1d/<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/9e04b0c7-3205-4861-90a2-170abdecae1d/search_public_expenses?de=01%2F01%2F2024&ano=2026&ate=31%2F03%2F2024&mes=2&limit=3&offset=0' \
  -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 portaltransparencia-gov-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 da Transparência SDK — bounded, re-runnable; every call capped."""
from parse_apis.portal_da_transparência_api import Transparencia, NotFoundError

transparencia = Transparencia()

# Search public expenses for Q1 2024
for expense in transparencia.expenses.search(de="01/01/2024", ate="31/03/2024", limit=3):
    print(expense.mes_ano, expense.orgao_superior, expense.valor_despesa_paga)

# List civil servants named "MARIA" and drill into one's remuneration details
server = transparencia.servers.list(name="MARIA", limit=1).first()
if server:
    print(server.nome, server.cargo, server.situacao)
    detail = server.details.get()
    for remuneration in detail.remunerations[:2]:
        print(remuneration.period, remuneration.data)

# List government contracts
for contract in transparencia.contracts.list(de="01/01/2024", ate="31/03/2024", limit=3):
    print(contract.numero_contrato, contract.orgao_superior, contract.valor_contratado)

# Check administrative sanctions with typed error handling
try:
    for sanction in transparencia.sanctions.list(limit=3):
        print(sanction.nome_sancionado, sanction.cadastro, sanction.cpf_cnpj)
except NotFoundError as exc:
    print(f"not found: {exc}")

print("exercised: expenses.search / servers.list / server.details.get / contracts.list / sanctions.list")
All endpoints · 10 totalmissing one? ·

Search public expenditure records by period. Returns paginated results ordered by month/year descending. Each record includes the government organ, budget function, expense group, and committed/liquidated/paid amounts in Brazilian Real format.

Input
ParamTypeDescription
destringStart date in DD/MM/YYYY format.
atestringEnd date in DD/MM/YYYY format.
limitintegerMaximum number of results per page.
offsetintegerPagination offset (number of records to skip).
Response
{
  "type": "object",
  "fields": {
    "data": "array of expenditure records with fields like mesAno, orgaoSuperior, funcao, valorDespesaEmpenhada, valorDespesaPaga",
    "draw": "integer draw counter",
    "error": "string or null error message",
    "recordsTotal": "integer total records available",
    "recordsFiltered": "integer total filtered records"
  },
  "sample": {
    "data": {
      "data": [
        {
          "funcao": "14 - Direitos da cidadania",
          "mesAno": "03/2024",
          "subFuncao": "122 - Administração geral",
          "orgaoSuperior": "84000 - Ministério dos Povos Indígenas",
          "valorDespesaPaga": "1.369.506,80",
          "valorDespesaEmpenhada": "124.557,24"
        }
      ],
      "draw": 0,
      "error": null,
      "recordsTotal": 9223372036854776000,
      "recordsFiltered": 9223372036854776000
    },
    "status": "success"
  }
}

About the Gov API

Public Expenditure Data

Three endpoints cover federal spending from different angles. search_public_expenses returns individual expenditure records with fields mesAno, orgaoSuperior, funcao, valorDespesaEmpenhada, valorDespesaPaga, and related amounts, filterable by date range using de and ate in DD/MM/YYYY format. get_expenses_by_organ aggregates the same budget execution data per government organ, useful for comparing committed vs. paid amounts across ministries. get_expenses_by_functional_programmatic breaks spending down by funcao and subFuncao budget classification categories.

Civil Servants and Benefits

list_servers returns a paginated roster of federal civil servants with masked CPF, organ assignment (orgaoServidorLotacao), position (cargo), and employment status (situa). An optional name substring filter narrows results. To get salary history, pass the numeric portion of idComFlagExisteDetalhamentoServidor (everything before the underscore) to get_server_details, which returns monthly remuneration breakdowns alongside name, state (UF), and masked CPF. list_benefits covers social benefit program disbursements at the state and municipality level, including uf, municipio, mesAno, and valor.

Contracts, Tenders, Travel, and Sanctions

list_contracts returns public procurement contracts with signing date, validity, contracting organ, contract value, and status. list_public_tenders covers procurement tenders with fields idLicitacao, modalidade, dataAbertura, and dataResultadoCompra, ordered by result date. list_travel exposes official government travel records including traveler name, destination (destinos), organ, total cost (valorTotal), and an urgency flag, ordered by departure date. list_sanctions returns CEIS/CEPIM registry entries for sanctioned individuals and entities, including cpfCnpj, nomeSancionado, cadastro, and dataInicialSancao.

Pagination and Date Filtering

All endpoints return recordsTotal and recordsFiltered alongside a draw counter, making it straightforward to implement cursor-style pagination. Date range filters (de, ate) accept DD/MM/YYYY strings. list_sanctions does not expose date filtering — it returns all records subject to pagination only.

Reliability & maintenanceVerified

The Gov API is a managed, monitored endpoint for portaltransparencia.gov.br — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when portaltransparencia.gov.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 portaltransparencia.gov.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
9/9 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 monthly federal spending by ministry using get_expenses_by_organ and track changes in valorDespesaPaga over time.
  • Build a contractor due-diligence tool by cross-referencing list_contracts vendor data against list_sanctions CEIS/CEPIM entries.
  • Audit civil servant payroll by retrieving remuneration history via get_server_details using IDs sourced from list_servers.
  • Track social program disbursements by state and municipality using list_benefits with uf and municipio fields.
  • Analyze procurement activity by querying list_public_tenders for tender modalities and result dates within a given period.
  • Flag government travel expense anomalies by querying list_travel for high valorTotal records or urgency-flagged trips.
  • Map budget allocation by functional category using get_expenses_by_functional_programmatic across funcao and subFuncao fields.
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 portaltransparencia.gov.br have an official developer API?+
Yes. The Brazilian government publishes an official open data API at https://api.portaltransparencia.gov.br, which requires a registration key. This Parse API provides a structured alternative that covers expenditures, contracts, servants, benefits, travel, sanctions, and tenders without requiring separate registration.
How does the civil servant lookup work across `list_servers` and `get_server_details`?+
list_servers returns a paginated list of federal employees. Each record includes an idComFlagExisteDetalhamentoServidor field formatted as {numericId}_{flag} (e.g. 3604575_1). To retrieve monthly remuneration history and personal details for a specific servant, pass only the numeric portion before the underscore to get_server_details as the server_id parameter.
Can I filter sanctions records by date range or by sanction type (CEIS vs CEPIM)?+
list_sanctions does not currently support date or registry-type filtering — it returns all available sanction records ordered by sanctioned entity name, paginated via limit and offset. The cadastro field in each record identifies the registry type (CEIS or CEPIM). You can fork this API on Parse and revise it to add a filter parameter for cadastro or dataInicialSancao.
Does the API cover state-level (estadual) or municipal government spending, not just federal?+
Not currently. All expenditure, contract, tender, and travel endpoints cover the federal government only. list_benefits includes state (uf) and municipality (municipio) fields, but those reflect where federal social benefits were disbursed, not state budget execution. You can fork this API on Parse and revise it to target state transparency portals where available.
Are contracted values and expenses returned as numbers or formatted strings?+
Monetary fields such as valorDespesaEmpenhada, valorDespesaPaga, and valorContratado are returned in Brazilian Real format as strings (e.g. "R$ 1.234,56"). Downstream applications that need numeric computation should parse these strings to floats before processing.
Page content last updated . Spec covers 10 endpoints from portaltransparencia.gov.br.
Related APIs in Government PublicSee all →
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.
portaldecompraspublicas.com.br API
Search and retrieve Brazilian public procurement processes from Portal de Compras Públicas. Access tender listings with filters for state, municipality, modality, date range, and status, and retrieve full process details including timelines, buyer information, and official notice data.
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.
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.
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.
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.
usaspending.gov API
usaspending.gov API