# Transparenciaportal — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

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

**Category:** Government & Public Data | **Website:** [transparenciaportal.gov.br/](https://transparenciaportal.gov.br/) | **Docs:** [parse.bot/marketplace/8e9f5ce6-bdcb-4984-9c48-5d0bdc66d2ec/transparenciaportal-gov-br-api](https://parse.bot/marketplace/8e9f5ce6-bdcb-4984-9c48-5d0bdc66d2ec/transparenciaportal-gov-br-api)

Pay-per-use API proxy for Locus Pro. Each call burns credits from your workspace balance.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/credits/transparenciaportal/`
**Auth:** `Authorization: Bearer <LOCUS_CREDITS_SECRET_KEY>` (an `lcr_` secret key or a scoped `lcac_` agent credential)
**Required header:** `Idempotency-Key: <fresh UUID per call>`. A retry with the same key replays the stored result without a new charge.
**Response:** the provider response after any endpoint-specific normalization. `X-Locus-Credits-Charged` carries the charge and `X-Locus-Credits-Balance` the remaining balance. Insufficient credits return `402` before the provider is called.
**Pricing:** estimated costs below are USD. Locus debits the credit equivalent at your workspace rate.

Full call contract: https://docs.paywithlocus.com/api-reference/introduction

> Using a Pay With Locus wallet key (`claw_` prefix)? Wallet routes are documented separately: https://docs.paywithlocus.com/wrapped-apis/for-agents

## Endpoints

### Get cartoes

Get government payment card transactions for a given period. Returns paginated results ordered by transaction date. Each record includes card type, issuing agency, cardholder, and transaction value. Pagination is offset-based.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `date_from` | string | No | Start date in DD/MM/YYYY format. |
| `date_to` | string | No | End date in DD/MM/YYYY format. |
| `limit` | integer | No | Maximum number of results per page. |
| `offset` | integer | No | Pagination offset (number of records to skip). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/transparenciaportal/get-cartoes \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"date_from":"<string>","date_to":"<string>","limit":"<integer>","offset":"<integer>"}'
```

### Get despesas favorecido

Get detailed public expenditures by beneficiary and phase. Returns paginated results ordered by value descending. Each record includes date, beneficiary, state, value, expense phase, supervising agency, function, program, and action. Pagination is offset-based.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `date_from` | string | No | Start date in DD/MM/YYYY format. |
| `date_to` | string | No | End date in DD/MM/YYYY format. |
| `fase` | string | No | Expense phase: 1 for Empenho, 2 for Liquidação, 3 for Pagamento. |
| `limit` | integer | No | Maximum number of results per page. |
| `offset` | integer | No | Pagination offset (number of records to skip). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/transparenciaportal/get-despesas-favorecido \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"date_from":"<string>","date_to":"<string>","fase":"<string>","limit":"<integer>","offset":"<integer>"}'
```

### Get despesas recursos recebidos

Get resources received by beneficiaries for a given period. Returns paginated results ordered by month/year. Each record identifies the beneficiary, their type, location, and the value received. Pagination is offset-based.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `date_from` | string | No | Start date in DD/MM/YYYY format. |
| `date_to` | string | No | End date in DD/MM/YYYY format. |
| `limit` | integer | No | Maximum number of results per page. |
| `offset` | integer | No | Pagination offset (number of records to skip). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/transparenciaportal/get-despesas-recursos-recebidos \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"date_from":"<string>","date_to":"<string>","limit":"<integer>","offset":"<integer>"}'
```

### Get emendas

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.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `limit` | integer | No | Maximum number of results per page. |
| `offset` | integer | No | Pagination offset (number of records to skip). |
| `year` | string | No | Year to query amendments for in YYYY format. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/transparenciaportal/get-emendas \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"limit":"<integer>","offset":"<integer>","year":"<string>"}'
```

### Get servidores

Get federal public servants data. Automatically extracts the required security token from the consultation page. Returns paginated results ordered by name. Each record includes servant type, masked CPF, organization, role, and status. Pagination is offset-based.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `limit` | integer | No | Maximum number of results per page. |
| `offset` | integer | No | Pagination offset (number of records to skip). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/transparenciaportal/get-servidores \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"limit":"<integer>","offset":"<integer>"}'
```

## Next steps

- [All wrapped API providers](https://paywithlocus.com/wapi/index.md): pick another provider.
- [Find and call tools](https://paywithlocus.com/agent/tools.md): price ceilings, async results, and errors.
- [Credits and billing](https://paywithlocus.com/agent/billing.md): what a call costs and how to add credits.
- [Agent docs index](https://paywithlocus.com/agent/index.md): every Locus agent page.