# Portaldecompraspublicas — Wrapped API

> **You are on:** `https://api.beta.paywithlocus.com/api` | [llms.txt](https://beta.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 retrieve Brazilian public procurement processes from Portal de Compras Públicas. Access tender listings with filters for state, municipality, modality, date range, and status, and retrieve full process details including timelines, buyer information, and official notice data.

**Category:** Government & Public Data | **Website:** [portaldecompraspublicas.com.br/](https://portaldecompraspublicas.com.br/) | **Docs:** [parse.bot/marketplace/57925a1d-b5d5-4aa8-8262-0a6edb4eb269/portaldecompraspublicas-com-br-api](https://parse.bot/marketplace/57925a1d-b5d5-4aa8-8262-0a6edb4eb269/portaldecompraspublicas-com-br-api)

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

## Access

**Base URL:** `https://api.beta.paywithlocus.com/api/wrapped/credits/portaldecompraspublicas/`
**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 process detail

Get full details of a specific procurement process including buyer information, dates, modality, judgment type, legal framework, and responsible personnel. The slug comes from the urlReferencia field in search_processes results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `slug` | string | Yes | Process URL slug from the urlReferencia field in search_processes results (e.g. '/rs/prefeitura-municipal-de-barracao-5066/rpe-008-2026-2026-478943'). |

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

### Get process timeline

Get chronological event log (timeline) for a specific process. Returns system-generated events such as document uploads, republications, and status changes. Newly-opened processes may return an empty timeline.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `codigo_licitacao` | string | Yes | Process internal ID (codigoLicitacao from search_processes results or get_process_detail). |

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

### Get search parameters

Get available filter codes for use with search_processes. Returns lists of modalities, realization types, judgment types, states (UFs), and statuses. Each item has a codigo (code) and descricao (description).

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/portaldecompraspublicas/get-search-parameters \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Search benefit card processes

Search procurement processes using a predefined set of benefit-related keywords (vale refeição, vale alimentação, vale transporte, cartão benefício, etc.). Returns deduplicated results aggregated across all keyword queries. No input parameters required.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/portaldecompraspublicas/search-benefit-card-processes \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Search processes

Search for procurement processes with various filters. Returns paginated results sorted by most recent publication date. Each result includes process identification, buyer info, status, modality, and a URL slug for fetching full details. Pagination via integer page counter; the response includes total pages and current page position.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `dataFinal` | string | No | End date in YYYY-MM-DD format for date range filter. |
| `dataInicial` | string | No | Start date in YYYY-MM-DD format for date range filter. |
| `julgamento` | string | No | Judgment type code from get_search_parameters julgamentos array. |
| `modalidade` | string | No | Modality code from get_search_parameters modalidades array (e.g. '1' for Pregão, '3' for Dispensa). |
| `municipio` | string | No | Municipality code. Defaults to '0' (all municipalities). |
| `objeto` | string | No | Keyword/object search term to match against process summaries (e.g. 'computadores', 'equipamento'). |
| `orgao` | string | No | Government entity name to filter by. |
| `page` | integer | No | Page number for pagination (1-based). |
| `processo` | string | No | Process number to search for. |
| `realizacao` | string | No | Realization type code: '1' for Eletrônico, '2' for Presencial, '3' for Simples informação. |
| `status` | string | No | Status code: '1' for Recebendo Propostas, '2' for Em Andamento, '3' for Finalizado, '4' for Iminência de deserto, '25' for Em Republicação. |
| `tipoData` | string | No | Date type filter: '1' for Publication date, '2' for Opening date. Must be provided when using dataInicial/dataFinal. |
| `uf` | string | No | State (UF) code from get_search_parameters ufs array (e.g. '100143' for RS, '100135' for SP). |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/portaldecompraspublicas/search-processes \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"dataFinal":"<string>","dataInicial":"<string>","julgamento":"<string>","modalidade":"<string>","municipio":"<string>","objeto":"<string>","orgao":"<string>","page":"<integer>","processo":"<string>","realizacao":"<string>","status":"<string>","tipoData":"<string>","uf":"<string>"}'
```

## Next steps

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