Open dataset of Pakistan's administrative hierarchy — 7 provinces/territories, 160 districts, and 577 tehsils. This repository provides structured, bilingual (Urdu + English) reference data with geographic coordinates and postal codes at every level. Designed for developers, researchers, government agencies, and AI agents.
Licensed under CC-BY-4.0. Browse the hierarchy through GitHub's folder navigation, download aggregate files in JSON/CSV/NDJSON, or integrate directly via raw URLs.
| Item | Details |
|---|---|
| Province | 7 |
| District | 160 |
| Tehsil | 577 |
| Coordinates | ✅ Included (all levels) |
| Postal Codes | ✅ Included (tehsil level) |
| Formats | JSON, NDJSON, CSV |
| License | CC-BY-4.0 |
| Last Updated | 2026-05-27 |
| Website | openadmindata.org/pk |
| API | openadmindata.org/api/pk |
| # | Province | Districts | Tehsils | Link |
|---|---|---|---|---|
| 1 | آزاد کشمیر (Azad Kashmir) | 10 | 32 | Browse |
| 2 | بلوچستان (Balochistan) | 35 | 103 | Browse |
| 3 | گلگت بلتستان (Gilgit Baltistan) | 14 | 24 | Browse |
| 4 | اسلام آباد (Islamabad) | 1 | 1 | Browse |
| 5 | خیبرپختونخوا (Khyber Pakhtunkhwa) | 35 | 153 | Browse |
| 6 | پنجاب (Punjab) | 36 | 139 | Browse |
| 7 | سندھ (Sindh) | 29 | 125 | Browse |
| File | Format | Description |
|---|---|---|
| all-province.json | JSON | All 7 province records |
| all-district.json | JSON | All 160 district records |
| all-tehsil.json | JSON | All 577 tehsil records |
| all-flat.json | JSON | Levels 1-2 flat array |
| all-flat.ndjson | NDJSON | Streaming format |
| all-flat.csv | CSV | Spreadsheet format |
| hierarchy.json | JSON | Nested tree |
| schema.json | JSON Schema | Data schema |
import json
with open("data/all-province.json", "r", encoding="utf-8") as f:
data = json.load(f)
for r in data:
print(f"{r['name']['local']} ({r['name']['en']}) — {r['children_count']['district']} districts")import { readFileSync } from "fs";
const data = JSON.parse(readFileSync("data/all-province.json", "utf-8"));
console.log(`Total: ${data.length} provinces`);| Field | Type | Description |
|---|---|---|
id |
string | Unique identifier |
level |
integer | 1=province, 2=district, 3=tehsil |
level_name |
object | Level label (local + English) |
name.local |
string | Name in local script |
name.en |
string | English name |
name.slug |
string | URL-safe slug |
parent |
object/null | Parent division reference |
ancestors |
array | Full ancestor chain |
children_count |
object | Count of children per level |
zip_codes |
array | Postal codes (where available) |
geo.lat |
string | Latitude (WGS84) |
geo.lon |
string | Longitude (WGS84) |
Full schema: data/schema.json
divisions/{province-slug}/
divisions/{province-slug}/{district-slug}/
Tehsils are listed inline in each district's README.
- llms.txt — Quick reference for AI agents
- llms-full.txt — Summary with per-province links
- Per-province data — Full data by province
Pakistan Administrative Divisions Dataset (CC-BY-4.0)
URL: https://github.com/open-admin-data/pakistan-administrative-divisions
See CITATION.cff for machine-readable citation.
- Data: CC-BY-4.0
- Open Admin Data — Browse, search and explore administrative divisions for every country
- open-admin-data — GitHub organization with all country repos
- ListBase — Structured reference data for every country