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

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

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-moj-gov-kh-api-2c2bd171/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## 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.paywithlocus.com/api/wrapped/parse-moj-gov-kh-api-2c2bd171/get_all_books \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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.paywithlocus.com/api/wrapped/parse-moj-gov-kh-api-2c2bd171/get_books \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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.paywithlocus.com/api/wrapped/parse-moj-gov-kh-api-2c2bd171/get_laws \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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.paywithlocus.com/api/wrapped/parse-moj-gov-kh-api-2c2bd171/get_legal_search_results \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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.paywithlocus.com/api/wrapped/parse-moj-gov-kh-api-2c2bd171/get_news_events \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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.paywithlocus.com/api/wrapped/parse-moj-gov-kh-api-2c2bd171/search_site \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>"}'
```
