wilayah
Wilayah is an Indonesian administrative region and island code database synchronized with official 2025 government regulations (Kepmendagri). It provides PHP/MySQL/AJAX tooling to query and display hierarchical administrative data (provinces, districts, subdistricts, villages) plus population, area, and geographic metadata for Indonesia.
Key facts
Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.
| Field | Value |
|---|---|
| Repository | cahyadsn/wilayah |
| Owner | cahyadsn |
| Primary language | SQL |
| License | MIT — OSI-approved |
| Stars | 1.2k |
| Forks | 413 |
| Open issues | 5 |
| Latest release | v2026.7 (2026-07-02) |
| Last updated | 2026-07-03 |
| Source | https://github.com/cahyadsn/wilayah |
What wilayah is
SQL-primary repository delivering normalized MySQL schemas for Indonesian administrative boundaries per Kepmendagri No 300.2.2-2430 (2025), with historical versions back to 2015, coordinate/elevation/timezone attributes, and a web demo built on PHP+AJAX. Includes alternative PostgreSQL dumps and related boundary/logo/postal-code datasets.
Get the wilayah source
Clone the repository and explore it locally.
git clone https://github.com/cahyadsn/wilayah.gitcd wilayah# follow the project's README for install & configurationNeed it deployed, integrated, or customized instead? DEV.co ships production installs.
Best use cases
Implementation considerations
- Import wilayah.sql into MySQL (or wilayah_level_1_2_postgresql.sql for PostgreSQL); verify schema version matches your Kepmendagri requirement (2025 vs. archived versions).
- Establish a data refresh schedule linked to annual Kepmendagri releases; plan migration scripts if regulatory code changes occur (e.g., new provinces, boundary shifts).
- Test hierarchical queries (province → district → subdistrict → village) and join performance on the `id_prov`, `id_kabkota`, `id_kecamatan` foreign keys.
- If using boundaries or coordinates, cross-validate with Badan Informasi Geospasial (BIG) data and clarify projection/datum with your GIS team.
- Plan for validation of postal code mappings if linking to wilayah_kodepos; ensure codes remain current after administrative changes.
When to avoid it — and what to weigh
- Global Multi-Country Deployments — This is Indonesia-specific only. If you need administrative data for other nations or a unified global schema, choose a generalized geospatial solution.
- Real-Time Boundary/Population Updates — Data is released annually per Kepmendagri decree; no live APIs or incremental feeds. If you need sub-annual refresh cycles, plan for custom sync pipelines.
- Minimal DB Footprint Requirements — The full schema and spatial boundaries are substantial SQL dumps; low-bandwidth or embedded-only projects may prefer lightweight REST endpoints or vector tiles instead.
- Regulatory Compliance Outside Government Context — Kepmendagri alignment is mandatory for government vendors but optional for private sector. Private ventures should verify whether official codes are contractually required.
License & commercial use
MIT License. Permissive OSI-approved license allowing commercial use, modification, and distribution with attribution. No copyleft restrictions.
MIT permits commercial deployment without royalties or additional licensing. However, if you are a government contractor, verify that your procurement terms require Kepmendagri-certified data (this repo aligns but may not carry explicit vendor liability). For SaaS redistribution, retain attribution.
DEV.co evaluation signals
Editorial assessment — not user reviews. Directional, with an explicit confidence level.
| Signal | Assessment |
|---|---|
| Maintenance | Active |
| Documentation | Adequate |
| License clarity | Clear |
| Deployment complexity | Low |
| DEV.co fit | Good |
| Assessment confidence | High |
No explicit security audit data. Considerations: (1) SQL dumps are data-only; validate input on any web layer accepting region codes. (2) If exposing via APIs, implement rate limiting and input validation to prevent injection attacks. (3) The demo app (PHP+AJAX) predates modern frameworks; conduct code review before production use. (4) No mention of access control or PII handling; government projects should add encryption and audit logging. (5) Keep MySQL/PostgreSQL patched.
Alternatives to consider
OpenStreetMap (OSM) + Nominatim
Global, crowdsourced administrative boundaries; more granular in some regions. Lacks official Indonesian regulatory alignment and population/area metrics; requires custom mapping to Kepmendagri codes.
Natural Earth Data
Curated global administrative datasets with good performance for maps. Lower specificity for sub-district/village levels; no direct postal-code or population linkage; requires manual validation against Indonesian law.
Badan Informasi Geospasial (BIG) Official Services
Authoritative government source; likely has REST APIs and certified data. Requires direct vendor engagement; potentially higher cost and longer lead times than this open-source snapshot.
Build on wilayah with DEV.co software developers
Contact Devco to build a custom API, government-compliant forms, or geospatial platform on top of this dataset. We handle schema design, validation, and deployment.
Talk to DEV.coRelated open-source tools
Surfaced by semantic similarity across the DEV.co open-source index.
Related on DEV.co
Explore the category and the services that help you build with it.
wilayah FAQ
Is this data current for 2025?
Can I use this in a commercial product?
What about spatial/geographic queries (e.g., 'find all villages in a polygon')?
How do I stay synchronized with new Kepmendagri updates?
Software developers & web developers for hire
Adopting wilayah is usually one piece of a larger software development effort. As a software development agency, DEV.co provides software development services and web development expertise — pairing senior software developers and web developers with your team to design, build, and operate open-source databases software in production.
Ready to integrate authoritative Indonesian region data?
Contact Devco to build a custom API, government-compliant forms, or geospatial platform on top of this dataset. We handle schema design, validation, and deployment.