moj.gov.kh APImoj.gov.kh ↗
Access Cambodian laws, regulations, books, and news from the Ministry of Justice (moj.gov.kh). Six endpoints covering legal documents, library, and site search.
curl -X GET 'https://api.parse.bot/scraper/190e9c81-7a8c-4fe6-b5e6-30370299705f/get_books?page=1' \ -H 'X-API-Key: $PARSE_API_KEY'
Retrieve paginated books from the Ministry of Justice library. Returns book titles, thumbnail URLs, and download URLs. Supports filtering by title, category, and institute.
| Param | Type | Description |
|---|---|---|
| page | string | Page number for pagination. |
| title | string | Filter by book title keyword (Khmer text recommended). |
| category | string | Filter by category (Khmer text, e.g. 'ច្បាប់'). |
| institute | string | Filter by institute name. |
| view_mode | string | View mode: 'grid' or 'list'. |
{
"type": "object",
"fields": {
"page": "current page number",
"books": "array of book objects, each with title, thumbnail_url, and download_url",
"count": "number of books on the current page",
"total_pages": "total number of pages available"
},
"sample": {
"data": {
"page": 1,
"books": [
{
"title": "រដ្ឋធម្មនុញ្ញឆ្នាំបោះពុម្ពផ្សាយដោយក្រុមប្រឹក្សាធម្មនុញ្ញឆ្នាំ២០២៣",
"download_url": "https://moj.gov.kh/kh/download-book/?key=K3JXNUZhbmFjOUZxMTMwWGdVWUtCdz09",
"thumbnail_url": "https://moj.gov.kh/files/book/1701999524រដ្ឋធម្មនុញ្ញ១៩៩៣ ភាសាខ្មែរ អង្គ្លេស បារាំង (តុលា២០២៣).jpg"
}
],
"count": 18,
"total_pages": 7
},
"status": "success"
}
}About the moj.gov.kh API
The moj.gov.kh API provides 6 endpoints to retrieve legal content from Cambodia's official Ministry of Justice website, including laws with PDF links, a library of books with download URLs, and paginated news events. The get_laws endpoint returns structured records with law number, name, type, date, and separate Khmer and English PDF links where available, making it practical for building Cambodian legal reference tools.
Legal Documents and Regulations
The get_laws endpoint returns paginated records from the Ministry of Justice laws database. Each law object includes number, name, type, date, pdf_kh (Khmer-language PDF), and pdf_en (English-language PDF where available). Not all laws have English PDFs, so pdf_en may be null for some entries. The page parameter controls pagination, and each response includes the count of laws on the current page alongside the laws array.
For full-text legal search, get_legal_search_results accepts a query string and returns title, url, description, date, and category for each matching document. Khmer-script queries (ច្បាប់, យុត្តិធម៌, កិច្ចសន្យា) produce the most complete results — English-language queries are not supported by the source.
Library and Books
The get_books endpoint retrieves the Ministry's digital library with filtering by title, category, and institute, plus a view_mode parameter (grid or list). Each book object exposes title, thumbnail_url, and download_url. The response includes total_pages for your own pagination logic. When you need the full catalog at once, get_all_books iterates all pages internally and returns a flat books array with a total_count — useful for indexing but slower than a single-page get_books call.
News and Site Search
get_news_events returns paginated news items from the Ministry, each with title, url, date, and thumbnail_url. The search_site endpoint supports site-wide keyword search across all content types, returning title, url, date, and thumbnail_url per result. As with the legal search, only Khmer-script queries return results; English queries produce an empty results array.
- Building a Cambodian legal research tool that links directly to Khmer and English PDFs via
pdf_khandpdf_enfields - Indexing the Ministry of Justice book library using
get_all_booksto collect alldownload_urlvalues in one pass - Monitoring new Ministry announcements by polling
get_news_eventsfor freshdateandurlentries - Searching for specific legislation by keyword using
get_legal_search_resultswith Khmer-script queries and filtering bycategory - Aggregating law metadata (number, name, type, date) for a Cambodian regulatory compliance database
- Filtering the digital library by subject with the
categoryparameter to surface books in a specific legal domain - Powering a Khmer-language legal chatbot with document titles, descriptions, and URLs from
get_legal_search_results
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 250 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does moj.gov.kh provide an official developer API?+
What does `get_laws` return and are all laws available in English?+
number, name, type, date, pdf_kh, and pdf_en. English PDFs (pdf_en) are only present where the Ministry has published an English translation — many records will have a null pdf_en and only a Khmer PDF.Why do English-language queries to `search_site` and `get_legal_search_results` return no results?+
search_site and get_legal_search_results require Khmer-script input to return results; English-language queries consistently return an empty array. Use Khmer text (e.g. 'ច្បាប់') for any search query.Does the API expose full law text or only metadata and PDF links?+
get_laws endpoint returns metadata fields (number, name, type, date) and links to PDFs (pdf_kh, pdf_en). Full document text is not extracted. You can fork this API on Parse and revise it to add a law-detail endpoint that fetches and parses the PDF content.Can I filter news events by date range or category?+
get_news_events only accepts a page parameter; date-range and category filtering are not supported. The API covers paginated news items with title, url, date, and thumbnail_url fields. You can fork this API on Parse and revise it to add date or category filter parameters to the news endpoint.