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

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-portaldecompraspublicas-com-br-api-57925a1d/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## 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.paywithlocus.com/api/wrapped/parse-portaldecompraspublicas-com-br-api-57925a1d/get_process_detail \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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.paywithlocus.com/api/wrapped/parse-portaldecompraspublicas-com-br-api-57925a1d/get_process_timeline \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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.paywithlocus.com/api/wrapped/parse-portaldecompraspublicas-com-br-api-57925a1d/get_search_parameters \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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.paywithlocus.com/api/wrapped/parse-portaldecompraspublicas-com-br-api-57925a1d/search_benefit_card_processes \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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.paywithlocus.com/api/wrapped/parse-portaldecompraspublicas-com-br-api-57925a1d/search_processes \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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>"}'
```
