Discover/Gov API
live

Gov APItransparenciaportal.gov.br

Access Brazilian federal transparency data: parliamentary amendments, public servant records, payment card transactions, and beneficiary expenditures via 5 structured endpoints.

Endpoint health
verified 4d ago
get_despesas_recursos_recebidos
get_servidores
get_emendas
get_cartoes
get_despesas_favorecido
5/5 passing latest checkself-healing
Endpoints
5
Updated
21d ago

What is the Gov API?

This API exposes 5 endpoints covering Brazilian federal government financial records from transparenciaportal.gov.br, including parliamentary amendments, public servant rosters, and payment card transactions. The get_emendas endpoint returns amendment spending broken down by author, program, and budget action, while get_servidores delivers paginated federal employee records with CPF, name, agency, and employment status.

Try it
Year to query amendments for in YYYY format.
Maximum number of results per page.
Pagination offset (number of records to skip).
api.parse.bot/scraper/62c5c8b9-c58a-4896-8b8d-66c2b87eb1b7/<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/62c5c8b9-c58a-4896-8b8d-66c2b87eb1b7/get_emendas?year=2024&limit=5&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 transparenciaportal-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 — Brazilian government transparency data."""
from parse_apis.portal_da_transparência_api import (
    Transparencia, ExpensePhase, TokenExtractionFailed
)

client = Transparencia()

# List parliamentary amendments for 2024
for amendment in client.amendments.list(year="2024", limit=3):
    print(amendment.autor, amendment.funcao, amendment.valorPago)

# List government payment card transactions for a period
card = client.cardtransactions.list(date_from="01/01/2024", date_to="31/01/2024", limit=1).first()
if card:
    print(card.tipoCartao, card.portador, card.orgaoSuperior)

# List expenditures filtered by phase (Empenho) using the enum
for exp in client.expenditures.list(
    date_from="01/01/2024", date_to="31/01/2024",
    fase=ExpensePhase.EMPENHO, limit=3
):
    print(exp.favorecido, exp.valor, exp.fase)

# Typed error handling on public servants listing
try:
    servant = client.publicservants.list(limit=1).first()
    if servant:
        print(servant.nome, servant.cargo, servant.situacao)
except TokenExtractionFailed as exc:
    print(f"Token extraction failed: {exc}")

print("exercised: amendments.list / cardtransactions.list / expenditures.list / publicservants.list")
All endpoints · 5 totalmissing one? ·

Get parliamentary amendments (spending by politicians) for a specific year. Returns paginated results ordered by author. Each amendment includes budget details such as committed, liquidated, and paid values across multiple government functions and programs. Pagination is offset-based: advance by incrementing offset by limit.

Input
ParamTypeDescription
yearstringYear to query amendments for in YYYY format.
limitintegerMaximum number of results per page.
offsetintegerPagination offset (number of records to skip).
Response
{
  "type": "object",
  "fields": {
    "data": "array of amendment objects with fields like autor, tipoEmenda, valorEmpenhado, valorPago, funcao, programa, acao",
    "draw": "integer draw counter",
    "recordsTotal": "integer total number of records available",
    "recordsFiltered": "integer total filtered records"
  },
  "sample": {
    "data": {
      "data": [
        {
          "ano": 2024,
          "acao": "8581 - ESTRUTURACAO DA REDE DE SERVICOS DE ATENCAO PRIMARIA A SAUDE",
          "autor": "4290 - ABILIO BRUNINI",
          "funcao": "Saúde",
          "programa": "5119 - ATENCAO PRIMARIA A SAUDE",
          "subfuncao": "Atenção básica",
          "valorPago": "1.748.960,00",
          "tipoEmenda": "Emenda Individual - Transferências com Finalidade Definida",
          "codigoEmenda": "202442900001",
          "numeroEmenda": "0001",
          "valorEmpenhado": "2.359.960,00",
          "valorLiquidado": "1.748.960,00",
          "valorRestoPago": "611.000,00",
          "localidadeDoGasto": "MÚLTIPLO",
          "valorRestoInscrito": "611.000,00",
          "valorRestoCancelado": "0,00"
        }
      ],
      "draw": 0,
      "error": null,
      "recordsTotal": 9223372036854776000,
      "recordsFiltered": 9223372036854776000
    },
    "status": "success"
  }
}

About the Gov API

What the API Covers

Five endpoints map directly to major datasets published by Brazil's Portal da Transparência. get_emendas queries parliamentary amendments by year (year in YYYY format) and returns per-amendment fields including autor, tipoEmenda, valorEmpenhado (committed value), valorPago (paid value), funcao, programa, and acao. get_despesas_favorecido drills into expenditures by beneficiary across three budget phases — Empenho (1), Liquidação (2), and Pagamento (3) — selectable via the fase parameter, with results sorted by value descending.

Payment Cards and Beneficiary Transfers

get_cartoes returns government payment card transactions filtered by date range (date_from / date_to in DD/MM/YYYY format). Each record includes tipoCartao, orgaoSuperior, portador, valorTotal, and dataTransacao. get_despesas_recursos_recebidos covers resources received by beneficiaries over a given period, returning mesAno, favorecido, tipoFavorecido, ufFavorecido, municipioFavorecido, and valorRecebido — useful for mapping transfers by state or municipality.

Public Servants

get_servidores provides federal public servant data paginated by name. Each record includes tipo, cpf, nome, orgaoServidorLotacao (agency of assignment), matricula, situacao (employment status), cargo, and funcao. All five endpoints share a consistent pagination model using limit and offset parameters, and every response includes recordsTotal and recordsFiltered counts alongside the data array.

Reliability & maintenanceVerified

The Gov API is a managed, monitored endpoint for transparenciaportal.gov.br — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when transparenciaportal.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 transparenciaportal.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
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
  • Track how individual parliamentarians allocate amendment budgets (valorEmpenhado, valorPago) across programs and budget actions.
  • Audit government payment card usage by cardholder (portador) and issuing agency (orgaoSuperior) over custom date ranges.
  • Build a directory of federal public servants filtered by agency (orgaoServidorLotacao) and employment status (situacao).
  • Map federal transfers to municipalities using municipioFavorecido and ufFavorecido from the resources-received endpoint.
  • Compare expenditure commitment versus payment phases for the same beneficiary using fase values 1, 2, and 3 in get_despesas_favorecido.
  • Monitor year-over-year shifts in parliamentary amendment spending by querying get_emendas across multiple year values.
  • Identify top beneficiaries of federal spending by sorting get_despesas_favorecido results, which are pre-ordered by value descending.
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 transparenciaportal.gov.br have an official developer API?+
Yes. The Portal da Transparência offers an official open data API documented at https://api.portaldatransparencia.gov.br/. It requires registration for an API key. This Parse API provides a structured alternative with consistent pagination and no key registration needed on your end.
What does `get_emendas` return and how do I scope it to a specific year?+
It returns an array of amendment objects with fields including autor, tipoEmenda, valorEmpenhado, valorPago, funcao, programa, and acao. Pass the year parameter in YYYY format to filter results to a specific budget year. Results are ordered by author name and support limit/offset pagination.
Can I filter public servant records by agency or employment status?+
get_servidores currently returns all federal public servants paginated by name. The response includes orgaoServidorLotacao and situacao fields per record, so you can filter client-side, but the endpoint does not accept agency or status as query parameters. You can fork this API on Parse and revise it to add server-side filtering by those fields.
Are state or municipal government expenditures covered?+
Not currently. All five endpoints cover federal-level data from the Portal da Transparência. State and municipal transparency portals are separate systems. You can fork this API on Parse and revise it to add endpoints pointing at state-level portals that expose comparable data.
How fresh is the data returned by `get_cartoes` and `get_despesas_recursos_recebidos`?+
Both endpoints reflect whatever the Portal da Transparência has published at query time. The portal typically updates payment and transfer data with a lag of a few weeks to one month relative to the transaction date. Use the date_to and date_from parameters to bound your queries and avoid pulling ranges where data may be incomplete.
Page content last updated . Spec covers 5 endpoints from transparenciaportal.gov.br.
Related APIs in Government PublicSee all →
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.
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.
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.
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.
diariodarepublica.pt API
Search and retrieve official Portuguese legislation, decrees, and resolutions published in the Diário da República, organized by publication series and date. Browse acts from both Serie I and Serie II to stay updated on the latest government publications and legal announcements.