NepalData
NepalData is a PHP library for looking up Nepal’s provinces, districts, and local levels. It runs in standalone PHP and integrates with Laravel through package discovery, a facade, and dependency injection.
| Included in each language | Records |
|---|---|
| Provinces | 7 |
| Districts | 77 |
| Metropolitan cities | 6 |
| Sub-metropolitan cities | 9 |
| Municipalities | 259 |
| Rural municipalities | 447 |
| Total local levels | 721 |
The data is bundled in English and Nepali. Once installed, NepalData needs no network requests, database, migrations, or package configuration. Use it to populate address forms, list local levels for a selected district, check relationships, or supply localized names to a user interface.
The typed API exposes read-only records and chainable queries. For example, this gets the names of rural municipalities in Kaski:
use KodeFarmers\NepalData\Entities\District;
use KodeFarmers\NepalData\NepalData;
$data = new NepalData();
$names = $data->localLevels()
->whereDistrict(District::KASKI)
->ruralMunicipalities()
->orderByName()
->names();
This guide covers v2.0.0 of kodefarmers/nepaldata. Start with installation and the quick start, or jump directly to the public API. If you’re replacing a v1 installation, see the upgrade guide for how to preserve existing array responses.
The bundled records are a snapshot, and package IDs are not official government codes. Read Data Sources and Limitations before using the package where official completeness or current administrative boundaries matter.