Indonesian Law Data — JDIH Scraper avatar

Indonesian Law Data — JDIH Scraper

Under maintenance

Pricing

from $2.50 / 1,000 peraturans

Go to Apify Store
Indonesian Law Data — JDIH Scraper

Indonesian Law Data — JDIH Scraper

Under maintenance

Scrape 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

dedy iskandar

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

2 days ago

Last modified

Features

Limited permissions

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

FeatureDetail
Regulation metadatatype, number, year, title, legal status
Full detail30 fields including State Gazette numbers, subject, legal field, enactment date
Relationsrepeals / amended by / related regulations
Court decisionsMahkamah Agung rulings (4,650+) and PERMA/SEMA circulars
Official PDF linkURL only (files are not downloaded — no bandwidth cost)
AI summariesadd-on, Bahasa Indonesia + legal-field classification
Incremental runscheckpoint 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.

FieldTypeDefaultNotes
sourcesstring[]["setneg"]setneg, kemenkeu, bpk, ma, komdigi. Combine freely.
jenisstring[][]Regulation type code: UU, PP, PERPRES, INPRES, KEPPRES, PERPU, … Empty = all.
tahunstring[][]Year, e.g. ["2026"]. Empty = all years.
keywordsstring""Server-side keyword filter on the title field.
statusFilterstring[][]berlaku (in force) | sebagian (partial) | dicabut (revoked). Applied client-side.
includeDetailbooleantrueFetch full detail + relations per regulation.
includePdfbooleanfalseInclude the official PDF URL only.
includeAiSummarybooleanfalseAdd AI summary + legal-field classification (add-on event).
bulkRefreshbooleanfalseOpt in to re-charging records already paid for in an earlier run of the same scope.
maxItemsinteger1000Hard cap on records processed per run.
kemenkeuQueriesstring[]7 broad queriesKeywords for the Ministry of Finance API (fuzzy search).
kemenkeuMaxPagesinteger50Page cap per keyword (10 records/page).
bpkMaxPagesinteger10Page cap for BPK JDIH search (~10–15 regulations/page).
maJenisstring"puu"puu (PERMA/SEMA/KMA), putusan (court decisions), monografi-hukum, artikel-hukum, rancangan-puu, naskah-akademik, …
maTahunstring[][]Year filter for Mahkamah Agung. Set this — without it only the first 114 pages of the puu corpus are reachable.
maMaxPagesinteger10Page cap (max 500).
komdigiMaxPagesinteger10Page 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

FieldMeaning
idUnique record ID, source-prefixed
jnsRegulation type code (UU = law, PP = government regulation, …)
noRegulation number
tahunYear
tentangTitle / subject matter
statusHukumLegal status: berlaku = in force, sebagian = partially, dicabut = revoked
statusDetailDetailed status, e.g. Disahkan (enacted)
subjekSubject
bidangHukumLegal field / sector
diundangkanEnactment date (ISO 8601)
lnState Gazette number (Lembaran Negara)
tlnSupplementary State Gazette number (Tambahan Lembaran Negara)
relasi.mencabutRegulations this one repeals
relasi.diubahRegulations that amend this one
relasi.terkaitRelated regulations
sumberSource key (setneg, kemenkeu, bpk, ma, komdigi)
urlPdfOfficial PDF URL (only with includePdf: true)
aiSummaryAI 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 keyInstitutionRecordsAccess
setnegCabinet Secretariat JDIH (jdih.setneg.go.id)6,978 national regulationsJSON API
kemenkeuMinistry of Finance JDIH (jdih.kemenkeu.go.id)10,000+JSON API
bpkBPK JDIH (peraturan.bpk.go.id)303,283 — national, provincial, regency/cityHTML, via unblocking proxy
maSupreme Court JDIH (jdih.mahkamahagung.go.id)57,185 — 52,104 PPU, 4,650 rulings, plus monographs and articlesHTML, via unblocking proxy
komdigiMinistry of Communication & Digital JDIH784 legal productsHTML, 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.

EventPriceWhat it covers
peraturan$0.0025 / recordPrimary event. Metadata + legal status.
detail$0.0030 / recordFull 30-field detail + relations.
ai-summary$0.0013 / recordAdd-on AI summary (Indonesian).
bulk-refresh$0.0005 / recordRe-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.

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

  1. The status query parameter on the SETNEG API is ignored server-side. Status filtering is applied client-side; pagination continues until maxItems records pass the filter or the corpus is exhausted.
  2. /api/hukumproduk/status always returns HTTP 500. Never called.
  3. mengubah and dicabut fields are always empty. Relations come from terkait + mencabut + diubah.
  4. Source servers are fragile with connection reuse. Requests use Connection: close plus exponential-backoff retry (1 s → 2 s → 4 s + jitter, 4 attempts).
  5. Request timeout is 20 s. Healthy requests take 2–4 s; a long timeout just parks a worker.
  6. start is a record index, not a page offset. length=10 with start=0/10/20 yields contiguous, non-overlapping blocks.
  7. PDFs are large (one law was 12.8 MB). Only URLs are stored.
  8. 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.
  9. jns is open-ended — beyond the 8 enumerated types there are values like PERMENSESNEG and KEPMENSESNEG. There is no type whitelist; values pass through to the source.
  10. dicabut frequency 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.

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 -> charge
sources/
setneg.js # Cabinet Secretariat JSON API
kemenkeu.js # Ministry of Finance JSON API
bpk.js # BPK JDIH HTML parser
ma.js # Supreme Court HTML parser
komdigi.js # Komdigi JDIH HTML parser
pgo.js # peraturan.go.id (implemented, host blocks DC IPs)
lib/
http.js # fetch + retry + backoff + timeout + Connection: close
proxyfetch.js # unblocking-proxy fetch for HTML sources
charge.js # PPE charging wrapper + tier-aware event resolution
tier.js # user discount-tier resolver (FREE/BRONZE/SILVER/GOLD)
dedupe.js # record key normalization
filters.js # client-side status filter + maxItems
ai.js # AI summaries (injectable provider, parallel)
kv.js # per-scope checkpoint store
scope.js # scope key = hash of scraping parameters
schemas/
input-schema.json # Apify input schema
output-schema.json # full JSON Schema contract
output-platform-schema.json # Apify dataset column schema
scripts/
smoke.js # live smoke test against the real sources
verify-actor.js # end-to-end verification incl. dataset contents
register-tier-events.py # register/update tiered PPE events via API
tests/ # 641 vitest tests, no network required
tests/inputs/ # JSON input fixtures for local and remote runs
.actor/
actor.json # Actor definition
dataset_schema.json # dataset column schema
docs/ # provenance: brief, prompts, review notes
BRIEF.md # verified facts + coverage numbers
PROMPT.md / TASK.md # original build instructions
FIXPROMPT.md / TASK-FIX.md / FIX-WRITTEN.md
REVIEW.md / TAHAP2-BRIEF.md
NOTES.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.