Indonesian Law Data — JDIH Scraper
Under maintenancePricing
from $2.50 / 1,000 peraturans
Indonesian Law Data — JDIH Scraper
Under maintenanceScrape 378,000+ Indonesian regulations and court decisions from 5 official JDIH sources — SETNEG, Kemenkeu, BPK, Mahkamah Agung, Komdigi. Legal status, amendment/repeal relations, AI summaries. Pay-per-event.
Pricing
from $2.50 / 1,000 peraturans
Rating
0.0
(0)
Developer
dedy iskandar
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
2 days ago
Last modified
Categories
Features
Share
Indonesian Law Data (JDIH)
Scrape Indonesian legal data — national regulations (peraturan), court decisions, and legal documents — from five official government sources, in one Apify Actor.
Coverage: 378,000+ records. Regulation metadata, legal status (in force / partially / revoked), full details with amendment–repeal–related relations, and optional AI summaries.
Pay-per-event. No browser, no proxies needed — pure HTTP/JSON, which keeps runs fast (~5–8 s for small jobs) and cheap.
Looking for
peraturan,UU,PP,PERPRES,PERPU,putusan, JDIH, BPK, or Mahkamah Agung data? This Actor covers all of them.
What you get
| Feature | Detail |
|---|---|
| Regulation metadata | type, number, year, title, legal status |
| Full detail | 30 fields including State Gazette numbers, subject, legal field, enactment date |
| Relations | repeals / amended by / related regulations |
| Court decisions | Mahkamah Agung rulings (4,650+) and PERMA/SEMA circulars |
| Official PDF link | URL only (files are not downloaded — no bandwidth cost) |
| AI summaries | add-on, Bahasa Indonesia + legal-field classification |
| Incremental runs | checkpoint per scope; repeat runs resume instead of re-scraping |
Quick start
Only maxItems usually needs changing.
{"sources": ["setneg"],"jenis": ["UU"],"tahun": ["2026"],"statusFilter": ["berlaku"],"includeDetail": true,"maxItems": 100}
Fetch the latest 2026 laws from the Cabinet Secretariat source, with details and relations.
Input reference
All fields are optional.
| Field | Type | Default | Notes |
|---|---|---|---|
sources | string[] | ["setneg"] | setneg, kemenkeu, bpk, ma, komdigi. Combine freely. |
jenis | string[] | [] | Regulation type code: UU, PP, PERPRES, INPRES, KEPPRES, PERPU, … Empty = all. |
tahun | string[] | [] | Year, e.g. ["2026"]. Empty = all years. |
keywords | string | "" | Server-side keyword filter on the title field. |
statusFilter | string[] | [] | berlaku (in force) | sebagian (partial) | dicabut (revoked). Applied client-side. |
includeDetail | boolean | true | Fetch full detail + relations per regulation. |
includePdf | boolean | false | Include the official PDF URL only. |
includeAiSummary | boolean | false | Add AI summary + legal-field classification (add-on event). |
bulkRefresh | boolean | false | Opt in to re-charging records already paid for in an earlier run of the same scope. |
maxItems | integer | 1000 | Hard cap on records processed per run. |
kemenkeuQueries | string[] | 7 broad queries | Keywords for the Ministry of Finance API (fuzzy search). |
kemenkeuMaxPages | integer | 50 | Page cap per keyword (10 records/page). |
bpkMaxPages | integer | 10 | Page cap for BPK JDIH search (~10–15 regulations/page). |
maJenis | string | "puu" | puu (PERMA/SEMA/KMA), putusan (court decisions), monografi-hukum, artikel-hukum, rancangan-puu, naskah-akademik, … |
maTahun | string[] | [] | Year filter for Mahkamah Agung. Set this — without it only the first 114 pages of the puu corpus are reachable. |
maMaxPages | integer | 10 | Page cap (max 500). |
komdigiMaxPages | integer | 10 | Page cap for the Komdigi JDIH (10 products/page). |
Diagnostic inputs (exit without writing output and without charging): diagnoseProxy, diagnoseHosts, probeUrl, captureUrls.
Record IDs are prefixed with their source (
setneg:P20664,kemenkeu:per-8pj2026), so combining sources never produces collisions.
Output reference
One dataset row per document. Field names are kept in Indonesian because the sources use them — the English meaning is in the mapping below.
{"id": "setneg:P20664","jns": "UU","no": "27","tahun": "2026","tentang": "PELINDUNGAN KETENAGAKERJAAN","statusHukum": "berlaku","statusDetail": "Disahkan","subjek": "Ketenagakerjaan","bidangHukum": "Ketenagakerjaan","diundangkan": "2026-10-28T00:00:00.000Z","ln": "179","tln": "7201","relasi": { "mencabut": [], "diubah": [], "terkait": [] },"sumber": "setneg"}
(Real row from run LBIoH76IGigOorHwW, not a sample.)
Field mapping
| Field | Meaning |
|---|---|
id | Unique record ID, source-prefixed |
jns | Regulation type code (UU = law, PP = government regulation, …) |
no | Regulation number |
tahun | Year |
tentang | Title / subject matter |
statusHukum | Legal status: berlaku = in force, sebagian = partially, dicabut = revoked |
statusDetail | Detailed status, e.g. Disahkan (enacted) |
subjek | Subject |
bidangHukum | Legal field / sector |
diundangkan | Enactment date (ISO 8601) |
ln | State Gazette number (Lembaran Negara) |
tln | Supplementary State Gazette number (Tambahan Lembaran Negara) |
relasi.mencabut | Regulations this one repeals |
relasi.diubah | Regulations that amend this one |
relasi.terkait | Related regulations |
sumber | Source key (setneg, kemenkeu, bpk, ma, komdigi) |
urlPdf | Official PDF URL (only with includePdf: true) |
aiSummary | AI summary in Bahasa Indonesia (only with includeAiSummary: true) |
statusHukum vs statusDetail
statusHukum is the normalized three-value legal status that filtering works on. statusDetail is the source's raw wording and varies by source. Filter on statusHukum; display statusDetail.
Data sources & coverage
| Source key | Institution | Records | Access |
|---|---|---|---|
setneg | Cabinet Secretariat JDIH (jdih.setneg.go.id) | 6,978 national regulations | JSON API |
kemenkeu | Ministry of Finance JDIH (jdih.kemenkeu.go.id) | 10,000+ | JSON API |
bpk | BPK JDIH (peraturan.bpk.go.id) | 303,283 — national, provincial, regency/city | HTML, via unblocking proxy |
ma | Supreme Court JDIH (jdih.mahkamahagung.go.id) | 57,185 — 52,104 PPU, 4,650 rulings, plus monographs and articles | HTML, via unblocking proxy |
komdigi | Ministry of Communication & Digital JDIH | 784 legal products | HTML, via unblocking proxy |
Not included, deliberately: peraturan.go.id (Directorate General of Legislation) and jdihn.go.id. Both hosts block datacenter IP ranges, so they cannot be reached reliably from the Apify platform. Providing them would mean silent, unpredictable gaps — worse than omitting them.
Data is taken as-is from official government sources and provided for research and informational purposes.
Pricing
Pay-per-event. You pay only for records that actually land in your dataset.
| Event | Price | What it covers |
|---|---|---|
peraturan | $0.0025 / record | Primary event. Metadata + legal status. |
detail | $0.0030 / record | Full 30-field detail + relations. |
ai-summary | $0.0013 / record | Add-on AI summary (Indonesian). |
bulk-refresh | $0.0005 / record | Re-charging records already paid for (requires bulkRefresh: true). |
Typical full package (peraturan + detail + ai-summary) = $0.0068 per record.
Volume discounts by plan
Pricing is tiered automatically by your Apify plan. No coupon or code needed — the Actor detects your tier at run time.
| Tier | peraturan | detail | ai-summary |
|---|---|---|---|
| FREE | $0.0025 | $0.0030 | $0.0013 |
| BRONZE | $0.0023 | $0.0027 | $0.0012 |
| SILVER | $0.0020 | $0.0024 | $0.0010 |
| GOLD | $0.0018 | $0.0020 | $0.0009 |
Platform compute cost drops at higher tiers too, so discounts hold at ~93–94% margin — they are sustainable, not loss leaders.
Records already paid for in an earlier run of the same scope are not charged again, unless you set
bulkRefresh: true. Repeat runs are cheap by default.
Budget control
Set maxTotalChargeUsd on a run and the Actor trims records before writing them, so your bill can never exceed the cap. The remaining budget is recalculated after each event, because all events share the same ceiling.
If the budget runs out mid-run, the log states it explicitly:
[jdih] wrote=9 budget=unlimited planned=9 total=9 id=<datasetId>
Only records that were actually written are charged. Trimmed records are never written and never billed.
Using it from code and AI agents
Apify API (synchronous run):
curl -X POST "https://api.apify.com/v2/acts/epiconetic~indonesia-law-data/run-sync-get-dataset-items?token=$APIFY_TOKEN" \-H "Content-Type: application/json" \-d '{"sources":["setneg"],"tahun":["2026"],"maxItems":10}'
From an AI agent over MCP (Apify MCP server, https://mcp.apify.com/):
call-actor actor="epiconetic/indonesia-law-data"input={"sources":["setneg"],"tahun":["2026"],"maxItems":10}
Then read results with get-dataset-items.
Pass array inputs as real JSON arrays (["setneg"]), not objects.
From the Apify Console: open the Actor, fill the form, press Start. No setup required.
Reliability & known source quirks
Documented so you can trust the gaps instead of discovering them yourself.
- The
statusquery parameter on the SETNEG API is ignored server-side. Status filtering is applied client-side; pagination continues untilmaxItemsrecords pass the filter or the corpus is exhausted. /api/hukumproduk/statusalways returns HTTP 500. Never called.mengubahanddicabutfields are always empty. Relations come fromterkait+mencabut+diubah.- Source servers are fragile with connection reuse. Requests use
Connection: closeplus exponential-backoff retry (1 s → 2 s → 4 s + jitter, 4 attempts). - Request timeout is 20 s. Healthy requests take 2–4 s; a long timeout just parks a worker.
startis a record index, not a page offset.length=10withstart=0/10/20yields contiguous, non-overlapping blocks.- PDFs are large (one law was 12.8 MB). Only URLs are stored.
- No residential proxy, by design. Government sources do not block datacenter IPs, and a browser plus proxy would cost ~56× more and erase the margin.
jnsis open-ended — beyond the 8 enumerated types there are values likePERMENSESNEGandKEPMENSESNEG. There is no type whitelist; values pass through to the source.dicabutfrequency varies between samples (12.5% in one 600-record probe, 0.3% in another). Treat it as a valid filter value, not a reliably rare category.
Legal notice
Data in this Actor is provided for research and general information purposes only.
This Actor does not provide legal advice and is not a substitute for a qualified legal professional. Always refer to the official regulation text (the urlPdf link) and the currently effective law before making legal decisions.
Indonesian regulations are public information published by government sources. This Actor redistributes that data as-is, without guaranteeing completeness or currency beyond the source snapshot.
Project structure
src/main.js # orchestrator: input -> pipeline -> dataset -> chargesources/setneg.js # Cabinet Secretariat JSON APIkemenkeu.js # Ministry of Finance JSON APIbpk.js # BPK JDIH HTML parserma.js # Supreme Court HTML parserkomdigi.js # Komdigi JDIH HTML parserpgo.js # peraturan.go.id (implemented, host blocks DC IPs)lib/http.js # fetch + retry + backoff + timeout + Connection: closeproxyfetch.js # unblocking-proxy fetch for HTML sourcescharge.js # PPE charging wrapper + tier-aware event resolutiontier.js # user discount-tier resolver (FREE/BRONZE/SILVER/GOLD)dedupe.js # record key normalizationfilters.js # client-side status filter + maxItemsai.js # AI summaries (injectable provider, parallel)kv.js # per-scope checkpoint storescope.js # scope key = hash of scraping parametersschemas/input-schema.json # Apify input schemaoutput-schema.json # full JSON Schema contractoutput-platform-schema.json # Apify dataset column schemascripts/smoke.js # live smoke test against the real sourcesverify-actor.js # end-to-end verification incl. dataset contentsregister-tier-events.py # register/update tiered PPE events via APItests/ # 641 vitest tests, no network requiredtests/inputs/ # JSON input fixtures for local and remote runs.actor/actor.json # Actor definitiondataset_schema.json # dataset column schemadocs/ # provenance: brief, prompts, review notesBRIEF.md # verified facts + coverage numbersPROMPT.md / TASK.md # original build instructionsFIXPROMPT.md / TASK-FIX.md / FIX-WRITTEN.mdREVIEW.md / TAHAP2-BRIEF.mdNOTES.md # assumptions (ASUMSI) recorded during the build
License
Actor code is provided as-is. Regulation data originates from Indonesian government public sources; observe the terms of each source when redistributing.