# Schools, universities and hospitals

> Documentation index for AI agents: [/llms.txt](https://docs.apiindonesia.id/llms.txt). Every page is also available as markdown: add `.md` to the URL.

Schools by NPSN, universities and hospitals.

Schools: 93,500+ (by NPSN). Universities and other higher-education institutions: 4,200+ (active records). Hospitals: 2,900+.

All endpoints need the `x-api-key` header (see [Authentication](https://docs.apiindonesia.id/authentication.md)) and return the standard [envelope](https://docs.apiindonesia.id/errors.md). A successful request costs 2 credits.

## Endpoints on this page

- [`GET /api/v1/sekolah`](#get-api-v1-sekolah): List schools
- [`GET /api/v1/sekolah/search`](#get-api-v1-sekolah-search): Search schools
- [`GET /api/v1/sekolah/{npsn}`](#get-api-v1-sekolah-npsn): Retrieve a school
- [`GET /api/v1/kampus`](#get-api-v1-kampus): List universities
- [`GET /api/v1/kampus/search`](#get-api-v1-kampus-search): Search universities
- [`GET /api/v1/kampus/{id}`](#get-api-v1-kampus-id): Retrieve a university
- [`GET /api/v1/rumah-sakit`](#get-api-v1-rumah-sakit): List hospitals
- [`GET /api/v1/rumah-sakit/search`](#get-api-v1-rumah-sakit-search): Search hospitals
- [`GET /api/v1/rumah-sakit/{id}`](#get-api-v1-rumah-sakit-id): Retrieve a hospital

## Schools

### GET /api/v1/sekolah

**List schools.** Returns a paginated list of schools with name/NPSN search plus region, level, status, and accreditation filters.

| Parameter | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| `provinsi_id` | query | no | string | Filter by province code. |
| `kabupaten_id` | query | no | string | Filter by regency/city code. |
| `district_id` | query | no | string | Filter by district ID. Indonesian alias: kecamatan_id. |
| `district_code` | query | no | string | Filter by district code. Indonesian alias: kecamatan_code. |
| `jenis` | query | no | string | School level: SD, SMP, SMA, SMK, or SLB. |
| `grade` | query | no | string | English alias for jenis/school level. |
| `type` | query | no | string | Additional alias for jenis/school level. |
| `status` | query | no | string | School status: Negeri (state) or Swasta (private). |
| `accreditation` | query | no | string | Filter by accreditation grade. Indonesian alias: akreditasi. |
| `q` | query | no | string | Exact NPSN or school-name prefix, minimum 2 characters. |
| `page` | query | no | integer | Page to retrieve. Defaults to 1. |
| `per_page` | query | no | integer | Items per page. Defaults to 50, maximum 200. |

```bash
curl "https://use.apiindonesia.id/api/v1/sekolah" \
  -H "x-api-key: YOUR_API_KEY"
```

Example response (shortened):

```json
{
  "data": [
    {
      "npsn": "20219557",
      "name": "SMA NEGERI 3 BANDUNG",
      "jenis": "SMA",
      "status": "Negeri",
      "province_id": "32",
      "regency_id": "3273",
      "district_id": "3273190",
      "village_id": "3273190004",
      "address": "Jl. Belitung No. 8",
      "postal_code": "40113",
      "lat": -6.9106,
      "lng": 107.6183,
      "phone": "0224235154",
      "email": null,
      "website": null,
      "accreditation": "A",
      "source_name": "kemendikbud-reference",
      "source_url": "https://referensi.data.kemdikbud.go.id/",
      "source_synced_at": "2026-09-18T00:00:00Z",
      "is_active": 1
    }
  ],
  "meta": {
    "total": 27,
    "page": 1,
    "per_page": 50,
    "total_pages": 1
  }
}
```

### GET /api/v1/sekolah/search

**Search schools.** Searches schools by name. Returns up to 50 results.

| Parameter | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| `q` | query | yes | string | Search keyword, minimum 3 characters. |

```bash
curl "https://use.apiindonesia.id/api/v1/sekolah/search?q=taruna" \
  -H "x-api-key: YOUR_API_KEY"
```

Example response (shortened):

```json
{
  "data": [
    {
      "npsn": "20302879",
      "name": "SMA TARUNA NUSANTARA",
      "jenis": "SMA",
      "status": "Swasta",
      "province_id": "33",
      "regency_id": "3308",
      "accreditation": "A",
      "is_active": 1
    }
  ]
}
```

### GET /api/v1/sekolah/{npsn}

**Retrieve a school.** Returns a single school by NPSN, including province, regency/city, district, and village names.

| Parameter | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| `npsn` | path | yes | string | NPSN (national school ID). |

```bash
curl "https://use.apiindonesia.id/api/v1/sekolah/20219557" \
  -H "x-api-key: YOUR_API_KEY"
```

Example response (shortened):

```json
{
  "data": {
    "npsn": "20219557",
    "name": "SMA NEGERI 3 BANDUNG",
    "jenis": "SMA",
    "status": "Negeri",
    "province_id": "32",
    "regency_id": "3273",
    "address": "Jl. Belitung No. 8",
    "postal_code": "40113",
    "accreditation": "A",
    "is_active": 1,
    "province_name": "JAWA BARAT",
    "regency_name": "KOTA BANDUNG",
    "district_name": "SUMUR BANDUNG",
    "village_name": "MERDEKA"
  }
}
```

## Universities

### GET /api/v1/kampus

**List universities.** Returns a paginated, filterable list of higher-education institutions, including province and regency/city names.

| Parameter | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| `q` | query | no | string | Search by name or abbreviation. |
| `province` | query | no | string | Filter by province code. Legacy alias: provinsi_id. |
| `regency` | query | no | string | Filter by regency/city code. Legacy alias: kabupaten_id. |
| `type` | query | no | string | Type: universitas, institut, politeknik, akademi, or sekolah_tinggi. Legacy alias: jenis. |
| `group` | query | no | string | Group: PTN, PTS, PTA, or PTK. Legacy alias: kelompok. |
| `page` | query | no | integer | Page to retrieve. Defaults to 1. |
| `per_page` | query | no | integer | Items per page. Defaults to 50, maximum 200. |

```bash
curl "https://use.apiindonesia.id/api/v1/kampus" \
  -H "x-api-key: YOUR_API_KEY"
```

Example response (shortened):

```json
{
  "data": [
    {
      "id": "pt_001",
      "name": "INSTITUT TEKNOLOGI BANDUNG",
      "short_name": "ITB",
      "jenis": "institut",
      "kelompok": "PTN",
      "province_id": "32",
      "regency_id": "3273",
      "address": "Jl. Ganesha No. 10",
      "postal_code": "40132",
      "website": "https://itb.ac.id",
      "accreditation": "Unggul",
      "is_active": 1,
      "province_name": "JAWA BARAT",
      "regency_name": "KOTA BANDUNG"
    }
  ],
  "meta": {
    "total": 12,
    "page": 1,
    "per_page": 50,
    "total_pages": 1
  }
}
```

### GET /api/v1/kampus/search

**Search universities.** Searches institutions by name or abbreviation. Returns up to 50 results.

| Parameter | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| `q` | query | yes | string | Search keyword, minimum 2 characters. |

```bash
curl "https://use.apiindonesia.id/api/v1/kampus/search?q=itb" \
  -H "x-api-key: YOUR_API_KEY"
```

Example response (shortened):

```json
{
  "data": [
    {
      "id": "pt_001",
      "name": "INSTITUT TEKNOLOGI BANDUNG",
      "short_name": "ITB",
      "jenis": "institut",
      "kelompok": "PTN",
      "province_id": "32",
      "regency_id": "3273"
    }
  ]
}
```

### GET /api/v1/kampus/{id}

**Retrieve a university.** Returns a single institution by ID, including province and regency/city names.

| Parameter | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| `id` | path | yes | string | Institution ID. |

```bash
curl "https://use.apiindonesia.id/api/v1/kampus/pt_001" \
  -H "x-api-key: YOUR_API_KEY"
```

Example response (shortened):

```json
{
  "data": {
    "id": "pt_001",
    "name": "INSTITUT TEKNOLOGI BANDUNG",
    "short_name": "ITB",
    "jenis": "institut",
    "kelompok": "PTN",
    "province_id": "32",
    "regency_id": "3273",
    "address": "Jl. Ganesha No. 10",
    "postal_code": "40132",
    "website": "https://itb.ac.id",
    "accreditation": "Unggul",
    "is_active": 1,
    "province_name": "JAWA BARAT",
    "regency_name": "KOTA BANDUNG"
  }
}
```

## Hospitals

### GET /api/v1/rumah-sakit

**List hospitals.** Compact list with name/code search and region, type, class, ownership, and BLU filters. Use the detail endpoint for service, staff, bed, and facility collections.

| Parameter | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| `q` | query | no | string | Search partial hospital name or code. |
| `code` | query | no | string | Filter by exact SIRS code. |
| `province_id` | query | no | string | Filter by province code. Legacy alias: provinsi_id. |
| `regency_id` | query | no | string | Filter by regency/city code. Legacy alias: kabupaten_id. |
| `type` | query | no | string | Filter by raw SIRS hospital type or legacy type code. Alias: jenis. |
| `class` | query | no | string | Filter by hospital class. Alias: kelas. |
| `ownership` | query | no | string | Filter by ownership. Alias: kepemilikan. |
| `blu` | query | no | string | Filter BLU/BLUD status by SIRS label or boolean. Alias: blu_status/is_blu. |
| `page` | query | no | integer | Page to retrieve. Defaults to 1. |
| `per_page` | query | no | integer | Items per page. Defaults to 50, maximum 200. |

```bash
curl "https://use.apiindonesia.id/api/v1/rumah-sakit" \
  -H "x-api-key: YOUR_API_KEY"
```

Example response (shortened):

```json
{
  "data": [
    {
      "id": "rs-3204086",
      "code": "3204086",
      "name": "RS UMUM DAERAH AL IHSAN PROVINSI JAWA BARAT",
      "jenis": "RSUM",
      "hospital_type": "RS_RUJUKAN_PROVINSI",
      "kelas": null,
      "ownership": null,
      "is_blu": 0,
      "blu_status": null,
      "province_id": "32",
      "regency_id": "3204",
      "lat": -7.0081,
      "lng": 107.624,
      "beds_total": 462,
      "province_name": "JAWA BARAT",
      "regency_name": "KABUPATEN BANDUNG"
    }
  ],
  "meta": {
    "total": 1,
    "page": 1,
    "per_page": 50,
    "total_pages": 1
  }
}
```

### GET /api/v1/rumah-sakit/search

**Search hospitals.** Searches hospitals by name/code with the same filters as the list endpoint. Returns up to 50 results.

| Parameter | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| `q` | query | no | string | Name/code keyword, minimum 2 characters when code is absent. |
| `code` | query | no | string | Exact SIRS code. |

```bash
curl "https://use.apiindonesia.id/api/v1/rumah-sakit/search" \
  -H "x-api-key: YOUR_API_KEY"
```

Example response (shortened):

```json
{
  "data": [
    {
      "id": "rs_3273_001",
      "name": "RSUP Dr. Hasan Sadikin",
      "jenis": "RSUM",
      "kelas": "A",
      "ownership": "Kemenkes",
      "province_id": "32",
      "regency_id": "3273"
    }
  ]
}
```

### GET /api/v1/rumah-sakit/{id}

**Retrieve a hospital.** Returns a full profile by internal ID or SIRS code, including available bed, service, staff, facility, provenance, and synchronization details.

| Parameter | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| `id` | path | yes | string | Internal ID or SIRS code. |

```bash
curl "https://use.apiindonesia.id/api/v1/rumah-sakit/3204086" \
  -H "x-api-key: YOUR_API_KEY"
```

Example response (shortened):

```json
{
  "data": {
    "id": "rs-3204086",
    "code": "3204086",
    "name": "RS UMUM DAERAH AL IHSAN PROVINSI JAWA BARAT",
    "jenis": "RSUM",
    "hospital_type": "RS_RUJUKAN_PROVINSI",
    "kelas": null,
    "ownership": null,
    "is_blu": 0,
    "blu_status": null,
    "director": null,
    "address": "JL. KI ASTRAMANGGALA BALE ENDAH KAB. BANDUNG",
    "phone": "(022) 5940872",
    "beds_total": 462,
    "source_name": "Pusdatin Kemenkes export via zakiego/data-pusdatin-kemenkes",
    "source_url": "https://github.com/zakiego/data-pusdatin-kemenkes",
    "province_name": "JAWA BARAT",
    "regency_name": "KABUPATEN BANDUNG",
    "beds": [],
    "services": [],
    "staff": [],
    "facilities": [],
    "provenance": {
      "source_record_code": "3204086"
    }
  }
}
```
