# Cambodia Ministry of Justice — 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.

> Access Cambodia's official legal resources including books, news, laws, and regulations through the Ministry of Justice's digital library. Search and retrieve information about legal documents, news events, and official publications to stay informed on Cambodian legislation and justice updates.

**Category:** Government & Public Data | **Website:** [moj.gov.kh/](https://moj.gov.kh/) | **Docs:** [parse.bot/marketplace/2c2bd171-422b-49bd-9223-e0109baed312/moj-gov-kh-api](https://parse.bot/marketplace/2c2bd171-422b-49bd-9223-e0109baed312/moj-gov-kh-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/cambodia-ministry-of-justice/`
**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 all books

Retrieve all books from the library by iterating through all pages internally. Returns the complete list of books in a single response. May take longer than get_books due to full pagination traversal.

**Estimated cost:** Metered

_No parameters required._

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

### Get books

Retrieve paginated books from the Ministry of Justice library. Returns book titles, thumbnail URLs, and download URLs. Supports optional filtering by title keyword, category, and institute. Pagination via page number; each page returns up to ~18 books.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `category` | string | No | Filter by category (Khmer text, e.g. 'ច្បាប់'). |
| `institute` | string | No | Filter by institute name. |
| `page` | integer | No | Page number for pagination (1-based). |
| `title` | string | No | Filter by book title keyword (Khmer text recommended). |
| `view_mode` | string | No | View mode: 'grid' or 'list'. |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/cambodia-ministry-of-justice/get-books \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"category":"<string>","institute":"<string>","page":"<integer>","title":"<string>","view_mode":"<string>"}'
```

### Get laws

Retrieve laws and regulations from the Ministry of Justice. Returns a paginated table of laws with number, name, type, date, and links to Khmer and English PDFs where available. Links containing 'javascript:void(0);' indicate no PDF is available for that language.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | Page number for pagination (1-based). |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/cambodia-ministry-of-justice/get-laws \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"page":"<integer>"}'
```

### Get legal search results

Search legal documents using the Ministry of Justice legal search engine. Returns legal documents matching the query with title, URL, description, date, and category. Works best with Khmer-language queries.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | Yes | Search query in Khmer script (e.g. 'ច្បាប់', 'យុត្តិធម៌', 'កិច្ចសន្យា'). Khmer text recommended for best results. |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/cambodia-ministry-of-justice/get-legal-search-results \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>"}'
```

### Get news events

Retrieve news and events from the Ministry of Justice. Returns a paginated list of news items with titles, URLs, dates, and thumbnail images. Items are ordered by recency.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | Page number for pagination (1-based). |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/cambodia-ministry-of-justice/get-news-events \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"page":"<integer>"}'
```

### Search site

Search the entire Ministry of Justice site. Only Khmer-language queries return results; English queries return an empty results array. Results include news, events, and other site content matching the query.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | Yes | Search query in Khmer script (e.g. 'ច្បាប់'). English queries are not supported and return empty results. |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/cambodia-ministry-of-justice/search-site \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"query":"<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.