# Pncp — 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 detailed information about Brazil's public procurement contracts, including bidding results, price registries, and annual contracting plans from the official PNCP portal. Monitor government procurement activities by looking up specific contracts, procurement processes, and procurement records all in one place.

**Category:** Government & Public Data | **Website:** [pncp.gov.br/](https://pncp.gov.br/) | **Docs:** [parse.bot/marketplace/dc9ac4c6-6d08-4860-8a07-5a478dffc295/pncp-gov-br-api](https://parse.bot/marketplace/dc9ac4c6-6d08-4860-8a07-5a478dffc295/pncp-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/pncp/`
**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 contratacao detail

Retrieve full details of a single procurement process (contratação/compra). Requires the organization CNPJ, year, and sequential number obtainable from search_contratacoes results (sequencialCompra field). Returns comprehensive procurement data including proposal dates, legal basis, and funding sources.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `ano` | string | Yes | Year of the procurement (e.g. 2025). |
| `cnpj` | string | Yes | CNPJ of the organization (e.g. 01065846000172). |
| `sequencial` | string | Yes | Sequential number of the procurement (e.g. 369). Obtainable from search_contratacoes results as sequencialCompra. |

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

### Search all

Flexible search across all document types (edital, ata, contrato, pcaorgao) using keywords and filters. Results are ordered by most recent. Requires a status filter.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `pagina` | integer | No | Page number. |
| `query` | string | No | Search keyword. |
| `status` | string | Yes | Filter by status. Accepted values: vigente, encerrado, todos, divulgada, revogada, anulada, suspensa, encerrada. |
| `tam_pagina` | integer | No | Results per page. |
| `tipo_documento` | string | No | Document type to filter by. Accepted values: edital, ata, contrato, pcaorgao. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/pncp/search-all \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"pagina":"<integer>","query":"<string>","status":"<string>","tam_pagina":"<integer>","tipo_documento":"<string>"}'
```

### Search atas

Search for Price Registration records (Atas de Registro de Preços) by validity start/end period. Returns paginated results including organization, validity dates, and procurement object.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `data_final` | string | Yes | End date in YYYYMMDD format (e.g. 20250605). |
| `data_inicial` | string | Yes | Start date in YYYYMMDD format (e.g. 20250601). |
| `pagina` | integer | No | Page number. |
| `tamanho_pagina` | integer | No | Results per page. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/pncp/search-atas \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"data_final":"<string>","data_inicial":"<string>","pagina":"<integer>","tamanho_pagina":"<integer>"}'
```

### Search contratacoes

Search for procurement processes (contratações) by publication date range and modality. Returns paginated results with organization, estimated/approved values, and legal basis.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `data_final` | string | Yes | End date in YYYYMMDD format (e.g. 20250605). |
| `data_inicial` | string | Yes | Start date in YYYYMMDD format (e.g. 20250601). |
| `modalidade` | integer | Yes | Procurement modality code. Known values: 1 (Leilão - Eletrônico), 2 (Diálogo Competitivo), 3 (Concurso), 4 (Concorrência - Eletrônica), 5 (Concorrência - Presencial), 6 (Pregão - Eletrônico), 7 (Pregão - Presencial), 8 (Dispensa), 9 (Inexigibilidade), 12 (Credenciamento), 13 (Pré-qualificação). |
| `pagina` | integer | No | Page number. |
| `tamanho_pagina` | integer | No | Results per page. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/pncp/search-contratacoes \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"data_final":"<string>","data_inicial":"<string>","modalidade":"<integer>","pagina":"<integer>","tamanho_pagina":"<integer>"}'
```

### Search contratos

Search for signed contracts (contratos/empenhos) by publication date range. Returns paginated results with contractor, values, and organization details. Page size is restricted by the upstream API to 10, 20, or 50.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `data_final` | string | Yes | End date in YYYYMMDD format (e.g. 20250605). |
| `data_inicial` | string | Yes | Start date in YYYYMMDD format (e.g. 20250601). |
| `pagina` | integer | No | Page number. |
| `tamanho_pagina` | integer | No | Results per page. Accepted values: 10, 20, 50. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/pncp/search-contratos \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"data_final":"<string>","data_inicial":"<string>","pagina":"<integer>","tamanho_pagina":"<integer>"}'
```

### Search pca

Search for Annual Contracting Plans (PCA) records. Returns organization-level PCA data ordered by most recent update. Note: date parameters are accepted but filtering is performed by the search index ordering, not strict date range filtering.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `data_final` | string | Yes | End date in YYYYMMDD format (e.g. 20250210). |
| `data_inicial` | string | Yes | Start date in YYYYMMDD format (e.g. 20250201). |
| `pagina` | integer | No | Page number. |
| `tamanho_pagina` | integer | No | Results per page. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/pncp/search-pca \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"data_final":"<string>","data_inicial":"<string>","pagina":"<integer>","tamanho_pagina":"<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.