transparenciaportal.gov.br APItransparenciaportal.gov.br ↗
Access Brazilian federal transparency data: parliamentary amendments, public servant records, payment card transactions, and beneficiary expenditures via 5 structured endpoints.
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'
Get parliamentary amendments (spending by politicians) for a specific year. Returns paginated results ordered by author.
| Param | Type | Description |
|---|---|---|
| year | string | Year to query amendments for in YYYY format. |
| limit | integer | Maximum number of results per page. |
| offset | integer | Pagination offset (number of records to skip). |
{
"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 transparenciaportal.gov.br 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.
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.
- 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
municipioFavorecidoandufFavorecidofrom the resources-received endpoint. - Compare expenditure commitment versus payment phases for the same beneficiary using
fasevalues 1, 2, and 3 inget_despesas_favorecido. - Monitor year-over-year shifts in parliamentary amendment spending by querying
get_emendasacross multipleyearvalues. - Identify top beneficiaries of federal spending by sorting
get_despesas_favorecidoresults, which are pre-ordered by value descending.
| 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 transparenciaportal.gov.br have an official developer API?+
What does `get_emendas` return and how do I scope it to a specific year?+
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?+
How fresh is the data returned by `get_cartoes` and `get_despesas_recursos_recebidos`?+
date_to and date_from parameters to bound your queries and avoid pulling ranges where data may be incomplete.