portaltransparencia.gov.br APIportaltransparencia.gov.br ↗
Access Brazilian federal government spending, contracts, civil servants, travel, sanctions, and procurement tenders via the Portal Transparência API.
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' \ -H 'X-API-Key: $PARSE_API_KEY'
Search public expenditure records by period. Returns paginated results ordered by month/year descending.
| Param | Type | Description |
|---|---|---|
| de | string | Start date in DD/MM/YYYY format. |
| ate | string | End date in DD/MM/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 expenditure records with fields like mesAno, orgaoSuperior, funcao, valorDespesaEmpenhada, etc.",
"draw": "integer draw counter",
"error": "string or null error message",
"recordsTotal": "integer total records available",
"recordsFiltered": "integer total filtered records"
},
"sample": {
"data": {
"data": [
{
"funcao": "24 - Comunicações",
"mesAno": "03/2024",
"orgaoSuperior": "41000 - Ministério das Comunicações",
"valorDespesaPaga": "3.443.565,69",
"valorDespesaEmpenhada": "- 33.934.928,11"
}
],
"draw": 0,
"error": null,
"recordsTotal": 9223372036854776000,
"recordsFiltered": 9223372036854776000
},
"status": "success"
}
}About the portaltransparencia.gov.br API
This API exposes 10 endpoints covering Brazil's Federal Government Transparency Portal, giving structured access to public expenditure records, government contracts, civil servant details, official travel, sanctions, and procurement tenders. The list_servers endpoint returns individual servant records including name, CPF, organ assignment, and role, while get_server_details returns full remuneration history by period. All paginated endpoints support date-range filtering via de and ate parameters.
Expenditure and Budget Data
Three endpoints cover federal spending from different angles. search_public_expenses returns raw expenditure records per period with fields like mesAno, orgaoSuperior, funcao, valorDespesaEmpenhada, and supports date filtering using de and ate in DD/MM/YYYY format. get_expenses_by_organ aggregates the same data by government organ, adding valorDespesaPaga alongside committed amounts. get_expenses_by_functional_programmatic breaks spending down by funcao and subFuncao under the Brazilian functional-programmatic classification system. All three return recordsTotal and recordsFiltered counts for reliable pagination.
Contracts, Tenders, and Sanctions
list_contracts returns public contracts with fields including numeroContrato, orgaoSuperior, situacao, dataAssinatura, and valorContratado, ordered by publication date descending. list_public_tenders covers procurement events with idLicitacao, modalidade, dataAbertura, and dataResultadoCompra. list_sanctions returns sanctioned entities with nomeSancionado, cpfCnpj, cadastro, dataInicialSancao, and the sanctioning organ; unlike most other endpoints it does not accept date range parameters.
Civil Servants and Travel
list_servers accepts an optional name substring filter and returns records with servant name, CPF, lotation organ, position (cargo), and a status field (situa). The idComFlagExisteDetalhamentoServidor field encodes both the numeric server ID and a detail-availability flag separated by an underscore. Pass the portion before the underscore to get_server_details to retrieve full remuneration history broken into periods. list_travel returns official travel records with numPcdp, situacao, traveler name, destination list, and valorTotal, ordered by departure date descending.
Benefits and Pagination
list_benefits queries social benefit program disbursements by date range, returning a data array with period-level records and the standard draw/recordsTotal envelope. All paginated endpoints accept limit and offset for page control. The error field in every response is either null on success or contains a descriptive string, making it straightforward to detect failures without inspecting HTTP status codes alone.
- Track monthly federal spending by ministry using
get_expenses_by_organand thevalorDespesaPagafield. - Build a contract monitoring dashboard using
list_contractsfiltered by date range andorgaoSuperior. - Audit civil servant remuneration changes over time via
get_server_detailsremuneration period history. - Identify sanctioned suppliers before onboarding by querying
list_sanctionsfor a company's CNPJ. - Analyze procurement patterns across modalities using
list_public_tenderswithmodalidadeand result dates. - Monitor official travel costs per organ using
list_travelwithvalorTotalandorgaoSuperior. - Map social benefit program disbursements over a fiscal year using
list_benefitswith quarterly date ranges.
| 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 portaltransparencia.gov.br have an official developer API?+
How does the civil servant lookup work across list_servers and get_server_details?+
list_servers accepts an optional name substring filter and returns records including the field idComFlagExisteDetalhamentoServidor, formatted like 1234567_1. The numeric portion before the underscore is the server_id you pass to get_server_details, which then returns remuneration period objects with itemized pay breakdowns. Not all servants have detail records; the flag suffix in that field indicates availability.Does list_sanctions support filtering by date or entity type?+
list_sanctions currently accepts only limit and offset — there are no date range or entity-type filter parameters. It returns all sanctions ordered by sanctioned entity name ascending. You can fork this API on Parse and revise it to add date or CNPJ filter parameters if your use case requires them.Does the API cover state or municipal government spending, not just federal?+
What is the `draw` field returned in every paginated response?+
draw is an integer counter that mirrors the draw sequence used by the portal's data tables to match requests with responses when multiple calls are in flight. For most use cases you can ignore it; it carries no business data and will typically be 1 for single requests.