# 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. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-portaltransparencia-gov-br-api-8d090eb3/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## 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/parse-portaltransparencia-gov-br-api-8d090eb3/get_expenses_by_functional_programmatic \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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/parse-portaltransparencia-gov-br-api-8d090eb3/get_expenses_by_organ \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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/parse-portaltransparencia-gov-br-api-8d090eb3/get_server_details \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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/parse-portaltransparencia-gov-br-api-8d090eb3/list_benefits \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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/parse-portaltransparencia-gov-br-api-8d090eb3/list_contracts \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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/parse-portaltransparencia-gov-br-api-8d090eb3/list_public_tenders \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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/parse-portaltransparencia-gov-br-api-8d090eb3/list_sanctions \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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/parse-portaltransparencia-gov-br-api-8d090eb3/list_servers \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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/parse-portaltransparencia-gov-br-api-8d090eb3/list_travel \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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/parse-portaltransparencia-gov-br-api-8d090eb3/search_public_expenses \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"ate":"<string>","de":"<string>","limit":"<integer>","offset":"<integer>"}'
```
