# Jdih Kemenkeu — 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 Indonesian Ministry of Finance legal documents with detailed information including document types, metadata, and downloadable files. Browse legal products by category and access comprehensive details about regulations, policies, and official legal materials from Indonesia's financial authority.

**Category:** Government & Public Data | **Website:** [jdih.kemenkeu.go.id/](https://jdih.kemenkeu.go.id/) | **Docs:** [parse.bot/marketplace/f8e40d83-7dbf-4473-acab-525c0445ba6b/jdih-kemenkeu-go-id-api](https://parse.bot/marketplace/f8e40d83-7dbf-4473-acab-525c0445ba6b/jdih-kemenkeu-go-id-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/jdih-kemenkeu/`
**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 document detail

Retrieve full metadata for a single legal document by its slug. Returns the complete record including issuing body, organizational unit, enactment date, associated files, and linked documents. The slug is obtained from search_documents results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `slug` | string | Yes | Document slug identifier from search_documents results (e.g. 'pmk-39-tahun-2026'). |

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

### Get document files

List the downloadable files associated with a legal document. Returns file metadata including type codes, descriptions, filenames, sizes, and download URLs. The slug is obtained from search_documents results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `slug` | string | Yes | Document slug identifier (e.g. 'pmk-39-tahun-2026'). Available in search_documents results as items[*].slug. |

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

### Get jenis dokumen options

List all document type categories available in the database with their document counts. Returns the full vocabulary of document types accepted by the bentuk filter in search_documents. Useful for populating filter controls or discovering the database structure.

**Estimated cost:** Metered

_No parameters required._

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

### Search documents

Full-text search over the Indonesian Ministry of Finance legal document database. Supports filtering by document type, year, status, issuing body, topic, and label. Results are paginated and sortable by date or relevance. Each result includes document metadata (title, number, year, status, slug) suitable for drilling into detail or files.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `bentuk` | string | No | Document type filter. Use get_jenis_dokumen_options to discover valid values. |
| `keyword` | string | No | Search keyword to find in document titles and content. |
| `label` | string | No | Document label filter. |
| `nomor` | string | No | Document number filter. |
| `order` | string | No | Sort order. |
| `page` | integer | No | Page number for pagination. |
| `status` | string | No | Document status filter. |
| `tahun` | string | No | Year of publication filter (e.g. '2026'). |
| `tema` | string | No | Topic/Theme filter. |
| `teu` | string | No | Tajuk Entri Utama (Issuing Body) filter. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/jdih-kemenkeu/search-documents \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"bentuk":"<string>","keyword":"<string>","label":"<string>","nomor":"<string>","order":"<string>","page":"<integer>","status":"<string>","tahun":"<string>","tema":"<string>","teu":"<string>"}'
```

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