Search + Detail For School In Indonesia
by RFour · Jul 11, 2026 ·javascript
You can search and check detail about the school
SchoolSekolahMalazJs
| 1 | function caridulucuy(kw, cb) { |
| 2 | const ua = 'Mozilla/5.0 (Linux; Android 13; Mobile) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Mobile Safari/537.36'; |
| 3 | fetch(`https://dapo.kemendikdasmen.go.id/api/getHasilPencarian?keyword=${encodeURIComponent(kw)}`, { |
| 4 | headers: { 'User-Agent': ua, 'X-Requested-With': 'XMLHttpRequest', 'Accept': 'application/json' } |
| 5 | }) |
| 6 | .then(r => r.json()) |
| 7 | .then(dat => { |
| 8 | const out = dat.map(s => ({ |
| 9 | id: s.sekolah_id_enkrip.trim(), |
| 10 | nama: s.nama_sekolah, |
| 11 | npsn: s.npsn, |
| 12 | status: s.status, |
| 13 | alamat: s.alamat_jalan, |
| 14 | kecamatan: s.kecamatan, |
| 15 | kabupaten: s.kabupaten, |
| 16 | provinsi: s.propinsi |
| 17 | })); |
| 18 | cb(JSON.stringify(out, null, 2)); |
| 19 | }) |
| 20 | .catch(() => cb(null)); |
| 21 | } |
| 22 | |
| 23 | caridulucuy('Purbalingga', console.log); |