Go APIjdih.kemenkeu.go.id ↗
Search and retrieve Indonesian Ministry of Finance legal documents via 4 endpoints. Access regulations, ministerial decrees, metadata, and file downloads.
What is the Go API?
The JDIH Kemenkeu API provides 4 endpoints for searching and retrieving legal documents from Indonesia's Ministry of Finance legal document database. Using search_documents, you can run full-text searches across regulations, ministerial decrees, and other legal products, filtering by document type, year, issuing body, topic, and status. Results include metadata fields like produk_hukum_id, slug, judul, status, and tanggal_penetapan, and paginated responses let you traverse the full corpus.
curl -X GET 'https://api.parse.bot/scraper/28adf406-de91-41c1-8d27-973ab86b332a/search_documents?teu=Kementerian+Keuangan&page=1&tema=Perpajakan&label=PAJAK&nomor=39&order=desc&tahun=2026&bentuk=Peraturan+Menteri&status=Berlaku&keyword=pajak' \ -H 'X-API-Key: $PARSE_API_KEY'
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 jdih-kemenkeu-go-id-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: JDIH Kemenkeu SDK — search Indonesian Ministry of Finance legal documents."""
from parse_apis.jdih_kemenkeu_api import (
JDIHKemenkeu, DocumentType, DocumentStatus, Sort, DocumentNotFound
)
client = JDIHKemenkeu()
# Discover available document types and their counts.
for doc_type in client.documenttypeoptions.list(limit=5):
print(doc_type.judul, doc_type.total)
# Search for active ministerial regulations about tax, sorted by newest first.
for doc in client.documentsummaries.search(
keyword="pajak",
bentuk=DocumentType.PERATURAN_MENTERI,
status=DocumentStatus.BERLAKU,
order=Sort.DESC,
limit=3,
):
print(doc.nomor, doc.judul, doc.tahun)
# Drill into one result to get full detail including files.
result = client.documentsummaries.search(keyword="pajak", limit=1).first()
if result:
detail = result.details()
print(detail.judul, detail.teu, detail.unit)
# List downloadable files for this document.
for f in detail.files(limit=5):
print(f.filename, f.size_kb, f.keterangan)
# Fetch a document directly by slug when the identifier is already known.
try:
doc = client.documents.get(slug="pmk-39-tahun-2026")
print(doc.nomor, doc.status, doc.tanggal_penetapan)
except DocumentNotFound as exc:
print(f"Document not found: {exc.slug}")
print("exercised: documenttypeoptions.list / documentsummaries.search / details / files / documents.get")
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.
| Param | Type | Description |
|---|---|---|
| teu | string | Tajuk Entri Utama (Issuing Body) filter. |
| page | integer | Page number for pagination. |
| tema | string | Topic/Theme filter. |
| label | string | Document label filter. |
| nomor | string | Document number filter. |
| order | string | Sort order. |
| tahun | string | Year of publication filter (e.g. '2026'). |
| bentuk | string | Document type filter. Use get_jenis_dokumen_options to discover valid values. |
| status | string | Document status filter. |
| keyword | string | Search keyword to find in document titles and content. |
{
"type": "object",
"fields": {
"items": "array of document summary objects with produk_hukum_id, slug, bentuk, no, tahun, nomor, status, judul, teu, tanggal_penetapan, tanggal_pengundangan, full_text_pdf, label, tematik",
"query": "object containing the query parameters used",
"total_pages": "integer total number of pages",
"current_page": "integer current page number",
"total_results": "integer total number of matching documents"
},
"sample": {
"data": {
"items": [
{
"no": 39,
"teu": "Kementerian Keuangan",
"slug": "pmk-39-tahun-2026",
"judul": "Perubahan atas Peraturan Menteri Keuangan Nomor 211/PMK.03/2017 tentang Tata Cara Penghitungan Tunjangan Kinerja Pegawai di Lingkungan Direktorat Jenderal Pajak",
"label": [
"TUNJANGAN KINERJA PEGAWAI ",
"DIREKTORAT JENDERAL PAJAK "
],
"nomor": "PMK 39 TAHUN 2026",
"tahun": 2026,
"bentuk": "Peraturan Menteri",
"status": "Berlaku",
"tematik": [],
"full_text_pdf": "/api/download/7EA3940D-673A-40EB-981B-0F585275031A/2026pmkeuangan039.pdf",
"produk_hukum_id": "f216a1ad-ddc3-4241-ac87-059c8e54e5ed",
"tanggal_penetapan": "2026-05-29 12:00:00",
"tanggal_pengundangan": "2026-06-02 12:00:00"
}
],
"query": {
"page": "1",
"order": "desc",
"keyword": "pajak"
},
"total_pages": 1000,
"current_page": 1,
"total_results": 10000
},
"status": "success"
}
}About the Go API
Search and Filter Legal Documents
The search_documents endpoint is the primary entry point. It accepts optional parameters including bentuk (document type), tahun (publication year), teu (issuing body), tema (topic), label, nomor (document number), order (sort order), and page for pagination. Responses return an items array of document summary objects alongside total_results, total_pages, and current_page counters — useful for building paginated document browsers or bulk exports. Use get_jenis_dokumen_options to discover the full vocabulary of valid bentuk values along with per-type document counts before constructing search queries.
Retrieving Full Document Records
Once you have a slug from search_documents results, pass it to get_document_detail to retrieve the full metadata record. This includes judul (title), nomor, status, teu (issuing body), unit (organizational unit), kode_unit, tanggal_penetapan (enactment date), a files array of attached documents, and a links array of related document references. The files array items carry jenis (type code), keterangan (description), filename, size_kb, and url for direct download.
Accessing Document Files
The get_document_files endpoint is a lightweight alternative when you only need the file listing for a given document. Supply the same slug and receive the files array with the same shape — jenis, keterangan, filename, size_kb, and download url — without the full metadata payload. This is efficient for pipelines that separately resolve metadata and file access.
Document Type Discovery
get_jenis_dokumen_options takes no inputs and returns an items array of all document type categories in the database. Each item has a judul (display label), value (the string to pass as bentuk in search_documents), and a total count of documents in that category. Run this once to map the taxonomy before building filter logic or reporting dashboards.
The Go API is a managed, monitored endpoint for jdih.kemenkeu.go.id — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when jdih.kemenkeu.go.id 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 jdih.kemenkeu.go.id 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.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Monitoring newly enacted Ministry of Finance regulations by querying
search_documentsfiltered bytahunand sorted by date. - Building a compliance reference tool that retrieves full document metadata via
get_document_detailfor a list of known regulatory slugs. - Downloading all attached files for a specific ministerial decree using
get_document_fileswith the document's slug. - Enumerating the complete document type taxonomy with
get_jenis_dokumen_optionsto populate filter dropdowns in a legal research UI. - Tracking the status field across a set of documents to identify which regulations are still active versus superseded.
- Cross-referencing linked documents using the
linksarray returned byget_document_detailto trace regulatory lineage. - Aggregating document counts by type from
get_jenis_dokumen_optionsfor reporting on the volume of different legal product categories.
| 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 | 100 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 jdih.kemenkeu.go.id have an official developer API?+
How do I know which values are valid for the `bentuk` filter in `search_documents`?+
get_jenis_dokumen_options first. It returns every document type category in the database with its value string (use this as bentuk) and a total count. This avoids guessing type names and ensures your filter matches actual database vocabulary.Does the API return the full text content of legal documents?+
files array in get_document_detail and get_document_files provides download URLs pointing to the attached files (typically PDFs). You can fork this API on Parse and revise it to add a document-text extraction endpoint if your workflow requires parsed content.Is there a way to retrieve all documents without a keyword query?+
search_documents endpoint supports fully optional inputs — you can call it with only page and order to browse the entire corpus without a keyword. Combine tahun or bentuk alone to narrow by year or type without free-text input. Pagination is controlled via the page parameter and the total_pages field in the response.