# Portaltransparencia — 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.

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

**Category:** Government & Public Data | **Website:** [portaltransparencia.gov.br/](https://portaltransparencia.gov.br/) | **Docs:** [parse.bot/marketplace/8d090eb3-862e-4fb0-b0d3-53259e01bf8d/portaltransparencia-gov-br-api](https://parse.bot/marketplace/8d090eb3-862e-4fb0-b0d3-53259e01bf8d/portaltransparencia-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/portaltransparencia/`
**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 expenses by functional programmatic

Aggregated expenses by functional-programmatic classification. Returns paginated results ordered by function ascending. Shows budget execution by function and subfunction categories.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `ate` | string | No | End date in DD/MM/YYYY format. |
| `de` | string | No | Start 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/portaltransparencia/get-expenses-by-functional-programmatic \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"ate":"<string>","de":"<string>","limit":"<integer>","offset":"<integer>"}'
```

### Get expenses by organ

Aggregated expenses by government organ. Returns paginated results ordered by organ name ascending. Each record shows committed, liquidated, and paid values per organ per month.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `ate` | string | No | End date in DD/MM/YYYY format. |
| `de` | string | No | Start 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/portaltransparencia/get-expenses-by-organ \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"ate":"<string>","de":"<string>","limit":"<integer>","offset":"<integer>"}'
```

### Get server details

Detailed information about a civil servant by numeric ID, including remuneration history. The numeric ID is the part before the underscore in idComFlagExisteDetalhamentoServidor returned by list_servers (e.g. '3604575' from '3604575_1'). Returns personal info and monthly remuneration breakdown.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `server_id` | string | Yes | Numeric server ID from list_servers (the portion before the underscore in idComFlagExisteDetalhamentoServidor, e.g. '3604575'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/portaltransparencia/get-server-details \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"server_id":"<string>"}'
```

### List benefits

Query social benefit program records by period. Returns paginated results with state/municipality-level benefit data including program type and total amounts.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `ate` | string | No | End date in DD/MM/YYYY format. |
| `de` | string | No | Start 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/portaltransparencia/list-benefits \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"ate":"<string>","de":"<string>","limit":"<integer>","offset":"<integer>"}'
```

### List contracts

List public contracts by period. Returns paginated results ordered by publication date descending. Includes contract number, signing date, validity period, contracting organ, and contracted value.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `ate` | string | No | End date in DD/MM/YYYY format. |
| `de` | string | No | Start 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/portaltransparencia/list-contracts \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"ate":"<string>","de":"<string>","limit":"<integer>","offset":"<integer>"}'
```

### List public tenders

Search procurement tenders by period. Returns paginated results ordered by result date descending.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `ate` | string | No | End date in DD/MM/YYYY format. |
| `de` | string | No | Start 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/portaltransparencia/list-public-tenders \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"ate":"<string>","de":"<string>","limit":"<integer>","offset":"<integer>"}'
```

### List sanctions

Query administrative sanctions records. Returns paginated results ordered by sanctioned entity name ascending. Includes entity name, CPF/CNPJ, registry type (CEIS/CEPIM), and sanctioning organ.

**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/portaltransparencia/list-sanctions \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"limit":"<integer>","offset":"<integer>"}'
```

### List servers

List civil servants with optional name filter. Returns paginated results ordered by name ascending. Requires a page token obtained automatically from the portal. Each record includes servant name, masked CPF, organ, position, and status.

**Estimated cost:** Metered

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

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

### List travel

Query official government travel records by period. Returns paginated results ordered by departure date descending. Includes traveler name, destination, organ, total value, and urgency flag.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `ate` | string | No | End date in DD/MM/YYYY format. |
| `de` | string | No | Start 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/portaltransparencia/list-travel \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"ate":"<string>","de":"<string>","limit":"<integer>","offset":"<integer>"}'
```

### Search public expenses

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.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `ate` | string | No | End date in DD/MM/YYYY format. |
| `de` | string | No | Start 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/portaltransparencia/search-public-expenses \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"ate":"<string>","de":"<string>","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.