Discover/Gov API
live

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

Endpoint health
verified 3d ago
get_books
get_laws
get_all_books
get_news_events
search_site
6/6 passing latest checkself-healing
Endpoints
6
Updated
26d ago

What is the Gov 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.

Try it
Page number for pagination (1-based).
Filter by book title keyword (Khmer text recommended).
Filter by category (Khmer text, e.g. 'ច្បាប់').
Filter by institute name.
View mode: 'grid' or 'list'.
api.parse.bot/scraper/190e9c81-7a8c-4fe6-b5e6-30370299705f/<endpoint>
Ready to send
Fill in the parameters and hit sign in to send to see live response data here.
Call it over HTTPgrab a free API key at signup
curl -X GET 'https://api.parse.bot/scraper/190e9c81-7a8c-4fe6-b5e6-30370299705f/get_books?page=1&view_mode=grid' \
  -H 'X-API-Key: $PARSE_API_KEY'
Python SDK · recommended

Typed, relational, agent-ready

A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.

  • Fully typed · autocompletes
  • Objects link to objects
  • Typed errors & pagination

Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:

uv add parse-sdk
uv run parse init
uv run parse add --marketplace moj-gov-kh-api

uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.

"""Walkthrough: MOJ Cambodia SDK — bounded, re-runnable; every call capped."""
from parse_apis.moj_cambodia_api import MOJCambodia, ViewMode, QueryRequired

client = MOJCambodia()

# List books from the library with a view mode filter
for book in client.books.list(view_mode=ViewMode.LIST, limit=3):
    print(book.title, book.download_url)

# Search legal documents in Khmer
result = client.legalresults.search(query="ច្បាប់", limit=1).first()
if result:
    print(result.title, result.category, result.date)

# List laws and regulations
for law in client.laws.list(limit=3):
    print(law.number, law.name, law.date)

# Browse news items
for item in client.newsitems.list(limit=3):
    print(item.title, item.url)

# Site-wide search with typed error handling
try:
    for sr in client.searchresults.search(query="យុត្តិធម៌", limit=3):
        print(sr.title, sr.url)
except QueryRequired as exc:
    print(f"Query error: {exc}")

print("exercised: books.list / legalresults.search / laws.list / newsitems.list / searchresults.search")
All endpoints · 6 totalmissing one? ·

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.

Input
ParamTypeDescription
pageintegerPage number for pagination (1-based).
titlestringFilter by book title keyword (Khmer text recommended).
categorystringFilter by category (Khmer text, e.g. 'ច្បាប់').
institutestringFilter by institute name.
view_modestringView mode: 'grid' or 'list'.
Response
{
  "type": "object",
  "fields": {
    "page": "current page number as integer",
    "books": "array of book objects 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/files/user-folder/document/Digital_Library/example.pdf",
          "thumbnail_url": "https://moj.gov.kh/files/book/example.jpg"
        }
      ],
      "count": 18,
      "total_pages": 7
    },
    "status": "success"
  }
}

About the Gov API

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.

Reliability & maintenanceVerified

The Gov API is a managed, monitored endpoint for moj.gov.kh — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when moj.gov.kh changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.

This isn't an official moj.gov.kh API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.

Last verified
3d ago
Latest check
6/6 endpoints passing
Maintenance
Monitored & self-healing
Will this API break when the source site changes?+
It's built not to. Every endpoint is health-checked on a schedule with automated test probes. When the source site changes and a check fails, the API is automatically queued for repair and re-verified — that's the self-healing layer. Each API page shows when its endpoints were last verified. And because marketplace APIs are shared, any fix reaches everyone using it.
Is this an official API from the source site?+
No — Parse APIs are independent, managed REST wrappers over publicly available data. That is the point: where a site has no official API (or only a limited one), Parse gives you a maintained, monitored endpoint for that data and keeps it working as the site changes — so you get a stable contract over a source that never promised one.
Can I fix or extend this API myself if I need a new endpoint or field?+
Yes — and you don't have to wait on us. This API was generated by the Parse agent, which stays attached. Describe the change in plain English ("add an endpoint that returns reviews", "fix the price field") in the revise box on the API page or via the revise_api MCP tool, and the agent rebuilds it against the live site in minutes. Contributing the change back to the public API is free.
What happens if I call an endpoint that has an issue?+
Errors are machine-readable: a bad call returns a clean status with the list of available endpoints and a repair hint, so an agent (or you) can recover or trigger a fix instead of failing silently. Confirmed failures feed the automatic repair queue.
Common use cases
  • Building a Cambodian legal research tool that links directly to Khmer and English PDFs via pdf_kh and pdf_en fields
  • Indexing the Ministry of Justice book library using get_all_books to collect all download_url values in one pass
  • Monitoring new Ministry announcements by polling get_news_events for fresh date and url entries
  • Searching for specific legislation by keyword using get_legal_search_results with Khmer-script queries and filtering by category
  • Aggregating law metadata (number, name, type, date) for a Cambodian regulatory compliance database
  • Filtering the digital library by subject with the category parameter 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
Pricing & limitsSee full pricing →
TierPriceCredits/monthRate limit
Free$0/mo1005 req/min
Hobby$30/mo1,00020 req/min
Developer$100/mo5,000100 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.

Frequently asked questions
Does moj.gov.kh provide an official developer API?+
No. The Cambodian Ministry of Justice website does not publish a public developer API or documented data feed. This Parse API provides structured access to the public content on moj.gov.kh.
What does `get_laws` return and are all laws available in English?+
Each record includes 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?+
The Ministry of Justice site's search is built for Khmer-script content. Both 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?+
The 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?+
Currently 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.
Page content last updated . Spec covers 6 endpoints from moj.gov.kh.
Related APIs in Government PublicSee all →
businessregistration.moc.gov.kh API
Search and retrieve detailed business information from Cambodia's official business registry, including company profiles, director details, and registered addresses for corporations, partnerships, and sole proprietorships. Instantly access verified business entity data to verify company credentials, find ownership details, and conduct due diligence on Cambodian businesses.
indiankanoon.org API
indiankanoon.org API
nolo.com API
Access legal articles, state-specific law guides, dictionary definitions, and DIY legal products from Nolo.com. Search across the full Nolo library, browse trending and recent content, and look up legal topics by keyword or category.
njt.jog.gov.hu API
Search and retrieve Hungarian laws, decrees, and legal documents from the National Legislation Database to find current legislation and legal regulations. Quickly look up specific laws, get detailed document information, and discover relevant legal acts through intelligent search suggestions.
justice.gov API
Search and retrieve official U.S. Department of Justice press releases. Find information on DOJ announcements, enforcement actions, settlements, and legal proceedings across all topic areas. Access full press release details including case summaries, entities involved, and filing dates.
justia.com API
Access Justia's legal database: search the lawyer directory by practice area and location, retrieve attorney profiles, browse state statutes and case law, explore legal guides, and look up law schools — all in one API.
legifrance.gouv.fr API
Search and retrieve official French legal documents, laws, and unclaimed estate notices from the Journal Officiel (JORF), including the ability to browse the latest published issues. Find specific legal texts and succession notices to stay informed about French legislation and inheritance announcements.
canlii.org API
Access Canadian legal information from CanLII.org. Discover jurisdictions and databases, search case law and legislation across all provinces and territories, and retrieve full document text and metadata.