├── data ├── csv │ ├── states.csv │ └── states │ │ ├── Wp_Labuan.csv │ │ ├── Melaka.csv │ │ ├── Perlis.csv │ │ ├── Wp_Putrajaya.csv │ │ ├── Kedah.csv │ │ ├── Kelantan.csv │ │ ├── Pulau_Pinang.csv │ │ ├── Negeri_Sembilan.csv │ │ ├── Pahang.csv │ │ ├── Terengganu.csv │ │ ├── Perak.csv │ │ ├── Sarawak.csv │ │ ├── Johor.csv │ │ └── Selangor.csv └── json │ └── states │ ├── wp_labuan.json │ ├── wp_putrajaya.json │ ├── perlis.json │ ├── melaka.json │ ├── pulau_pinang.json │ ├── kelantan.json │ ├── terengganu.json │ ├── negeri_sembilan.json │ ├── kedah.json │ ├── wp_kuala_lumpur.json │ ├── pahang.json │ ├── sarawak.json │ ├── johor.json │ ├── perak.json │ ├── selangor.json │ └── sabah.json ├── .gitignore ├── examples ├── README.md ├── python_example.py ├── php_example.php └── javascript_example.js ├── process_data.py └── README.md /data/csv/states.csv: -------------------------------------------------------------------------------- 1 | state_code,state_name 2 | JHR,Johor 3 | KDH,Kedah 4 | KTN,Kelantan 5 | KUL,Wp Kuala Lumpur 6 | LBN,Wp Labuan 7 | MLK,Melaka 8 | NSN,Negeri Sembilan 9 | PHG,Pahang 10 | PJY,Wp Putrajaya 11 | PLS,Perlis 12 | PNG,Pulau Pinang 13 | PRK,Perak 14 | SBH,Sabah 15 | SGR,Selangor 16 | SRW,Sarawak 17 | TRG,Terengganu 18 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Python 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | *.so 6 | .Python 7 | venv/ 8 | env/ 9 | ENV/ 10 | 11 | # Temporary files 12 | /tmp/ 13 | *.tmp 14 | *.bak 15 | *.swp 16 | *~ 17 | 18 | # IDE 19 | .vscode/ 20 | .idea/ 21 | *.sublime-project 22 | *.sublime-workspace 23 | 24 | # OS 25 | .DS_Store 26 | Thumbs.db 27 | 28 | .claude/ -------------------------------------------------------------------------------- /data/json/states/wp_labuan.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Wp Labuan", 3 | "code": "LBN", 4 | "cities": [ 5 | { 6 | "name": "Labuan", 7 | "postcodes": [ 8 | "87000", 9 | "87007", 10 | "87008", 11 | "87010", 12 | "87011", 13 | "87012", 14 | "87013", 15 | "87014", 16 | "87015", 17 | "87016", 18 | "87017", 19 | "87018", 20 | "87019", 21 | "87020", 22 | "87021", 23 | "87022", 24 | "87023", 25 | "87024", 26 | "87025", 27 | "87026", 28 | "87027", 29 | "87028", 30 | "87029", 31 | "87030", 32 | "87031", 33 | "87032", 34 | "87033" 35 | ] 36 | } 37 | ] 38 | } -------------------------------------------------------------------------------- /data/csv/states/Wp_Labuan.csv: -------------------------------------------------------------------------------- 1 | postcode,city,state,state_code 2 | 87000,Labuan,Wp Labuan,LBN 3 | 87007,Labuan,Wp Labuan,LBN 4 | 87008,Labuan,Wp Labuan,LBN 5 | 87010,Labuan,Wp Labuan,LBN 6 | 87011,Labuan,Wp Labuan,LBN 7 | 87012,Labuan,Wp Labuan,LBN 8 | 87013,Labuan,Wp Labuan,LBN 9 | 87014,Labuan,Wp Labuan,LBN 10 | 87015,Labuan,Wp Labuan,LBN 11 | 87016,Labuan,Wp Labuan,LBN 12 | 87017,Labuan,Wp Labuan,LBN 13 | 87018,Labuan,Wp Labuan,LBN 14 | 87019,Labuan,Wp Labuan,LBN 15 | 87020,Labuan,Wp Labuan,LBN 16 | 87021,Labuan,Wp Labuan,LBN 17 | 87022,Labuan,Wp Labuan,LBN 18 | 87023,Labuan,Wp Labuan,LBN 19 | 87024,Labuan,Wp Labuan,LBN 20 | 87025,Labuan,Wp Labuan,LBN 21 | 87026,Labuan,Wp Labuan,LBN 22 | 87027,Labuan,Wp Labuan,LBN 23 | 87028,Labuan,Wp Labuan,LBN 24 | 87029,Labuan,Wp Labuan,LBN 25 | 87030,Labuan,Wp Labuan,LBN 26 | 87031,Labuan,Wp Labuan,LBN 27 | 87032,Labuan,Wp Labuan,LBN 28 | 87033,Labuan,Wp Labuan,LBN 29 | -------------------------------------------------------------------------------- /data/csv/states/Melaka.csv: -------------------------------------------------------------------------------- 1 | postcode,city,state,state_code 2 | 78000,Alor Gajah,Melaka,MLK 3 | 78009,Alor Gajah,Melaka,MLK 4 | 77100,Asahan,Melaka,MLK 5 | 77109,Asahan,Melaka,MLK 6 | 75450,Ayer Keroh,Melaka,MLK 7 | 77200,Bemban,Melaka,MLK 8 | 76100,Durian Tunggal,Melaka,MLK 9 | 76109,Durian Tunggal,Melaka,MLK 10 | 77000,Jasin,Melaka,MLK 11 | 77007,Jasin,Melaka,MLK 12 | 77008,Jasin,Melaka,MLK 13 | 77009,Jasin,Melaka,MLK 14 | 76200,Kem Trendak,Melaka,MLK 15 | 78200,Kuala Sungai Baru,Melaka,MLK 16 | 78100,Lubok China,Melaka,MLK 17 | 78300,Masjid Tanah,Melaka,MLK 18 | 78307,Masjid Tanah,Melaka,MLK 19 | 78309,Masjid Tanah,Melaka,MLK 20 | 75000,Melaka,Melaka,MLK 21 | 75050,Melaka,Melaka,MLK 22 | 75100,Melaka,Melaka,MLK 23 | 75150,Melaka,Melaka,MLK 24 | 75200,Melaka,Melaka,MLK 25 | 75250,Melaka,Melaka,MLK 26 | 75260,Melaka,Melaka,MLK 27 | 75300,Melaka,Melaka,MLK 28 | 75350,Melaka,Melaka,MLK 29 | 75400,Melaka,Melaka,MLK 30 | 75430,Melaka,Melaka,MLK 31 | 75460,Melaka,Melaka,MLK 32 | 76450,Melaka,Melaka,MLK 33 | 77300,Merlimau,Melaka,MLK 34 | 77500,Selandar,Melaka,MLK 35 | 77400,Sungai Rambai,Melaka,MLK 36 | 76300,Sungai Udang,Melaka,MLK 37 | 76400,Tanjong Kling,Melaka,MLK 38 | 76409,Tanjong Kling,Melaka,MLK 39 | -------------------------------------------------------------------------------- /data/json/states/wp_putrajaya.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Wp Putrajaya", 3 | "code": "PJY", 4 | "cities": [ 5 | { 6 | "name": "Putrajaya", 7 | "postcodes": [ 8 | "62000", 9 | "62007", 10 | "62050", 11 | "62052", 12 | "62100", 13 | "62150", 14 | "62200", 15 | "62250", 16 | "62300", 17 | "62500", 18 | "62502", 19 | "62503", 20 | "62504", 21 | "62505", 22 | "62506", 23 | "62510", 24 | "62512", 25 | "62514", 26 | "62516", 27 | "62517", 28 | "62518", 29 | "62519", 30 | "62520", 31 | "62522", 32 | "62524", 33 | "62526", 34 | "62527", 35 | "62529", 36 | "62530", 37 | "62532", 38 | "62536", 39 | "62539", 40 | "62540", 41 | "62542", 42 | "62546", 43 | "62550", 44 | "62551", 45 | "62570", 46 | "62574", 47 | "62576", 48 | "62578", 49 | "62582", 50 | "62584", 51 | "62590", 52 | "62592", 53 | "62594", 54 | "62596", 55 | "62602", 56 | "62604", 57 | "62605", 58 | "62606", 59 | "62616", 60 | "62618", 61 | "62620", 62 | "62623", 63 | "62624", 64 | "62628", 65 | "62630", 66 | "62632", 67 | "62648", 68 | "62652", 69 | "62654", 70 | "62657", 71 | "62662", 72 | "62668", 73 | "62670", 74 | "62674", 75 | "62675", 76 | "62676", 77 | "62677", 78 | "62686", 79 | "62690", 80 | "62692", 81 | "62988" 82 | ] 83 | } 84 | ] 85 | } -------------------------------------------------------------------------------- /data/csv/states/Perlis.csv: -------------------------------------------------------------------------------- 1 | postcode,city,state,state_code 2 | 02600,Arau,Perlis,PLS 3 | 02607,Arau,Perlis,PLS 4 | 02609,Arau,Perlis,PLS 5 | 02200,Kaki Bukit,Perlis,PLS 6 | 01000,Kangar,Perlis,PLS 7 | 01007,Kangar,Perlis,PLS 8 | 01009,Kangar,Perlis,PLS 9 | 01500,Kangar,Perlis,PLS 10 | 01502,Kangar,Perlis,PLS 11 | 01503,Kangar,Perlis,PLS 12 | 01504,Kangar,Perlis,PLS 13 | 01505,Kangar,Perlis,PLS 14 | 01506,Kangar,Perlis,PLS 15 | 01508,Kangar,Perlis,PLS 16 | 01512,Kangar,Perlis,PLS 17 | 01514,Kangar,Perlis,PLS 18 | 01516,Kangar,Perlis,PLS 19 | 01517,Kangar,Perlis,PLS 20 | 01518,Kangar,Perlis,PLS 21 | 01524,Kangar,Perlis,PLS 22 | 01529,Kangar,Perlis,PLS 23 | 01532,Kangar,Perlis,PLS 24 | 01538,Kangar,Perlis,PLS 25 | 01540,Kangar,Perlis,PLS 26 | 01546,Kangar,Perlis,PLS 27 | 01550,Kangar,Perlis,PLS 28 | 01551,Kangar,Perlis,PLS 29 | 01556,Kangar,Perlis,PLS 30 | 01560,Kangar,Perlis,PLS 31 | 01564,Kangar,Perlis,PLS 32 | 01570,Kangar,Perlis,PLS 33 | 01572,Kangar,Perlis,PLS 34 | 01576,Kangar,Perlis,PLS 35 | 01578,Kangar,Perlis,PLS 36 | 01582,Kangar,Perlis,PLS 37 | 01586,Kangar,Perlis,PLS 38 | 01590,Kangar,Perlis,PLS 39 | 01592,Kangar,Perlis,PLS 40 | 01594,Kangar,Perlis,PLS 41 | 01596,Kangar,Perlis,PLS 42 | 01598,Kangar,Perlis,PLS 43 | 01600,Kangar,Perlis,PLS 44 | 01604,Kangar,Perlis,PLS 45 | 01606,Kangar,Perlis,PLS 46 | 01608,Kangar,Perlis,PLS 47 | 01609,Kangar,Perlis,PLS 48 | 01610,Kangar,Perlis,PLS 49 | 01612,Kangar,Perlis,PLS 50 | 01614,Kangar,Perlis,PLS 51 | 01620,Kangar,Perlis,PLS 52 | 01622,Kangar,Perlis,PLS 53 | 01626,Kangar,Perlis,PLS 54 | 01628,Kangar,Perlis,PLS 55 | 01630,Kangar,Perlis,PLS 56 | 01632,Kangar,Perlis,PLS 57 | 01634,Kangar,Perlis,PLS 58 | 01644,Kangar,Perlis,PLS 59 | 01646,Kangar,Perlis,PLS 60 | 01648,Kangar,Perlis,PLS 61 | 01660,Kangar,Perlis,PLS 62 | 01664,Kangar,Perlis,PLS 63 | 01670,Kangar,Perlis,PLS 64 | 01672,Kangar,Perlis,PLS 65 | 01673,Kangar,Perlis,PLS 66 | 01674,Kangar,Perlis,PLS 67 | 01676,Kangar,Perlis,PLS 68 | 01680,Kangar,Perlis,PLS 69 | 01694,Kangar,Perlis,PLS 70 | 02400,Kangar,Perlis,PLS 71 | 02450,Kangar,Perlis,PLS 72 | 02500,Kangar,Perlis,PLS 73 | 02000,Kuala Perlis,Perlis,PLS 74 | 02100,Padang Besar,Perlis,PLS 75 | 02700,Simpang Ampat,Perlis,PLS 76 | 02707,Simpang Ampat,Perlis,PLS 77 | 02709,Simpang Ampat,Perlis,PLS 78 | 02800,Simpang Ampat,Perlis,PLS 79 | -------------------------------------------------------------------------------- /data/json/states/perlis.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Perlis", 3 | "code": "PLS", 4 | "cities": [ 5 | { 6 | "name": "Arau", 7 | "postcodes": [ 8 | "02600", 9 | "02607", 10 | "02609" 11 | ] 12 | }, 13 | { 14 | "name": "Kaki Bukit", 15 | "postcodes": [ 16 | "02200" 17 | ] 18 | }, 19 | { 20 | "name": "Kangar", 21 | "postcodes": [ 22 | "01000", 23 | "01007", 24 | "01009", 25 | "01500", 26 | "01502", 27 | "01503", 28 | "01504", 29 | "01505", 30 | "01506", 31 | "01508", 32 | "01512", 33 | "01514", 34 | "01516", 35 | "01517", 36 | "01518", 37 | "01524", 38 | "01529", 39 | "01532", 40 | "01538", 41 | "01540", 42 | "01546", 43 | "01550", 44 | "01551", 45 | "01556", 46 | "01560", 47 | "01564", 48 | "01570", 49 | "01572", 50 | "01576", 51 | "01578", 52 | "01582", 53 | "01586", 54 | "01590", 55 | "01592", 56 | "01594", 57 | "01596", 58 | "01598", 59 | "01600", 60 | "01604", 61 | "01606", 62 | "01608", 63 | "01609", 64 | "01610", 65 | "01612", 66 | "01614", 67 | "01620", 68 | "01622", 69 | "01626", 70 | "01628", 71 | "01630", 72 | "01632", 73 | "01634", 74 | "01644", 75 | "01646", 76 | "01648", 77 | "01660", 78 | "01664", 79 | "01670", 80 | "01672", 81 | "01673", 82 | "01674", 83 | "01676", 84 | "01680", 85 | "01694", 86 | "02400", 87 | "02450", 88 | "02500" 89 | ] 90 | }, 91 | { 92 | "name": "Kuala Perlis", 93 | "postcodes": [ 94 | "02000" 95 | ] 96 | }, 97 | { 98 | "name": "Padang Besar", 99 | "postcodes": [ 100 | "02100" 101 | ] 102 | }, 103 | { 104 | "name": "Simpang Ampat", 105 | "postcodes": [ 106 | "02700", 107 | "02707", 108 | "02709", 109 | "02800" 110 | ] 111 | } 112 | ] 113 | } -------------------------------------------------------------------------------- /data/json/states/melaka.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Melaka", 3 | "code": "MLK", 4 | "cities": [ 5 | { 6 | "name": "Alor Gajah", 7 | "postcodes": [ 8 | "78000", 9 | "78009" 10 | ] 11 | }, 12 | { 13 | "name": "Asahan", 14 | "postcodes": [ 15 | "77100", 16 | "77109" 17 | ] 18 | }, 19 | { 20 | "name": "Ayer Keroh", 21 | "postcodes": [ 22 | "75450" 23 | ] 24 | }, 25 | { 26 | "name": "Bemban", 27 | "postcodes": [ 28 | "77200" 29 | ] 30 | }, 31 | { 32 | "name": "Durian Tunggal", 33 | "postcodes": [ 34 | "76100", 35 | "76109" 36 | ] 37 | }, 38 | { 39 | "name": "Jasin", 40 | "postcodes": [ 41 | "77000", 42 | "77007", 43 | "77008", 44 | "77009" 45 | ] 46 | }, 47 | { 48 | "name": "Kem Trendak", 49 | "postcodes": [ 50 | "76200" 51 | ] 52 | }, 53 | { 54 | "name": "Kuala Sungai Baru", 55 | "postcodes": [ 56 | "78200" 57 | ] 58 | }, 59 | { 60 | "name": "Lubok China", 61 | "postcodes": [ 62 | "78100" 63 | ] 64 | }, 65 | { 66 | "name": "Masjid Tanah", 67 | "postcodes": [ 68 | "78300", 69 | "78307", 70 | "78309" 71 | ] 72 | }, 73 | { 74 | "name": "Melaka", 75 | "postcodes": [ 76 | "75000", 77 | "75050", 78 | "75100", 79 | "75150", 80 | "75200", 81 | "75250", 82 | "75260", 83 | "75300", 84 | "75350", 85 | "75400", 86 | "75430", 87 | "75460", 88 | "76450" 89 | ] 90 | }, 91 | { 92 | "name": "Merlimau", 93 | "postcodes": [ 94 | "77300" 95 | ] 96 | }, 97 | { 98 | "name": "Selandar", 99 | "postcodes": [ 100 | "77500" 101 | ] 102 | }, 103 | { 104 | "name": "Sungai Rambai", 105 | "postcodes": [ 106 | "77400" 107 | ] 108 | }, 109 | { 110 | "name": "Sungai Udang", 111 | "postcodes": [ 112 | "76300" 113 | ] 114 | }, 115 | { 116 | "name": "Tanjong Kling", 117 | "postcodes": [ 118 | "76400", 119 | "76409" 120 | ] 121 | } 122 | ] 123 | } -------------------------------------------------------------------------------- /examples/README.md: -------------------------------------------------------------------------------- 1 | # Usage Examples 2 | 3 | This directory contains code examples demonstrating how to use the Malaysia Postcode data in different programming languages. 4 | 5 | ## Available Examples 6 | 7 | ### Python (`python_example.py`) 8 | 9 | ```bash 10 | cd examples 11 | python3 python_example.py 12 | ``` 13 | 14 | Demonstrates: 15 | - Loading and searching JSON data 16 | - Reading state-specific data 17 | - Reading and filtering CSV data 18 | - Validating postcodes 19 | - Getting postcodes by state 20 | 21 | ### JavaScript/Node.js (`javascript_example.js`) 22 | 23 | ```bash 24 | cd examples 25 | node javascript_example.js 26 | ``` 27 | 28 | Demonstrates: 29 | - Loading and searching JSON data 30 | - Reading state-specific data 31 | - Validating postcodes 32 | - Getting cities by state 33 | - Building fast lookup maps 34 | 35 | ### PHP (`php_example.php`) 36 | 37 | ```bash 38 | cd examples 39 | php php_example.php 40 | ``` 41 | 42 | Demonstrates: 43 | - Loading and searching JSON data 44 | - Reading state-specific data 45 | - Reading and filtering CSV data 46 | - Validating postcodes 47 | - Getting postcodes by state 48 | 49 | ## Quick Usage Patterns 50 | 51 | ### JSON Format (Recommended for most applications) 52 | 53 | ```javascript 54 | // Load all data 55 | const data = require('../data/json/postcodes.json'); 56 | 57 | // Or load specific state 58 | const selangor = require('../data/json/states/selangor.json'); 59 | ``` 60 | 61 | ### CSV Format (For spreadsheets and database imports) 62 | 63 | ```python 64 | import csv 65 | 66 | with open('../data/csv/postcodes.csv', 'r') as f: 67 | reader = csv.DictReader(f) 68 | for row in reader: 69 | print(row['postcode'], row['city'], row['state']) 70 | ``` 71 | 72 | ## Common Use Cases 73 | 74 | 1. **Postcode Validation** - Check if a postcode is valid 75 | 2. **Address Autocomplete** - Suggest cities based on postcode 76 | 3. **State Lookup** - Find which state a postcode belongs to 77 | 4. **City Listing** - Get all cities in a specific state 78 | 5. **Postcode Range** - Find all postcodes in a city or state 79 | 80 | ## Data Structure 81 | 82 | ### JSON Structure 83 | ```json 84 | { 85 | "metadata": {...}, 86 | "states": [ 87 | { 88 | "name": "Selangor", 89 | "code": "SGR", 90 | "cities": [ 91 | { 92 | "name": "Petaling Jaya", 93 | "postcodes": ["46000", "46050", ...] 94 | } 95 | ] 96 | } 97 | ] 98 | } 99 | ``` 100 | 101 | ### CSV Structure 102 | ```csv 103 | postcode,city,state,state_code 104 | 40100,Shah Alam,Selangor,SGR 105 | ``` 106 | -------------------------------------------------------------------------------- /data/csv/states/Wp_Putrajaya.csv: -------------------------------------------------------------------------------- 1 | postcode,city,state,state_code 2 | 62000,Putrajaya,Wp Putrajaya,PJY 3 | 62007,Putrajaya,Wp Putrajaya,PJY 4 | 62050,Putrajaya,Wp Putrajaya,PJY 5 | 62052,Putrajaya,Wp Putrajaya,PJY 6 | 62100,Putrajaya,Wp Putrajaya,PJY 7 | 62150,Putrajaya,Wp Putrajaya,PJY 8 | 62200,Putrajaya,Wp Putrajaya,PJY 9 | 62250,Putrajaya,Wp Putrajaya,PJY 10 | 62300,Putrajaya,Wp Putrajaya,PJY 11 | 62500,Putrajaya,Wp Putrajaya,PJY 12 | 62502,Putrajaya,Wp Putrajaya,PJY 13 | 62503,Putrajaya,Wp Putrajaya,PJY 14 | 62504,Putrajaya,Wp Putrajaya,PJY 15 | 62505,Putrajaya,Wp Putrajaya,PJY 16 | 62506,Putrajaya,Wp Putrajaya,PJY 17 | 62510,Putrajaya,Wp Putrajaya,PJY 18 | 62512,Putrajaya,Wp Putrajaya,PJY 19 | 62514,Putrajaya,Wp Putrajaya,PJY 20 | 62516,Putrajaya,Wp Putrajaya,PJY 21 | 62517,Putrajaya,Wp Putrajaya,PJY 22 | 62518,Putrajaya,Wp Putrajaya,PJY 23 | 62519,Putrajaya,Wp Putrajaya,PJY 24 | 62520,Putrajaya,Wp Putrajaya,PJY 25 | 62522,Putrajaya,Wp Putrajaya,PJY 26 | 62524,Putrajaya,Wp Putrajaya,PJY 27 | 62526,Putrajaya,Wp Putrajaya,PJY 28 | 62527,Putrajaya,Wp Putrajaya,PJY 29 | 62529,Putrajaya,Wp Putrajaya,PJY 30 | 62530,Putrajaya,Wp Putrajaya,PJY 31 | 62532,Putrajaya,Wp Putrajaya,PJY 32 | 62536,Putrajaya,Wp Putrajaya,PJY 33 | 62539,Putrajaya,Wp Putrajaya,PJY 34 | 62540,Putrajaya,Wp Putrajaya,PJY 35 | 62542,Putrajaya,Wp Putrajaya,PJY 36 | 62546,Putrajaya,Wp Putrajaya,PJY 37 | 62550,Putrajaya,Wp Putrajaya,PJY 38 | 62551,Putrajaya,Wp Putrajaya,PJY 39 | 62570,Putrajaya,Wp Putrajaya,PJY 40 | 62574,Putrajaya,Wp Putrajaya,PJY 41 | 62576,Putrajaya,Wp Putrajaya,PJY 42 | 62578,Putrajaya,Wp Putrajaya,PJY 43 | 62582,Putrajaya,Wp Putrajaya,PJY 44 | 62584,Putrajaya,Wp Putrajaya,PJY 45 | 62590,Putrajaya,Wp Putrajaya,PJY 46 | 62592,Putrajaya,Wp Putrajaya,PJY 47 | 62594,Putrajaya,Wp Putrajaya,PJY 48 | 62596,Putrajaya,Wp Putrajaya,PJY 49 | 62602,Putrajaya,Wp Putrajaya,PJY 50 | 62604,Putrajaya,Wp Putrajaya,PJY 51 | 62605,Putrajaya,Wp Putrajaya,PJY 52 | 62606,Putrajaya,Wp Putrajaya,PJY 53 | 62616,Putrajaya,Wp Putrajaya,PJY 54 | 62618,Putrajaya,Wp Putrajaya,PJY 55 | 62620,Putrajaya,Wp Putrajaya,PJY 56 | 62623,Putrajaya,Wp Putrajaya,PJY 57 | 62624,Putrajaya,Wp Putrajaya,PJY 58 | 62628,Putrajaya,Wp Putrajaya,PJY 59 | 62630,Putrajaya,Wp Putrajaya,PJY 60 | 62632,Putrajaya,Wp Putrajaya,PJY 61 | 62648,Putrajaya,Wp Putrajaya,PJY 62 | 62652,Putrajaya,Wp Putrajaya,PJY 63 | 62654,Putrajaya,Wp Putrajaya,PJY 64 | 62657,Putrajaya,Wp Putrajaya,PJY 65 | 62662,Putrajaya,Wp Putrajaya,PJY 66 | 62668,Putrajaya,Wp Putrajaya,PJY 67 | 62670,Putrajaya,Wp Putrajaya,PJY 68 | 62674,Putrajaya,Wp Putrajaya,PJY 69 | 62675,Putrajaya,Wp Putrajaya,PJY 70 | 62676,Putrajaya,Wp Putrajaya,PJY 71 | 62677,Putrajaya,Wp Putrajaya,PJY 72 | 62686,Putrajaya,Wp Putrajaya,PJY 73 | 62690,Putrajaya,Wp Putrajaya,PJY 74 | 62692,Putrajaya,Wp Putrajaya,PJY 75 | 62988,Putrajaya,Wp Putrajaya,PJY 76 | -------------------------------------------------------------------------------- /data/csv/states/Kedah.csv: -------------------------------------------------------------------------------- 1 | postcode,city,state,state_code 2 | 05000,Alor Setar,Kedah,KDH 3 | 05050,Alor Setar,Kedah,KDH 4 | 05100,Alor Setar,Kedah,KDH 5 | 05150,Alor Setar,Kedah,KDH 6 | 05200,Alor Setar,Kedah,KDH 7 | 05250,Alor Setar,Kedah,KDH 8 | 05300,Alor Setar,Kedah,KDH 9 | 05350,Alor Setar,Kedah,KDH 10 | 05400,Alor Setar,Kedah,KDH 11 | 05450,Alor Setar,Kedah,KDH 12 | 05460,Alor Setar,Kedah,KDH 13 | 05500,Alor Setar,Kedah,KDH 14 | 05502,Alor Setar,Kedah,KDH 15 | 05503,Alor Setar,Kedah,KDH 16 | 05504,Alor Setar,Kedah,KDH 17 | 05505,Alor Setar,Kedah,KDH 18 | 05506,Alor Setar,Kedah,KDH 19 | 05508,Alor Setar,Kedah,KDH 20 | 05512,Alor Setar,Kedah,KDH 21 | 05514,Alor Setar,Kedah,KDH 22 | 05516,Alor Setar,Kedah,KDH 23 | 05517,Alor Setar,Kedah,KDH 24 | 05518,Alor Setar,Kedah,KDH 25 | 05520,Alor Setar,Kedah,KDH 26 | 05532,Alor Setar,Kedah,KDH 27 | 05534,Alor Setar,Kedah,KDH 28 | 05536,Alor Setar,Kedah,KDH 29 | 05538,Alor Setar,Kedah,KDH 30 | 05550,Alor Setar,Kedah,KDH 31 | 05551,Alor Setar,Kedah,KDH 32 | 05552,Alor Setar,Kedah,KDH 33 | 05556,Alor Setar,Kedah,KDH 34 | 05558,Alor Setar,Kedah,KDH 35 | 05560,Alor Setar,Kedah,KDH 36 | 05564,Alor Setar,Kedah,KDH 37 | 05576,Alor Setar,Kedah,KDH 38 | 05578,Alor Setar,Kedah,KDH 39 | 05580,Alor Setar,Kedah,KDH 40 | 05582,Alor Setar,Kedah,KDH 41 | 05586,Alor Setar,Kedah,KDH 42 | 05590,Alor Setar,Kedah,KDH 43 | 05592,Alor Setar,Kedah,KDH 44 | 05594,Alor Setar,Kedah,KDH 45 | 05600,Alor Setar,Kedah,KDH 46 | 05604,Alor Setar,Kedah,KDH 47 | 05610,Alor Setar,Kedah,KDH 48 | 05612,Alor Setar,Kedah,KDH 49 | 05614,Alor Setar,Kedah,KDH 50 | 05620,Alor Setar,Kedah,KDH 51 | 05621,Alor Setar,Kedah,KDH 52 | 05622,Alor Setar,Kedah,KDH 53 | 05626,Alor Setar,Kedah,KDH 54 | 05628,Alor Setar,Kedah,KDH 55 | 05630,Alor Setar,Kedah,KDH 56 | 05632,Alor Setar,Kedah,KDH 57 | 05644,Alor Setar,Kedah,KDH 58 | 05660,Alor Setar,Kedah,KDH 59 | 05661,Alor Setar,Kedah,KDH 60 | 05664,Alor Setar,Kedah,KDH 61 | 05670,Alor Setar,Kedah,KDH 62 | 05672,Alor Setar,Kedah,KDH 63 | 05673,Alor Setar,Kedah,KDH 64 | 05674,Alor Setar,Kedah,KDH 65 | 05675,Alor Setar,Kedah,KDH 66 | 05676,Alor Setar,Kedah,KDH 67 | 05680,Alor Setar,Kedah,KDH 68 | 05690,Alor Setar,Kedah,KDH 69 | 05696,Alor Setar,Kedah,KDH 70 | 05700,Alor Setar,Kedah,KDH 71 | 05710,Alor Setar,Kedah,KDH 72 | 05720,Alor Setar,Kedah,KDH 73 | 05990,Alor Setar,Kedah,KDH 74 | 06250,Alor Setar,Kedah,KDH 75 | 06509,Alor Setar,Kedah,KDH 76 | 06550,Alor Setar,Kedah,KDH 77 | 06570,Alor Setar,Kedah,KDH 78 | 06660,Alor Setar,Kedah,KDH 79 | 06150,Ayer Hitam,Kedah,KDH 80 | 09100,Baling,Kedah,KDH 81 | 34950,Bandar Baharu,Kedah,KDH 82 | 14290,Bandar Bahru,Kedah,KDH 83 | 14390,Bandar Bahru,Kedah,KDH 84 | 08100,Bedong,Kedah,KDH 85 | 08110,Bedong,Kedah,KDH 86 | 06050,Bukit Kayu Hitam,Kedah,KDH 87 | 06010,Changloon,Kedah,KDH 88 | 08300,Gurun,Kedah,KDH 89 | 08330,Gurun,Kedah,KDH 90 | 08800,Gurun,Kedah,KDH 91 | 08320,Jeniang,Kedah,KDH 92 | 08700,Jeniang,Kedah,KDH 93 | 06000,Jitra,Kedah,KDH 94 | 06007,Jitra,Kedah,KDH 95 | 06009,Jitra,Kedah,KDH 96 | 09700,Karangan,Kedah,KDH 97 | 06200,Kepala Batas,Kedah,KDH 98 | 06207,Kepala Batas,Kedah,KDH 99 | 06209,Kepala Batas,Kedah,KDH 100 | 06100,Kodiang,Kedah,KDH 101 | 08500,Kota Kuala Muda,Kedah,KDH 102 | 08507,Kota Kuala Muda,Kedah,KDH 103 | 08509,Kota Kuala Muda,Kedah,KDH 104 | 06800,Kota Sarang Semut,Kedah,KDH 105 | 06600,Kuala Kedah,Kedah,KDH 106 | 09300,Kuala Ketil,Kedah,KDH 107 | 09310,Kuala Ketil,Kedah,KDH 108 | 06300,Kuala Nerang,Kedah,KDH 109 | 09110,Kuala Pegang,Kedah,KDH 110 | 09000,Kulim,Kedah,KDH 111 | 09007,Kulim,Kedah,KDH 112 | 09009,Kulim,Kedah,KDH 113 | 09010,Kulim,Kedah,KDH 114 | 09020,Kulim,Kedah,KDH 115 | 09200,Kupang,Kedah,KDH 116 | 06500,Langgar,Kedah,KDH 117 | 06507,Langgar,Kedah,KDH 118 | 07000,Langkawi,Kedah,KDH 119 | 07007,Langkawi,Kedah,KDH 120 | 07009,Langkawi,Kedah,KDH 121 | 07100,Langkawi,Kedah,KDH 122 | 09600,Lunas,Kedah,KDH 123 | 08400,Merbok,Kedah,KDH 124 | 08407,Merbok,Kedah,KDH 125 | 08409,Merbok,Kedah,KDH 126 | 09400,Padang Serai,Kedah,KDH 127 | 09410,Padang Serai,Kedah,KDH 128 | 06700,Pendang,Kedah,KDH 129 | 06707,Pendang,Kedah,KDH 130 | 06709,Pendang,Kedah,KDH 131 | 06710,Pendang,Kedah,KDH 132 | 06720,Pendang,Kedah,KDH 133 | 06750,Pendang,Kedah,KDH 134 | 06760,Pendang,Kedah,KDH 135 | 06350,Pokok Sena,Kedah,KDH 136 | 06400,Pokok Sena,Kedah,KDH 137 | 09800,Serdang,Kedah,KDH 138 | 09810,Serdang,Kedah,KDH 139 | 08200,Sik,Kedah,KDH 140 | 08210,Sik,Kedah,KDH 141 | 08340,Sik,Kedah,KDH 142 | 06650,Simpang Empat,Kedah,KDH 143 | 06680,Simpang Empat,Kedah,KDH 144 | 08000,Sungai Petani,Kedah,KDH 145 | 08007,Sungai Petani,Kedah,KDH 146 | 08009,Sungai Petani,Kedah,KDH 147 | 08010,Sungai Petani,Kedah,KDH 148 | 08600,Sungai Petani,Kedah,KDH 149 | 06900,Yan,Kedah,KDH 150 | 06910,Yan,Kedah,KDH 151 | -------------------------------------------------------------------------------- /data/csv/states/Kelantan.csv: -------------------------------------------------------------------------------- 1 | postcode,city,state,state_code 2 | 17700,Ayer Lanas,Kelantan,KTN 3 | 16020,Bachok,Kelantan,KTN 4 | 16030,Bachok,Kelantan,KTN 5 | 16050,Bachok,Kelantan,KTN 6 | 16060,Bachok,Kelantan,KTN 7 | 16070,Bachok,Kelantan,KTN 8 | 16090,Bachok,Kelantan,KTN 9 | 16300,Bachok,Kelantan,KTN 10 | 16310,Bachok,Kelantan,KTN 11 | 16320,Bachok,Kelantan,KTN 12 | 16350,Bachok,Kelantan,KTN 13 | 16370,Bachok,Kelantan,KTN 14 | 16390,Bachok,Kelantan,KTN 15 | 16700,Cherang Ruku,Kelantan,KTN 16 | 18200,Dabong,Kelantan,KTN 17 | 18300,Gua Musang,Kelantan,KTN 18 | 17600,Jeli,Kelantan,KTN 19 | 16500,Kem Desa Pahlawan,Kelantan,KTN 20 | 16450,Ketereh,Kelantan,KTN 21 | 15000,Kota Bharu,Kelantan,KTN 22 | 15050,Kota Bharu,Kelantan,KTN 23 | 15100,Kota Bharu,Kelantan,KTN 24 | 15150,Kota Bharu,Kelantan,KTN 25 | 15159,Kota Bharu,Kelantan,KTN 26 | 15160,Kota Bharu,Kelantan,KTN 27 | 15200,Kota Bharu,Kelantan,KTN 28 | 15300,Kota Bharu,Kelantan,KTN 29 | 15350,Kota Bharu,Kelantan,KTN 30 | 15400,Kota Bharu,Kelantan,KTN 31 | 15500,Kota Bharu,Kelantan,KTN 32 | 15502,Kota Bharu,Kelantan,KTN 33 | 15503,Kota Bharu,Kelantan,KTN 34 | 15504,Kota Bharu,Kelantan,KTN 35 | 15505,Kota Bharu,Kelantan,KTN 36 | 15506,Kota Bharu,Kelantan,KTN 37 | 15508,Kota Bharu,Kelantan,KTN 38 | 15512,Kota Bharu,Kelantan,KTN 39 | 15514,Kota Bharu,Kelantan,KTN 40 | 15516,Kota Bharu,Kelantan,KTN 41 | 15517,Kota Bharu,Kelantan,KTN 42 | 15518,Kota Bharu,Kelantan,KTN 43 | 15519,Kota Bharu,Kelantan,KTN 44 | 15520,Kota Bharu,Kelantan,KTN 45 | 15524,Kota Bharu,Kelantan,KTN 46 | 15529,Kota Bharu,Kelantan,KTN 47 | 15532,Kota Bharu,Kelantan,KTN 48 | 15534,Kota Bharu,Kelantan,KTN 49 | 15536,Kota Bharu,Kelantan,KTN 50 | 15538,Kota Bharu,Kelantan,KTN 51 | 15540,Kota Bharu,Kelantan,KTN 52 | 15546,Kota Bharu,Kelantan,KTN 53 | 15548,Kota Bharu,Kelantan,KTN 54 | 15550,Kota Bharu,Kelantan,KTN 55 | 15551,Kota Bharu,Kelantan,KTN 56 | 15556,Kota Bharu,Kelantan,KTN 57 | 15558,Kota Bharu,Kelantan,KTN 58 | 15560,Kota Bharu,Kelantan,KTN 59 | 15564,Kota Bharu,Kelantan,KTN 60 | 15570,Kota Bharu,Kelantan,KTN 61 | 15572,Kota Bharu,Kelantan,KTN 62 | 15576,Kota Bharu,Kelantan,KTN 63 | 15578,Kota Bharu,Kelantan,KTN 64 | 15582,Kota Bharu,Kelantan,KTN 65 | 15586,Kota Bharu,Kelantan,KTN 66 | 15590,Kota Bharu,Kelantan,KTN 67 | 15592,Kota Bharu,Kelantan,KTN 68 | 15594,Kota Bharu,Kelantan,KTN 69 | 15596,Kota Bharu,Kelantan,KTN 70 | 15600,Kota Bharu,Kelantan,KTN 71 | 15604,Kota Bharu,Kelantan,KTN 72 | 15606,Kota Bharu,Kelantan,KTN 73 | 15608,Kota Bharu,Kelantan,KTN 74 | 15609,Kota Bharu,Kelantan,KTN 75 | 15610,Kota Bharu,Kelantan,KTN 76 | 15612,Kota Bharu,Kelantan,KTN 77 | 15614,Kota Bharu,Kelantan,KTN 78 | 15616,Kota Bharu,Kelantan,KTN 79 | 15620,Kota Bharu,Kelantan,KTN 80 | 15622,Kota Bharu,Kelantan,KTN 81 | 15623,Kota Bharu,Kelantan,KTN 82 | 15624,Kota Bharu,Kelantan,KTN 83 | 15626,Kota Bharu,Kelantan,KTN 84 | 15628,Kota Bharu,Kelantan,KTN 85 | 15630,Kota Bharu,Kelantan,KTN 86 | 15632,Kota Bharu,Kelantan,KTN 87 | 15634,Kota Bharu,Kelantan,KTN 88 | 15644,Kota Bharu,Kelantan,KTN 89 | 15646,Kota Bharu,Kelantan,KTN 90 | 15648,Kota Bharu,Kelantan,KTN 91 | 15658,Kota Bharu,Kelantan,KTN 92 | 15660,Kota Bharu,Kelantan,KTN 93 | 15661,Kota Bharu,Kelantan,KTN 94 | 15662,Kota Bharu,Kelantan,KTN 95 | 15664,Kota Bharu,Kelantan,KTN 96 | 15670,Kota Bharu,Kelantan,KTN 97 | 15672,Kota Bharu,Kelantan,KTN 98 | 15673,Kota Bharu,Kelantan,KTN 99 | 15674,Kota Bharu,Kelantan,KTN 100 | 15676,Kota Bharu,Kelantan,KTN 101 | 15680,Kota Bharu,Kelantan,KTN 102 | 15690,Kota Bharu,Kelantan,KTN 103 | 15700,Kota Bharu,Kelantan,KTN 104 | 15710,Kota Bharu,Kelantan,KTN 105 | 15720,Kota Bharu,Kelantan,KTN 106 | 15730,Kota Bharu,Kelantan,KTN 107 | 15740,Kota Bharu,Kelantan,KTN 108 | 15988,Kota Bharu,Kelantan,KTN 109 | 15990,Kota Bharu,Kelantan,KTN 110 | 16010,Kota Bharu,Kelantan,KTN 111 | 16100,Kota Bharu,Kelantan,KTN 112 | 16109,Kota Bharu,Kelantan,KTN 113 | 16150,Kota Bharu,Kelantan,KTN 114 | 17610,Kuala Balah,Kelantan,KTN 115 | 18000,Kuala Krai,Kelantan,KTN 116 | 18020,Kuala Krai,Kelantan,KTN 117 | 18050,Kuala Krai,Kelantan,KTN 118 | 18500,Machang,Kelantan,KTN 119 | 16400,Melor,Kelantan,KTN 120 | 17000,Pasir Mas,Kelantan,KTN 121 | 17007,Pasir Mas,Kelantan,KTN 122 | 17009,Pasir Mas,Kelantan,KTN 123 | 17010,Pasir Mas,Kelantan,KTN 124 | 17020,Pasir Mas,Kelantan,KTN 125 | 17030,Pasir Mas,Kelantan,KTN 126 | 17040,Pasir Mas,Kelantan,KTN 127 | 17050,Pasir Mas,Kelantan,KTN 128 | 17060,Pasir Mas,Kelantan,KTN 129 | 17070,Pasir Mas,Kelantan,KTN 130 | 16800,Pasir Puteh,Kelantan,KTN 131 | 16600,Pulai Chondong,Kelantan,KTN 132 | 17200,Rantau Panjang,Kelantan,KTN 133 | 16810,Selising,Kelantan,KTN 134 | 17500,Tanah Merah,Kelantan,KTN 135 | 17507,Tanah Merah,Kelantan,KTN 136 | 17509,Tanah Merah,Kelantan,KTN 137 | 17510,Tanah Merah,Kelantan,KTN 138 | 17520,Tanah Merah,Kelantan,KTN 139 | 17599,Tanah Merah,Kelantan,KTN 140 | 18400,Temangan,Kelantan,KTN 141 | 16080,Tumpat,Kelantan,KTN 142 | 16200,Tumpat,Kelantan,KTN 143 | 16210,Tumpat,Kelantan,KTN 144 | 16040,Wakaf Bharu,Kelantan,KTN 145 | 16250,Wakaf Bharu,Kelantan,KTN 146 | 16266,Wakaf Bharu,Kelantan,KTN 147 | -------------------------------------------------------------------------------- /data/json/states/pulau_pinang.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Pulau Pinang", 3 | "code": "PNG", 4 | "cities": [ 5 | { 6 | "name": "Ayer Itam", 7 | "postcodes": [ 8 | "11500" 9 | ] 10 | }, 11 | { 12 | "name": "Balik Pulau", 13 | "postcodes": [ 14 | "11000", 15 | "11010", 16 | "11020" 17 | ] 18 | }, 19 | { 20 | "name": "Batu Ferringhi", 21 | "postcodes": [ 22 | "11100" 23 | ] 24 | }, 25 | { 26 | "name": "Batu Maung", 27 | "postcodes": [ 28 | "11960" 29 | ] 30 | }, 31 | { 32 | "name": "Bayan Lepas", 33 | "postcodes": [ 34 | "11900", 35 | "11910", 36 | "11920", 37 | "11950" 38 | ] 39 | }, 40 | { 41 | "name": "Bukit Mertajam", 42 | "postcodes": [ 43 | "14000", 44 | "14007", 45 | "14009", 46 | "14020" 47 | ] 48 | }, 49 | { 50 | "name": "Butterworth", 51 | "postcodes": [ 52 | "12000", 53 | "12100", 54 | "12200", 55 | "12300", 56 | "12700", 57 | "12710", 58 | "12720", 59 | "12990", 60 | "13000", 61 | "13009", 62 | "13020", 63 | "13050", 64 | "13400", 65 | "13409", 66 | "13800" 67 | ] 68 | }, 69 | { 70 | "name": "Gelugor", 71 | "postcodes": [ 72 | "11700" 73 | ] 74 | }, 75 | { 76 | "name": "Jelutong", 77 | "postcodes": [ 78 | "11600", 79 | "11609" 80 | ] 81 | }, 82 | { 83 | "name": "Kepala Batas", 84 | "postcodes": [ 85 | "13200", 86 | "13210", 87 | "13220" 88 | ] 89 | }, 90 | { 91 | "name": "Kubang Semang", 92 | "postcodes": [ 93 | "14400" 94 | ] 95 | }, 96 | { 97 | "name": "Nibong Tebal", 98 | "postcodes": [ 99 | "14300", 100 | "14310", 101 | "14320" 102 | ] 103 | }, 104 | { 105 | "name": "Penaga", 106 | "postcodes": [ 107 | "13100", 108 | "13110" 109 | ] 110 | }, 111 | { 112 | "name": "Penang Hill", 113 | "postcodes": [ 114 | "11300" 115 | ] 116 | }, 117 | { 118 | "name": "Perai", 119 | "postcodes": [ 120 | "13600", 121 | "13700" 122 | ] 123 | }, 124 | { 125 | "name": "Permatang Pauh", 126 | "postcodes": [ 127 | "13500" 128 | ] 129 | }, 130 | { 131 | "name": "Pulau Pinang", 132 | "postcodes": [ 133 | "10000", 134 | "10050", 135 | "10100", 136 | "10150", 137 | "10200", 138 | "10250", 139 | "10300", 140 | "10350", 141 | "10400", 142 | "10450", 143 | "10460", 144 | "10470", 145 | "10500", 146 | "10502", 147 | "10503", 148 | "10504", 149 | "10505", 150 | "10506", 151 | "10508", 152 | "10512", 153 | "10514", 154 | "10516", 155 | "10518", 156 | "10524", 157 | "10534", 158 | "10538", 159 | "10540", 160 | "10542", 161 | "10546", 162 | "10550", 163 | "10551", 164 | "10552", 165 | "10558", 166 | "10560", 167 | "10564", 168 | "10566", 169 | "10570", 170 | "10576", 171 | "10578", 172 | "10582", 173 | "10590", 174 | "10592", 175 | "10593", 176 | "10594", 177 | "10596", 178 | "10600", 179 | "10604", 180 | "10609", 181 | "10610", 182 | "10612", 183 | "10620", 184 | "10622", 185 | "10626", 186 | "10628", 187 | "10634", 188 | "10646", 189 | "10648", 190 | "10660", 191 | "10661", 192 | "10662", 193 | "10670", 194 | "10672", 195 | "10673", 196 | "10674", 197 | "10676", 198 | "10690", 199 | "10710", 200 | "10720", 201 | "10730", 202 | "10740", 203 | "10750", 204 | "10760", 205 | "10770", 206 | "10780", 207 | "10790", 208 | "10800", 209 | "10810", 210 | "10820", 211 | "10830", 212 | "10840", 213 | "10850", 214 | "10910", 215 | "10920", 216 | "10990", 217 | "11050", 218 | "11060", 219 | "11400", 220 | "11409" 221 | ] 222 | }, 223 | { 224 | "name": "Simpang Ampat", 225 | "postcodes": [ 226 | "14100", 227 | "14101", 228 | "14110", 229 | "14120" 230 | ] 231 | }, 232 | { 233 | "name": "Sungai Jawi", 234 | "postcodes": [ 235 | "14200" 236 | ] 237 | }, 238 | { 239 | "name": "Tanjong Bungah", 240 | "postcodes": [ 241 | "11200" 242 | ] 243 | }, 244 | { 245 | "name": "Tasek Gelugor", 246 | "postcodes": [ 247 | "13300", 248 | "13310" 249 | ] 250 | }, 251 | { 252 | "name": "Usm Pulau Pinang", 253 | "postcodes": [ 254 | "11800" 255 | ] 256 | } 257 | ] 258 | } -------------------------------------------------------------------------------- /data/json/states/kelantan.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Kelantan", 3 | "code": "KTN", 4 | "cities": [ 5 | { 6 | "name": "Ayer Lanas", 7 | "postcodes": [ 8 | "17700" 9 | ] 10 | }, 11 | { 12 | "name": "Bachok", 13 | "postcodes": [ 14 | "16020", 15 | "16030", 16 | "16050", 17 | "16060", 18 | "16070", 19 | "16090", 20 | "16300", 21 | "16310", 22 | "16320", 23 | "16350", 24 | "16370", 25 | "16390" 26 | ] 27 | }, 28 | { 29 | "name": "Cherang Ruku", 30 | "postcodes": [ 31 | "16700" 32 | ] 33 | }, 34 | { 35 | "name": "Dabong", 36 | "postcodes": [ 37 | "18200" 38 | ] 39 | }, 40 | { 41 | "name": "Gua Musang", 42 | "postcodes": [ 43 | "18300" 44 | ] 45 | }, 46 | { 47 | "name": "Jeli", 48 | "postcodes": [ 49 | "17600" 50 | ] 51 | }, 52 | { 53 | "name": "Kem Desa Pahlawan", 54 | "postcodes": [ 55 | "16500" 56 | ] 57 | }, 58 | { 59 | "name": "Ketereh", 60 | "postcodes": [ 61 | "16450" 62 | ] 63 | }, 64 | { 65 | "name": "Kota Bharu", 66 | "postcodes": [ 67 | "15000", 68 | "15050", 69 | "15100", 70 | "15150", 71 | "15159", 72 | "15160", 73 | "15200", 74 | "15300", 75 | "15350", 76 | "15400", 77 | "15500", 78 | "15502", 79 | "15503", 80 | "15504", 81 | "15505", 82 | "15506", 83 | "15508", 84 | "15512", 85 | "15514", 86 | "15516", 87 | "15517", 88 | "15518", 89 | "15519", 90 | "15520", 91 | "15524", 92 | "15529", 93 | "15532", 94 | "15534", 95 | "15536", 96 | "15538", 97 | "15540", 98 | "15546", 99 | "15548", 100 | "15550", 101 | "15551", 102 | "15556", 103 | "15558", 104 | "15560", 105 | "15564", 106 | "15570", 107 | "15572", 108 | "15576", 109 | "15578", 110 | "15582", 111 | "15586", 112 | "15590", 113 | "15592", 114 | "15594", 115 | "15596", 116 | "15600", 117 | "15604", 118 | "15606", 119 | "15608", 120 | "15609", 121 | "15610", 122 | "15612", 123 | "15614", 124 | "15616", 125 | "15620", 126 | "15622", 127 | "15623", 128 | "15624", 129 | "15626", 130 | "15628", 131 | "15630", 132 | "15632", 133 | "15634", 134 | "15644", 135 | "15646", 136 | "15648", 137 | "15658", 138 | "15660", 139 | "15661", 140 | "15662", 141 | "15664", 142 | "15670", 143 | "15672", 144 | "15673", 145 | "15674", 146 | "15676", 147 | "15680", 148 | "15690", 149 | "15700", 150 | "15710", 151 | "15720", 152 | "15730", 153 | "15740", 154 | "15988", 155 | "15990", 156 | "16010", 157 | "16100", 158 | "16109", 159 | "16150" 160 | ] 161 | }, 162 | { 163 | "name": "Kuala Balah", 164 | "postcodes": [ 165 | "17610" 166 | ] 167 | }, 168 | { 169 | "name": "Kuala Krai", 170 | "postcodes": [ 171 | "18000", 172 | "18020", 173 | "18050" 174 | ] 175 | }, 176 | { 177 | "name": "Machang", 178 | "postcodes": [ 179 | "18500" 180 | ] 181 | }, 182 | { 183 | "name": "Melor", 184 | "postcodes": [ 185 | "16400" 186 | ] 187 | }, 188 | { 189 | "name": "Pasir Mas", 190 | "postcodes": [ 191 | "17000", 192 | "17007", 193 | "17009", 194 | "17010", 195 | "17020", 196 | "17030", 197 | "17040", 198 | "17050", 199 | "17060", 200 | "17070" 201 | ] 202 | }, 203 | { 204 | "name": "Pasir Puteh", 205 | "postcodes": [ 206 | "16800" 207 | ] 208 | }, 209 | { 210 | "name": "Pulai Chondong", 211 | "postcodes": [ 212 | "16600" 213 | ] 214 | }, 215 | { 216 | "name": "Rantau Panjang", 217 | "postcodes": [ 218 | "17200" 219 | ] 220 | }, 221 | { 222 | "name": "Selising", 223 | "postcodes": [ 224 | "16810" 225 | ] 226 | }, 227 | { 228 | "name": "Tanah Merah", 229 | "postcodes": [ 230 | "17500", 231 | "17507", 232 | "17509", 233 | "17510", 234 | "17520", 235 | "17599" 236 | ] 237 | }, 238 | { 239 | "name": "Temangan", 240 | "postcodes": [ 241 | "18400" 242 | ] 243 | }, 244 | { 245 | "name": "Tumpat", 246 | "postcodes": [ 247 | "16080", 248 | "16200", 249 | "16210" 250 | ] 251 | }, 252 | { 253 | "name": "Wakaf Bharu", 254 | "postcodes": [ 255 | "16040", 256 | "16250", 257 | "16266" 258 | ] 259 | } 260 | ] 261 | } -------------------------------------------------------------------------------- /examples/python_example.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | """ 3 | Malaysia Postcode Usage Examples - Python 4 | 5 | This file demonstrates various ways to use the Malaysia postcode data in Python. 6 | """ 7 | 8 | import json 9 | import csv 10 | from pathlib import Path 11 | 12 | # Example 1: Load and search JSON data 13 | def example_json_search(): 14 | """Load JSON data and search for postcodes in a specific city""" 15 | print("="*60) 16 | print("Example 1: Search postcodes in JSON format") 17 | print("="*60) 18 | 19 | # Load complete postcode data 20 | with open('../data/json/postcodes.json', 'r', encoding='utf-8') as f: 21 | data = json.load(f) 22 | 23 | # Search for a specific city 24 | search_city = "Petaling Jaya" 25 | 26 | for state in data['states']: 27 | for city in state['cities']: 28 | if search_city.lower() in city['name'].lower(): 29 | print(f"\nState: {state['name']} ({state['code']})") 30 | print(f"City: {city['name']}") 31 | print(f"Postcodes: {', '.join(city['postcodes'][:10])}...") 32 | print(f"Total: {len(city['postcodes'])} postcodes") 33 | 34 | print() 35 | 36 | # Example 2: Load state-specific data 37 | def example_state_data(): 38 | """Load data for a specific state""" 39 | print("="*60) 40 | print("Example 2: Load state-specific data") 41 | print("="*60) 42 | 43 | # Load Selangor data 44 | with open('../data/json/states/selangor.json', 'r', encoding='utf-8') as f: 45 | selangor = json.load(f) 46 | 47 | print(f"\nState: {selangor['name']} ({selangor['code']})") 48 | print(f"Total cities: {len(selangor['cities'])}") 49 | print(f"\nFirst 5 cities:") 50 | 51 | for city in selangor['cities'][:5]: 52 | postcode_range = f"{city['postcodes'][0]} - {city['postcodes'][-1]}" 53 | print(f" - {city['name']:30} ({len(city['postcodes']):3} postcodes) [{postcode_range}]") 54 | 55 | print() 56 | 57 | # Example 3: Read CSV data 58 | def example_csv_read(): 59 | """Read and filter CSV data""" 60 | print("="*60) 61 | print("Example 3: Read and filter CSV data") 62 | print("="*60) 63 | 64 | # Read postcodes CSV 65 | postcodes = [] 66 | with open('../data/csv/postcodes.csv', 'r', encoding='utf-8') as f: 67 | reader = csv.DictReader(f) 68 | postcodes = list(reader) 69 | 70 | # Filter by state 71 | johor_postcodes = [p for p in postcodes if p['state_code'] == 'JHR'] 72 | 73 | print(f"\nTotal postcodes in Malaysia: {len(postcodes)}") 74 | print(f"Postcodes in Johor: {len(johor_postcodes)}") 75 | print(f"\nFirst 5 Johor postcodes:") 76 | 77 | for p in johor_postcodes[:5]: 78 | print(f" {p['postcode']} - {p['city']}, {p['state']}") 79 | 80 | print() 81 | 82 | # Example 4: Validate a postcode 83 | def validate_postcode(postcode): 84 | """Validate if a postcode exists and return its location""" 85 | with open('../data/csv/postcodes.csv', 'r', encoding='utf-8') as f: 86 | reader = csv.DictReader(f) 87 | for row in reader: 88 | if row['postcode'] == postcode: 89 | return { 90 | 'valid': True, 91 | 'city': row['city'], 92 | 'state': row['state'], 93 | 'state_code': row['state_code'] 94 | } 95 | 96 | return {'valid': False} 97 | 98 | def example_validate(): 99 | """Example of postcode validation""" 100 | print("="*60) 101 | print("Example 4: Validate postcodes") 102 | print("="*60) 103 | 104 | test_postcodes = ['50000', '10000', '99999', '40100'] 105 | 106 | for pc in test_postcodes: 107 | result = validate_postcode(pc) 108 | if result['valid']: 109 | print(f"\n✓ {pc} is valid") 110 | print(f" City: {result['city']}") 111 | print(f" State: {result['state']} ({result['state_code']})") 112 | else: 113 | print(f"\n✗ {pc} is not valid") 114 | 115 | print() 116 | 117 | # Example 5: Get all postcodes for a state 118 | def get_postcodes_by_state(state_code): 119 | """Get all postcodes for a given state""" 120 | postcodes = [] 121 | with open('../data/csv/postcodes.csv', 'r', encoding='utf-8') as f: 122 | reader = csv.DictReader(f) 123 | for row in reader: 124 | if row['state_code'] == state_code: 125 | postcodes.append(row) 126 | return postcodes 127 | 128 | def example_by_state(): 129 | """Example of getting postcodes by state""" 130 | print("="*60) 131 | print("Example 5: Get postcodes by state") 132 | print("="*60) 133 | 134 | state_code = 'PLS' # Perlis 135 | postcodes = get_postcodes_by_state(state_code) 136 | 137 | print(f"\nPostcodes in {state_code}:") 138 | print(f"Total: {len(postcodes)}") 139 | 140 | # Group by city 141 | cities = {} 142 | for p in postcodes: 143 | city = p['city'] 144 | if city not in cities: 145 | cities[city] = [] 146 | cities[city].append(p['postcode']) 147 | 148 | print(f"\nCities: {len(cities)}") 149 | for city, pcs in sorted(cities.items()): 150 | print(f" {city:30} {len(pcs):3} postcodes") 151 | 152 | print() 153 | 154 | if __name__ == '__main__': 155 | # Run all examples 156 | example_json_search() 157 | example_state_data() 158 | example_csv_read() 159 | example_validate() 160 | example_by_state() 161 | 162 | print("="*60) 163 | print("All examples completed!") 164 | print("="*60) 165 | -------------------------------------------------------------------------------- /data/csv/states/Pulau_Pinang.csv: -------------------------------------------------------------------------------- 1 | postcode,city,state,state_code 2 | 11500,Ayer Itam,Pulau Pinang,PNG 3 | 11000,Balik Pulau,Pulau Pinang,PNG 4 | 11010,Balik Pulau,Pulau Pinang,PNG 5 | 11020,Balik Pulau,Pulau Pinang,PNG 6 | 11100,Batu Ferringhi,Pulau Pinang,PNG 7 | 11960,Batu Maung,Pulau Pinang,PNG 8 | 11900,Bayan Lepas,Pulau Pinang,PNG 9 | 11910,Bayan Lepas,Pulau Pinang,PNG 10 | 11920,Bayan Lepas,Pulau Pinang,PNG 11 | 11950,Bayan Lepas,Pulau Pinang,PNG 12 | 14000,Bukit Mertajam,Pulau Pinang,PNG 13 | 14007,Bukit Mertajam,Pulau Pinang,PNG 14 | 14009,Bukit Mertajam,Pulau Pinang,PNG 15 | 14020,Bukit Mertajam,Pulau Pinang,PNG 16 | 12000,Butterworth,Pulau Pinang,PNG 17 | 12100,Butterworth,Pulau Pinang,PNG 18 | 12200,Butterworth,Pulau Pinang,PNG 19 | 12300,Butterworth,Pulau Pinang,PNG 20 | 12700,Butterworth,Pulau Pinang,PNG 21 | 12710,Butterworth,Pulau Pinang,PNG 22 | 12720,Butterworth,Pulau Pinang,PNG 23 | 12990,Butterworth,Pulau Pinang,PNG 24 | 13000,Butterworth,Pulau Pinang,PNG 25 | 13009,Butterworth,Pulau Pinang,PNG 26 | 13020,Butterworth,Pulau Pinang,PNG 27 | 13050,Butterworth,Pulau Pinang,PNG 28 | 13400,Butterworth,Pulau Pinang,PNG 29 | 13409,Butterworth,Pulau Pinang,PNG 30 | 13800,Butterworth,Pulau Pinang,PNG 31 | 11700,Gelugor,Pulau Pinang,PNG 32 | 11600,Jelutong,Pulau Pinang,PNG 33 | 11609,Jelutong,Pulau Pinang,PNG 34 | 13200,Kepala Batas,Pulau Pinang,PNG 35 | 13210,Kepala Batas,Pulau Pinang,PNG 36 | 13220,Kepala Batas,Pulau Pinang,PNG 37 | 14400,Kubang Semang,Pulau Pinang,PNG 38 | 14300,Nibong Tebal,Pulau Pinang,PNG 39 | 14310,Nibong Tebal,Pulau Pinang,PNG 40 | 14320,Nibong Tebal,Pulau Pinang,PNG 41 | 13100,Penaga,Pulau Pinang,PNG 42 | 13110,Penaga,Pulau Pinang,PNG 43 | 11300,Penang Hill,Pulau Pinang,PNG 44 | 13600,Perai,Pulau Pinang,PNG 45 | 13700,Perai,Pulau Pinang,PNG 46 | 13500,Permatang Pauh,Pulau Pinang,PNG 47 | 10000,Pulau Pinang,Pulau Pinang,PNG 48 | 10050,Pulau Pinang,Pulau Pinang,PNG 49 | 10100,Pulau Pinang,Pulau Pinang,PNG 50 | 10150,Pulau Pinang,Pulau Pinang,PNG 51 | 10200,Pulau Pinang,Pulau Pinang,PNG 52 | 10250,Pulau Pinang,Pulau Pinang,PNG 53 | 10300,Pulau Pinang,Pulau Pinang,PNG 54 | 10350,Pulau Pinang,Pulau Pinang,PNG 55 | 10400,Pulau Pinang,Pulau Pinang,PNG 56 | 10450,Pulau Pinang,Pulau Pinang,PNG 57 | 10460,Pulau Pinang,Pulau Pinang,PNG 58 | 10470,Pulau Pinang,Pulau Pinang,PNG 59 | 10500,Pulau Pinang,Pulau Pinang,PNG 60 | 10502,Pulau Pinang,Pulau Pinang,PNG 61 | 10503,Pulau Pinang,Pulau Pinang,PNG 62 | 10504,Pulau Pinang,Pulau Pinang,PNG 63 | 10505,Pulau Pinang,Pulau Pinang,PNG 64 | 10506,Pulau Pinang,Pulau Pinang,PNG 65 | 10508,Pulau Pinang,Pulau Pinang,PNG 66 | 10512,Pulau Pinang,Pulau Pinang,PNG 67 | 10514,Pulau Pinang,Pulau Pinang,PNG 68 | 10516,Pulau Pinang,Pulau Pinang,PNG 69 | 10518,Pulau Pinang,Pulau Pinang,PNG 70 | 10524,Pulau Pinang,Pulau Pinang,PNG 71 | 10534,Pulau Pinang,Pulau Pinang,PNG 72 | 10538,Pulau Pinang,Pulau Pinang,PNG 73 | 10540,Pulau Pinang,Pulau Pinang,PNG 74 | 10542,Pulau Pinang,Pulau Pinang,PNG 75 | 10546,Pulau Pinang,Pulau Pinang,PNG 76 | 10550,Pulau Pinang,Pulau Pinang,PNG 77 | 10551,Pulau Pinang,Pulau Pinang,PNG 78 | 10552,Pulau Pinang,Pulau Pinang,PNG 79 | 10558,Pulau Pinang,Pulau Pinang,PNG 80 | 10560,Pulau Pinang,Pulau Pinang,PNG 81 | 10564,Pulau Pinang,Pulau Pinang,PNG 82 | 10566,Pulau Pinang,Pulau Pinang,PNG 83 | 10570,Pulau Pinang,Pulau Pinang,PNG 84 | 10576,Pulau Pinang,Pulau Pinang,PNG 85 | 10578,Pulau Pinang,Pulau Pinang,PNG 86 | 10582,Pulau Pinang,Pulau Pinang,PNG 87 | 10590,Pulau Pinang,Pulau Pinang,PNG 88 | 10592,Pulau Pinang,Pulau Pinang,PNG 89 | 10593,Pulau Pinang,Pulau Pinang,PNG 90 | 10594,Pulau Pinang,Pulau Pinang,PNG 91 | 10596,Pulau Pinang,Pulau Pinang,PNG 92 | 10600,Pulau Pinang,Pulau Pinang,PNG 93 | 10604,Pulau Pinang,Pulau Pinang,PNG 94 | 10609,Pulau Pinang,Pulau Pinang,PNG 95 | 10610,Pulau Pinang,Pulau Pinang,PNG 96 | 10612,Pulau Pinang,Pulau Pinang,PNG 97 | 10620,Pulau Pinang,Pulau Pinang,PNG 98 | 10622,Pulau Pinang,Pulau Pinang,PNG 99 | 10626,Pulau Pinang,Pulau Pinang,PNG 100 | 10628,Pulau Pinang,Pulau Pinang,PNG 101 | 10634,Pulau Pinang,Pulau Pinang,PNG 102 | 10646,Pulau Pinang,Pulau Pinang,PNG 103 | 10648,Pulau Pinang,Pulau Pinang,PNG 104 | 10660,Pulau Pinang,Pulau Pinang,PNG 105 | 10661,Pulau Pinang,Pulau Pinang,PNG 106 | 10662,Pulau Pinang,Pulau Pinang,PNG 107 | 10670,Pulau Pinang,Pulau Pinang,PNG 108 | 10672,Pulau Pinang,Pulau Pinang,PNG 109 | 10673,Pulau Pinang,Pulau Pinang,PNG 110 | 10674,Pulau Pinang,Pulau Pinang,PNG 111 | 10676,Pulau Pinang,Pulau Pinang,PNG 112 | 10690,Pulau Pinang,Pulau Pinang,PNG 113 | 10710,Pulau Pinang,Pulau Pinang,PNG 114 | 10720,Pulau Pinang,Pulau Pinang,PNG 115 | 10730,Pulau Pinang,Pulau Pinang,PNG 116 | 10740,Pulau Pinang,Pulau Pinang,PNG 117 | 10750,Pulau Pinang,Pulau Pinang,PNG 118 | 10760,Pulau Pinang,Pulau Pinang,PNG 119 | 10770,Pulau Pinang,Pulau Pinang,PNG 120 | 10780,Pulau Pinang,Pulau Pinang,PNG 121 | 10790,Pulau Pinang,Pulau Pinang,PNG 122 | 10800,Pulau Pinang,Pulau Pinang,PNG 123 | 10810,Pulau Pinang,Pulau Pinang,PNG 124 | 10820,Pulau Pinang,Pulau Pinang,PNG 125 | 10830,Pulau Pinang,Pulau Pinang,PNG 126 | 10840,Pulau Pinang,Pulau Pinang,PNG 127 | 10850,Pulau Pinang,Pulau Pinang,PNG 128 | 10910,Pulau Pinang,Pulau Pinang,PNG 129 | 10920,Pulau Pinang,Pulau Pinang,PNG 130 | 10990,Pulau Pinang,Pulau Pinang,PNG 131 | 11050,Pulau Pinang,Pulau Pinang,PNG 132 | 11060,Pulau Pinang,Pulau Pinang,PNG 133 | 11400,Pulau Pinang,Pulau Pinang,PNG 134 | 11409,Pulau Pinang,Pulau Pinang,PNG 135 | 14100,Simpang Ampat,Pulau Pinang,PNG 136 | 14101,Simpang Ampat,Pulau Pinang,PNG 137 | 14110,Simpang Ampat,Pulau Pinang,PNG 138 | 14120,Simpang Ampat,Pulau Pinang,PNG 139 | 14200,Sungai Jawi,Pulau Pinang,PNG 140 | 11200,Tanjong Bungah,Pulau Pinang,PNG 141 | 13300,Tasek Gelugor,Pulau Pinang,PNG 142 | 13310,Tasek Gelugor,Pulau Pinang,PNG 143 | 11800,Usm Pulau Pinang,Pulau Pinang,PNG 144 | -------------------------------------------------------------------------------- /data/json/states/terengganu.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Terengganu", 3 | "code": "TRG", 4 | "cities": [ 5 | { 6 | "name": "Ajil", 7 | "postcodes": [ 8 | "21800", 9 | "21810", 10 | "21820" 11 | ] 12 | }, 13 | { 14 | "name": "Al Muktatfi Billah Shah", 15 | "postcodes": [ 16 | "23400" 17 | ] 18 | }, 19 | { 20 | "name": "Ayer Puteh", 21 | "postcodes": [ 22 | "24050" 23 | ] 24 | }, 25 | { 26 | "name": "Bukit Besi", 27 | "postcodes": [ 28 | "23200" 29 | ] 30 | }, 31 | { 32 | "name": "Bukit Payong", 33 | "postcodes": [ 34 | "21400" 35 | ] 36 | }, 37 | { 38 | "name": "Ceneh", 39 | "postcodes": [ 40 | "24060" 41 | ] 42 | }, 43 | { 44 | "name": "Chalok", 45 | "postcodes": [ 46 | "21450" 47 | ] 48 | }, 49 | { 50 | "name": "Cukai", 51 | "postcodes": [ 52 | "24000", 53 | "24007", 54 | "24009", 55 | "24010", 56 | "24020", 57 | "24030", 58 | "24040" 59 | ] 60 | }, 61 | { 62 | "name": "Dungun", 63 | "postcodes": [ 64 | "23000", 65 | "23007", 66 | "23009", 67 | "23050" 68 | ] 69 | }, 70 | { 71 | "name": "Jerteh", 72 | "postcodes": [ 73 | "22000", 74 | "22010", 75 | "22020", 76 | "22030", 77 | "22040" 78 | ] 79 | }, 80 | { 81 | "name": "Kampung Raja", 82 | "postcodes": [ 83 | "22200" 84 | ] 85 | }, 86 | { 87 | "name": "Kemasek", 88 | "postcodes": [ 89 | "24200", 90 | "24207", 91 | "24209", 92 | "24210", 93 | "24220" 94 | ] 95 | }, 96 | { 97 | "name": "Kerteh", 98 | "postcodes": [ 99 | "24300" 100 | ] 101 | }, 102 | { 103 | "name": "Ketengah Jaya", 104 | "postcodes": [ 105 | "23300", 106 | "23345" 107 | ] 108 | }, 109 | { 110 | "name": "Kijal", 111 | "postcodes": [ 112 | "24100", 113 | "24107", 114 | "24109" 115 | ] 116 | }, 117 | { 118 | "name": "Kuala Berang", 119 | "postcodes": [ 120 | "21700" 121 | ] 122 | }, 123 | { 124 | "name": "Kuala Besut", 125 | "postcodes": [ 126 | "22300", 127 | "22307", 128 | "22309" 129 | ] 130 | }, 131 | { 132 | "name": "Kuala Terengganu", 133 | "postcodes": [ 134 | "20000", 135 | "20050", 136 | "20080", 137 | "20100", 138 | "20200", 139 | "20300", 140 | "20400", 141 | "20500", 142 | "20502", 143 | "20503", 144 | "20504", 145 | "20505", 146 | "20506", 147 | "20508", 148 | "20512", 149 | "20514", 150 | "20516", 151 | "20517", 152 | "20518", 153 | "20519", 154 | "20520", 155 | "20532", 156 | "20534", 157 | "20536", 158 | "20538", 159 | "20540", 160 | "20542", 161 | "20546", 162 | "20548", 163 | "20550", 164 | "20551", 165 | "20552", 166 | "20554", 167 | "20556", 168 | "20560", 169 | "20564", 170 | "20566", 171 | "20568", 172 | "20570", 173 | "20572", 174 | "20576", 175 | "20578", 176 | "20582", 177 | "20586", 178 | "20590", 179 | "20592", 180 | "20596", 181 | "20600", 182 | "20604", 183 | "20606", 184 | "20608", 185 | "20609", 186 | "20610", 187 | "20612", 188 | "20614", 189 | "20618", 190 | "20620", 191 | "20622", 192 | "20626", 193 | "20628", 194 | "20630", 195 | "20632", 196 | "20646", 197 | "20648", 198 | "20656", 199 | "20658", 200 | "20660", 201 | "20661", 202 | "20662", 203 | "20664", 204 | "20668", 205 | "20670", 206 | "20672", 207 | "20673", 208 | "20674", 209 | "20676", 210 | "20680", 211 | "20690", 212 | "20698", 213 | "20700", 214 | "20710", 215 | "20720", 216 | "20900", 217 | "20902", 218 | "20904", 219 | "20906", 220 | "20908", 221 | "20910", 222 | "20912", 223 | "20914", 224 | "20916", 225 | "20918", 226 | "20920", 227 | "20922", 228 | "20924", 229 | "20926", 230 | "20928", 231 | "20930", 232 | "20990", 233 | "20999", 234 | "21000", 235 | "21009", 236 | "21010", 237 | "21020", 238 | "21030", 239 | "21040", 240 | "21050", 241 | "21060", 242 | "21070", 243 | "21080", 244 | "21090", 245 | "21100", 246 | "21109", 247 | "21200", 248 | "21209", 249 | "21210", 250 | "21220", 251 | "21300", 252 | "21309" 253 | ] 254 | }, 255 | { 256 | "name": "Marang", 257 | "postcodes": [ 258 | "21600", 259 | "21610" 260 | ] 261 | }, 262 | { 263 | "name": "Paka", 264 | "postcodes": [ 265 | "23100" 266 | ] 267 | }, 268 | { 269 | "name": "Permaisuri", 270 | "postcodes": [ 271 | "22100", 272 | "22107", 273 | "22109", 274 | "22110", 275 | "22120" 276 | ] 277 | }, 278 | { 279 | "name": "Sungai Tong", 280 | "postcodes": [ 281 | "21500" 282 | ] 283 | } 284 | ] 285 | } -------------------------------------------------------------------------------- /data/json/states/negeri_sembilan.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Negeri Sembilan", 3 | "code": "NSN", 4 | "cities": [ 5 | { 6 | "name": "Bahau", 7 | "postcodes": [ 8 | "72100", 9 | "72107", 10 | "72109" 11 | ] 12 | }, 13 | { 14 | "name": "Bandar Baru Enstek", 15 | "postcodes": [ 16 | "71760" 17 | ] 18 | }, 19 | { 20 | "name": "Bandar Seri Jempol", 21 | "postcodes": [ 22 | "72120", 23 | "72127", 24 | "72129" 25 | ] 26 | }, 27 | { 28 | "name": "Batu Kikir", 29 | "postcodes": [ 30 | "72200", 31 | "72207", 32 | "72209" 33 | ] 34 | }, 35 | { 36 | "name": "Gemas", 37 | "postcodes": [ 38 | "73400", 39 | "73409", 40 | "73410", 41 | "73420", 42 | "73480" 43 | ] 44 | }, 45 | { 46 | "name": "Gemencheh", 47 | "postcodes": [ 48 | "73200", 49 | "73207", 50 | "73209", 51 | "73300", 52 | "73309" 53 | ] 54 | }, 55 | { 56 | "name": "Johol", 57 | "postcodes": [ 58 | "73100", 59 | "73109" 60 | ] 61 | }, 62 | { 63 | "name": "Kota", 64 | "postcodes": [ 65 | "71350", 66 | "71359" 67 | ] 68 | }, 69 | { 70 | "name": "Kuala Klawang", 71 | "postcodes": [ 72 | "71600", 73 | "71609", 74 | "71650", 75 | "71659" 76 | ] 77 | }, 78 | { 79 | "name": "Kuala Pilah", 80 | "postcodes": [ 81 | "72000", 82 | "72007", 83 | "72009", 84 | "72500", 85 | "72507", 86 | "72509" 87 | ] 88 | }, 89 | { 90 | "name": "Labu", 91 | "postcodes": [ 92 | "71900", 93 | "71907", 94 | "71909" 95 | ] 96 | }, 97 | { 98 | "name": "Linggi", 99 | "postcodes": [ 100 | "71150", 101 | "71159" 102 | ] 103 | }, 104 | { 105 | "name": "Mantin", 106 | "postcodes": [ 107 | "71700", 108 | "71707", 109 | "71709", 110 | "71750", 111 | "71759" 112 | ] 113 | }, 114 | { 115 | "name": "Nilai", 116 | "postcodes": [ 117 | "71800", 118 | "71807", 119 | "71809", 120 | "71850" 121 | ] 122 | }, 123 | { 124 | "name": "Port Dickson", 125 | "postcodes": [ 126 | "71000", 127 | "71007", 128 | "71009", 129 | "71010", 130 | "71960", 131 | "71999" 132 | ] 133 | }, 134 | { 135 | "name": "Pusat Bandar Palong", 136 | "postcodes": [ 137 | "73430", 138 | "73440", 139 | "73450", 140 | "73460", 141 | "73470" 142 | ] 143 | }, 144 | { 145 | "name": "Rantau", 146 | "postcodes": [ 147 | "71100", 148 | "71109", 149 | "71200", 150 | "71209" 151 | ] 152 | }, 153 | { 154 | "name": "Rembau", 155 | "postcodes": [ 156 | "71300", 157 | "71309", 158 | "71400", 159 | "71409" 160 | ] 161 | }, 162 | { 163 | "name": "Rompin", 164 | "postcodes": [ 165 | "73500", 166 | "73507", 167 | "73509" 168 | ] 169 | }, 170 | { 171 | "name": "Seremban", 172 | "postcodes": [ 173 | "70000", 174 | "70100", 175 | "70200", 176 | "70300", 177 | "70400", 178 | "70450", 179 | "70500", 180 | "70502", 181 | "70503", 182 | "70504", 183 | "70505", 184 | "70506", 185 | "70508", 186 | "70512", 187 | "70516", 188 | "70517", 189 | "70518", 190 | "70532", 191 | "70534", 192 | "70536", 193 | "70540", 194 | "70546", 195 | "70548", 196 | "70550", 197 | "70551", 198 | "70558", 199 | "70560", 200 | "70564", 201 | "70570", 202 | "70572", 203 | "70576", 204 | "70578", 205 | "70582", 206 | "70586", 207 | "70590", 208 | "70592", 209 | "70594", 210 | "70596", 211 | "70600", 212 | "70604", 213 | "70606", 214 | "70608", 215 | "70609", 216 | "70610", 217 | "70620", 218 | "70626", 219 | "70628", 220 | "70632", 221 | "70634", 222 | "70644", 223 | "70646", 224 | "70648", 225 | "70658", 226 | "70664", 227 | "70670", 228 | "70672", 229 | "70673", 230 | "70674", 231 | "70676", 232 | "70690", 233 | "70700", 234 | "70710", 235 | "70720", 236 | "70730", 237 | "70740", 238 | "70750", 239 | "70990", 240 | "71450", 241 | "71459", 242 | "71770", 243 | "71950" 244 | ] 245 | }, 246 | { 247 | "name": "Si Rusa", 248 | "postcodes": [ 249 | "71050", 250 | "71059", 251 | "71250", 252 | "71259" 253 | ] 254 | }, 255 | { 256 | "name": "Simpang Durian", 257 | "postcodes": [ 258 | "72400", 259 | "72409" 260 | ] 261 | }, 262 | { 263 | "name": "Simpang Pertang", 264 | "postcodes": [ 265 | "72300", 266 | "72307", 267 | "72309" 268 | ] 269 | }, 270 | { 271 | "name": "Tampin", 272 | "postcodes": [ 273 | "73000", 274 | "73007", 275 | "73009" 276 | ] 277 | }, 278 | { 279 | "name": "Tanjong Ipoh", 280 | "postcodes": [ 281 | "71500", 282 | "71509", 283 | "71550", 284 | "71559" 285 | ] 286 | } 287 | ] 288 | } -------------------------------------------------------------------------------- /data/csv/states/Negeri_Sembilan.csv: -------------------------------------------------------------------------------- 1 | postcode,city,state,state_code 2 | 72100,Bahau,Negeri Sembilan,NSN 3 | 72107,Bahau,Negeri Sembilan,NSN 4 | 72109,Bahau,Negeri Sembilan,NSN 5 | 71760,Bandar Baru Enstek,Negeri Sembilan,NSN 6 | 72120,Bandar Seri Jempol,Negeri Sembilan,NSN 7 | 72127,Bandar Seri Jempol,Negeri Sembilan,NSN 8 | 72129,Bandar Seri Jempol,Negeri Sembilan,NSN 9 | 72200,Batu Kikir,Negeri Sembilan,NSN 10 | 72207,Batu Kikir,Negeri Sembilan,NSN 11 | 72209,Batu Kikir,Negeri Sembilan,NSN 12 | 73400,Gemas,Negeri Sembilan,NSN 13 | 73409,Gemas,Negeri Sembilan,NSN 14 | 73410,Gemas,Negeri Sembilan,NSN 15 | 73420,Gemas,Negeri Sembilan,NSN 16 | 73480,Gemas,Negeri Sembilan,NSN 17 | 73200,Gemencheh,Negeri Sembilan,NSN 18 | 73207,Gemencheh,Negeri Sembilan,NSN 19 | 73209,Gemencheh,Negeri Sembilan,NSN 20 | 73300,Gemencheh,Negeri Sembilan,NSN 21 | 73309,Gemencheh,Negeri Sembilan,NSN 22 | 73100,Johol,Negeri Sembilan,NSN 23 | 73109,Johol,Negeri Sembilan,NSN 24 | 71350,Kota,Negeri Sembilan,NSN 25 | 71359,Kota,Negeri Sembilan,NSN 26 | 71600,Kuala Klawang,Negeri Sembilan,NSN 27 | 71609,Kuala Klawang,Negeri Sembilan,NSN 28 | 71650,Kuala Klawang,Negeri Sembilan,NSN 29 | 71659,Kuala Klawang,Negeri Sembilan,NSN 30 | 72000,Kuala Pilah,Negeri Sembilan,NSN 31 | 72007,Kuala Pilah,Negeri Sembilan,NSN 32 | 72009,Kuala Pilah,Negeri Sembilan,NSN 33 | 72500,Kuala Pilah,Negeri Sembilan,NSN 34 | 72507,Kuala Pilah,Negeri Sembilan,NSN 35 | 72509,Kuala Pilah,Negeri Sembilan,NSN 36 | 71900,Labu,Negeri Sembilan,NSN 37 | 71907,Labu,Negeri Sembilan,NSN 38 | 71909,Labu,Negeri Sembilan,NSN 39 | 71150,Linggi,Negeri Sembilan,NSN 40 | 71159,Linggi,Negeri Sembilan,NSN 41 | 71700,Mantin,Negeri Sembilan,NSN 42 | 71707,Mantin,Negeri Sembilan,NSN 43 | 71709,Mantin,Negeri Sembilan,NSN 44 | 71750,Mantin,Negeri Sembilan,NSN 45 | 71759,Mantin,Negeri Sembilan,NSN 46 | 71800,Nilai,Negeri Sembilan,NSN 47 | 71807,Nilai,Negeri Sembilan,NSN 48 | 71809,Nilai,Negeri Sembilan,NSN 49 | 71850,Nilai,Negeri Sembilan,NSN 50 | 71000,Port Dickson,Negeri Sembilan,NSN 51 | 71007,Port Dickson,Negeri Sembilan,NSN 52 | 71009,Port Dickson,Negeri Sembilan,NSN 53 | 71010,Port Dickson,Negeri Sembilan,NSN 54 | 71960,Port Dickson,Negeri Sembilan,NSN 55 | 71999,Port Dickson,Negeri Sembilan,NSN 56 | 73430,Pusat Bandar Palong,Negeri Sembilan,NSN 57 | 73440,Pusat Bandar Palong,Negeri Sembilan,NSN 58 | 73450,Pusat Bandar Palong,Negeri Sembilan,NSN 59 | 73460,Pusat Bandar Palong,Negeri Sembilan,NSN 60 | 73470,Pusat Bandar Palong,Negeri Sembilan,NSN 61 | 71100,Rantau,Negeri Sembilan,NSN 62 | 71109,Rantau,Negeri Sembilan,NSN 63 | 71200,Rantau,Negeri Sembilan,NSN 64 | 71209,Rantau,Negeri Sembilan,NSN 65 | 71300,Rembau,Negeri Sembilan,NSN 66 | 71309,Rembau,Negeri Sembilan,NSN 67 | 71400,Rembau,Negeri Sembilan,NSN 68 | 71409,Rembau,Negeri Sembilan,NSN 69 | 73500,Rompin,Negeri Sembilan,NSN 70 | 73507,Rompin,Negeri Sembilan,NSN 71 | 73509,Rompin,Negeri Sembilan,NSN 72 | 70000,Seremban,Negeri Sembilan,NSN 73 | 70100,Seremban,Negeri Sembilan,NSN 74 | 70200,Seremban,Negeri Sembilan,NSN 75 | 70300,Seremban,Negeri Sembilan,NSN 76 | 70400,Seremban,Negeri Sembilan,NSN 77 | 70450,Seremban,Negeri Sembilan,NSN 78 | 70500,Seremban,Negeri Sembilan,NSN 79 | 70502,Seremban,Negeri Sembilan,NSN 80 | 70503,Seremban,Negeri Sembilan,NSN 81 | 70504,Seremban,Negeri Sembilan,NSN 82 | 70505,Seremban,Negeri Sembilan,NSN 83 | 70506,Seremban,Negeri Sembilan,NSN 84 | 70508,Seremban,Negeri Sembilan,NSN 85 | 70512,Seremban,Negeri Sembilan,NSN 86 | 70516,Seremban,Negeri Sembilan,NSN 87 | 70517,Seremban,Negeri Sembilan,NSN 88 | 70518,Seremban,Negeri Sembilan,NSN 89 | 70532,Seremban,Negeri Sembilan,NSN 90 | 70534,Seremban,Negeri Sembilan,NSN 91 | 70536,Seremban,Negeri Sembilan,NSN 92 | 70540,Seremban,Negeri Sembilan,NSN 93 | 70546,Seremban,Negeri Sembilan,NSN 94 | 70548,Seremban,Negeri Sembilan,NSN 95 | 70550,Seremban,Negeri Sembilan,NSN 96 | 70551,Seremban,Negeri Sembilan,NSN 97 | 70558,Seremban,Negeri Sembilan,NSN 98 | 70560,Seremban,Negeri Sembilan,NSN 99 | 70564,Seremban,Negeri Sembilan,NSN 100 | 70570,Seremban,Negeri Sembilan,NSN 101 | 70572,Seremban,Negeri Sembilan,NSN 102 | 70576,Seremban,Negeri Sembilan,NSN 103 | 70578,Seremban,Negeri Sembilan,NSN 104 | 70582,Seremban,Negeri Sembilan,NSN 105 | 70586,Seremban,Negeri Sembilan,NSN 106 | 70590,Seremban,Negeri Sembilan,NSN 107 | 70592,Seremban,Negeri Sembilan,NSN 108 | 70594,Seremban,Negeri Sembilan,NSN 109 | 70596,Seremban,Negeri Sembilan,NSN 110 | 70600,Seremban,Negeri Sembilan,NSN 111 | 70604,Seremban,Negeri Sembilan,NSN 112 | 70606,Seremban,Negeri Sembilan,NSN 113 | 70608,Seremban,Negeri Sembilan,NSN 114 | 70609,Seremban,Negeri Sembilan,NSN 115 | 70610,Seremban,Negeri Sembilan,NSN 116 | 70620,Seremban,Negeri Sembilan,NSN 117 | 70626,Seremban,Negeri Sembilan,NSN 118 | 70628,Seremban,Negeri Sembilan,NSN 119 | 70632,Seremban,Negeri Sembilan,NSN 120 | 70634,Seremban,Negeri Sembilan,NSN 121 | 70644,Seremban,Negeri Sembilan,NSN 122 | 70646,Seremban,Negeri Sembilan,NSN 123 | 70648,Seremban,Negeri Sembilan,NSN 124 | 70658,Seremban,Negeri Sembilan,NSN 125 | 70664,Seremban,Negeri Sembilan,NSN 126 | 70670,Seremban,Negeri Sembilan,NSN 127 | 70672,Seremban,Negeri Sembilan,NSN 128 | 70673,Seremban,Negeri Sembilan,NSN 129 | 70674,Seremban,Negeri Sembilan,NSN 130 | 70676,Seremban,Negeri Sembilan,NSN 131 | 70690,Seremban,Negeri Sembilan,NSN 132 | 70700,Seremban,Negeri Sembilan,NSN 133 | 70710,Seremban,Negeri Sembilan,NSN 134 | 70720,Seremban,Negeri Sembilan,NSN 135 | 70730,Seremban,Negeri Sembilan,NSN 136 | 70740,Seremban,Negeri Sembilan,NSN 137 | 70750,Seremban,Negeri Sembilan,NSN 138 | 70990,Seremban,Negeri Sembilan,NSN 139 | 71450,Seremban,Negeri Sembilan,NSN 140 | 71459,Seremban,Negeri Sembilan,NSN 141 | 71770,Seremban,Negeri Sembilan,NSN 142 | 71950,Seremban,Negeri Sembilan,NSN 143 | 71050,Si Rusa,Negeri Sembilan,NSN 144 | 71059,Si Rusa,Negeri Sembilan,NSN 145 | 71250,Si Rusa,Negeri Sembilan,NSN 146 | 71259,Si Rusa,Negeri Sembilan,NSN 147 | 72400,Simpang Durian,Negeri Sembilan,NSN 148 | 72409,Simpang Durian,Negeri Sembilan,NSN 149 | 72300,Simpang Pertang,Negeri Sembilan,NSN 150 | 72307,Simpang Pertang,Negeri Sembilan,NSN 151 | 72309,Simpang Pertang,Negeri Sembilan,NSN 152 | 73000,Tampin,Negeri Sembilan,NSN 153 | 73007,Tampin,Negeri Sembilan,NSN 154 | 73009,Tampin,Negeri Sembilan,NSN 155 | 71500,Tanjong Ipoh,Negeri Sembilan,NSN 156 | 71509,Tanjong Ipoh,Negeri Sembilan,NSN 157 | 71550,Tanjong Ipoh,Negeri Sembilan,NSN 158 | 71559,Tanjong Ipoh,Negeri Sembilan,NSN 159 | -------------------------------------------------------------------------------- /data/csv/states/Pahang.csv: -------------------------------------------------------------------------------- 1 | postcode,city,state,state_code 2 | 26080,Balok,Pahang,PHG 3 | 26100,Balok,Pahang,PHG 4 | 26150,Balok,Pahang,PHG 5 | 26190,Balok,Pahang,PHG 6 | 26400,Bandar Pusat Jengka,Pahang,PHG 7 | 26410,Bandar Pusat Jengka,Pahang,PHG 8 | 26420,Bandar Pusat Jengka,Pahang,PHG 9 | 26430,Bandar Pusat Jengka,Pahang,PHG 10 | 26440,Bandar Pusat Jengka,Pahang,PHG 11 | 26450,Bandar Pusat Jengka,Pahang,PHG 12 | 26460,Bandar Pusat Jengka,Pahang,PHG 13 | 26485,Bandar Pusat Jengka,Pahang,PHG 14 | 26490,Bandar Pusat Jengka,Pahang,PHG 15 | 27080,Bandar Pusat Jengka,Pahang,PHG 16 | 26900,Bandar Tun Abdul Razak,Pahang,PHG 17 | 26999,Bandar Tun Abdul Razak,Pahang,PHG 18 | 27300,Benta,Pahang,PHG 19 | 27310,Benta,Pahang,PHG 20 | 28700,Bentong,Pahang,PHG 21 | 28707,Bentong,Pahang,PHG 22 | 28709,Bentong,Pahang,PHG 23 | 28730,Bentong,Pahang,PHG 24 | 28740,Bentong,Pahang,PHG 25 | 28750,Bentong,Pahang,PHG 26 | 39100,Brinchang,Pahang,PHG 27 | 49000,Bukit Fraser,Pahang,PHG 28 | 26050,Bukit Goh,Pahang,PHG 29 | 26090,Bukit Goh,Pahang,PHG 30 | 28100,Chenor,Pahang,PHG 31 | 26690,Chini,Pahang,PHG 32 | 27030,Damak,Pahang,PHG 33 | 27400,Dong,Pahang,PHG 34 | 26300,Gambang,Pahang,PHG 35 | 26310,Gambang,Pahang,PHG 36 | 26320,Gambang,Pahang,PHG 37 | 26330,Gambang,Pahang,PHG 38 | 26340,Gambang,Pahang,PHG 39 | 26350,Gambang,Pahang,PHG 40 | 26360,Gambang,Pahang,PHG 41 | 26370,Gambang,Pahang,PHG 42 | 69000,Genting Highlands,Pahang,PHG 43 | 26250,Jaya Gading,Pahang,PHG 44 | 27000,Jerantut,Pahang,PHG 45 | 27010,Jerantut,Pahang,PHG 46 | 27020,Jerantut,Pahang,PHG 47 | 27040,Jerantut,Pahang,PHG 48 | 27050,Jerantut,Pahang,PHG 49 | 27060,Jerantut,Pahang,PHG 50 | 27070,Jerantut,Pahang,PHG 51 | 27090,Jerantut,Pahang,PHG 52 | 27150,Jerantut,Pahang,PHG 53 | 28600,Karak,Pahang,PHG 54 | 28610,Karak,Pahang,PHG 55 | 28620,Karak,Pahang,PHG 56 | 28340,Kemayan,Pahang,PHG 57 | 28380,Kemayan,Pahang,PHG 58 | 28050,Kuala Krau,Pahang,PHG 59 | 27200,Kuala Lipis,Pahang,PHG 60 | 27207,Kuala Lipis,Pahang,PHG 61 | 27209,Kuala Lipis,Pahang,PHG 62 | 27210,Kuala Lipis,Pahang,PHG 63 | 26800,Kuala Rompin,Pahang,PHG 64 | 26810,Kuala Rompin,Pahang,PHG 65 | 26820,Kuala Rompin,Pahang,PHG 66 | 25000,Kuantan,Pahang,PHG 67 | 25020,Kuantan,Pahang,PHG 68 | 25040,Kuantan,Pahang,PHG 69 | 25050,Kuantan,Pahang,PHG 70 | 25100,Kuantan,Pahang,PHG 71 | 25150,Kuantan,Pahang,PHG 72 | 25200,Kuantan,Pahang,PHG 73 | 25250,Kuantan,Pahang,PHG 74 | 25300,Kuantan,Pahang,PHG 75 | 25320,Kuantan,Pahang,PHG 76 | 25350,Kuantan,Pahang,PHG 77 | 25500,Kuantan,Pahang,PHG 78 | 25502,Kuantan,Pahang,PHG 79 | 25503,Kuantan,Pahang,PHG 80 | 25504,Kuantan,Pahang,PHG 81 | 25505,Kuantan,Pahang,PHG 82 | 25506,Kuantan,Pahang,PHG 83 | 25508,Kuantan,Pahang,PHG 84 | 25509,Kuantan,Pahang,PHG 85 | 25512,Kuantan,Pahang,PHG 86 | 25514,Kuantan,Pahang,PHG 87 | 25516,Kuantan,Pahang,PHG 88 | 25517,Kuantan,Pahang,PHG 89 | 25518,Kuantan,Pahang,PHG 90 | 25520,Kuantan,Pahang,PHG 91 | 25524,Kuantan,Pahang,PHG 92 | 25529,Kuantan,Pahang,PHG 93 | 25532,Kuantan,Pahang,PHG 94 | 25534,Kuantan,Pahang,PHG 95 | 25536,Kuantan,Pahang,PHG 96 | 25538,Kuantan,Pahang,PHG 97 | 25540,Kuantan,Pahang,PHG 98 | 25546,Kuantan,Pahang,PHG 99 | 25548,Kuantan,Pahang,PHG 100 | 25550,Kuantan,Pahang,PHG 101 | 25551,Kuantan,Pahang,PHG 102 | 25552,Kuantan,Pahang,PHG 103 | 25556,Kuantan,Pahang,PHG 104 | 25558,Kuantan,Pahang,PHG 105 | 25560,Kuantan,Pahang,PHG 106 | 25564,Kuantan,Pahang,PHG 107 | 25570,Kuantan,Pahang,PHG 108 | 25576,Kuantan,Pahang,PHG 109 | 25578,Kuantan,Pahang,PHG 110 | 25582,Kuantan,Pahang,PHG 111 | 25584,Kuantan,Pahang,PHG 112 | 25586,Kuantan,Pahang,PHG 113 | 25590,Kuantan,Pahang,PHG 114 | 25592,Kuantan,Pahang,PHG 115 | 25594,Kuantan,Pahang,PHG 116 | 25596,Kuantan,Pahang,PHG 117 | 25598,Kuantan,Pahang,PHG 118 | 25600,Kuantan,Pahang,PHG 119 | 25604,Kuantan,Pahang,PHG 120 | 25606,Kuantan,Pahang,PHG 121 | 25608,Kuantan,Pahang,PHG 122 | 25609,Kuantan,Pahang,PHG 123 | 25610,Kuantan,Pahang,PHG 124 | 25612,Kuantan,Pahang,PHG 125 | 25614,Kuantan,Pahang,PHG 126 | 25620,Kuantan,Pahang,PHG 127 | 25622,Kuantan,Pahang,PHG 128 | 25626,Kuantan,Pahang,PHG 129 | 25628,Kuantan,Pahang,PHG 130 | 25630,Kuantan,Pahang,PHG 131 | 25632,Kuantan,Pahang,PHG 132 | 25644,Kuantan,Pahang,PHG 133 | 25646,Kuantan,Pahang,PHG 134 | 25648,Kuantan,Pahang,PHG 135 | 25656,Kuantan,Pahang,PHG 136 | 25660,Kuantan,Pahang,PHG 137 | 25661,Kuantan,Pahang,PHG 138 | 25662,Kuantan,Pahang,PHG 139 | 25670,Kuantan,Pahang,PHG 140 | 25672,Kuantan,Pahang,PHG 141 | 25673,Kuantan,Pahang,PHG 142 | 25674,Kuantan,Pahang,PHG 143 | 25676,Kuantan,Pahang,PHG 144 | 25690,Kuantan,Pahang,PHG 145 | 25700,Kuantan,Pahang,PHG 146 | 25710,Kuantan,Pahang,PHG 147 | 25720,Kuantan,Pahang,PHG 148 | 25730,Kuantan,Pahang,PHG 149 | 25740,Kuantan,Pahang,PHG 150 | 25750,Kuantan,Pahang,PHG 151 | 25990,Kuantan,Pahang,PHG 152 | 26000,Kuantan,Pahang,PHG 153 | 26010,Kuantan,Pahang,PHG 154 | 26040,Kuantan,Pahang,PHG 155 | 26060,Kuantan,Pahang,PHG 156 | 26070,Kuantan,Pahang,PHG 157 | 26140,Kuantan,Pahang,PHG 158 | 26180,Kuantan,Pahang,PHG 159 | 28500,Lanchang,Pahang,PHG 160 | 28800,Lurah Bilut,Pahang,PHG 161 | 26500,Maran,Pahang,PHG 162 | 28400,Mentakab,Pahang,PHG 163 | 28407,Mentakab,Pahang,PHG 164 | 28409,Mentakab,Pahang,PHG 165 | 26700,Muadzam Shah,Pahang,PHG 166 | 27100,Padang Tengku,Pahang,PHG 167 | 26600,Pekan,Pahang,PHG 168 | 26607,Pekan,Pahang,PHG 169 | 26609,Pekan,Pahang,PHG 170 | 26610,Pekan,Pahang,PHG 171 | 26620,Pekan,Pahang,PHG 172 | 26630,Pekan,Pahang,PHG 173 | 26640,Pekan,Pahang,PHG 174 | 26650,Pekan,Pahang,PHG 175 | 26660,Pekan,Pahang,PHG 176 | 26680,Pekan,Pahang,PHG 177 | 27600,Raub,Pahang,PHG 178 | 27607,Raub,Pahang,PHG 179 | 27609,Raub,Pahang,PHG 180 | 27610,Raub,Pahang,PHG 181 | 27620,Raub,Pahang,PHG 182 | 27630,Raub,Pahang,PHG 183 | 27670,Raub,Pahang,PHG 184 | 39200,Ringlet,Pahang,PHG 185 | 27660,Sega,Pahang,PHG 186 | 27650,Sungai Koyan,Pahang,PHG 187 | 26200,Sungai Lembing,Pahang,PHG 188 | 27500,Sungai Ruan,Pahang,PHG 189 | 39000,Tanah Rata,Pahang,PHG 190 | 39007,Tanah Rata,Pahang,PHG 191 | 39009,Tanah Rata,Pahang,PHG 192 | 39010,Tanah Rata,Pahang,PHG 193 | 28000,Temerloh,Pahang,PHG 194 | 28007,Temerloh,Pahang,PHG 195 | 28009,Temerloh,Pahang,PHG 196 | 28010,Temerloh,Pahang,PHG 197 | 28020,Temerloh,Pahang,PHG 198 | 28030,Temerloh,Pahang,PHG 199 | 28040,Temerloh,Pahang,PHG 200 | 28200,Triang,Pahang,PHG 201 | 28300,Triang,Pahang,PHG 202 | 28310,Triang,Pahang,PHG 203 | 28320,Triang,Pahang,PHG 204 | 28330,Triang,Pahang,PHG 205 | 28350,Triang,Pahang,PHG 206 | -------------------------------------------------------------------------------- /data/json/states/kedah.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Kedah", 3 | "code": "KDH", 4 | "cities": [ 5 | { 6 | "name": "Alor Setar", 7 | "postcodes": [ 8 | "05000", 9 | "05050", 10 | "05100", 11 | "05150", 12 | "05200", 13 | "05250", 14 | "05300", 15 | "05350", 16 | "05400", 17 | "05450", 18 | "05460", 19 | "05500", 20 | "05502", 21 | "05503", 22 | "05504", 23 | "05505", 24 | "05506", 25 | "05508", 26 | "05512", 27 | "05514", 28 | "05516", 29 | "05517", 30 | "05518", 31 | "05520", 32 | "05532", 33 | "05534", 34 | "05536", 35 | "05538", 36 | "05550", 37 | "05551", 38 | "05552", 39 | "05556", 40 | "05558", 41 | "05560", 42 | "05564", 43 | "05576", 44 | "05578", 45 | "05580", 46 | "05582", 47 | "05586", 48 | "05590", 49 | "05592", 50 | "05594", 51 | "05600", 52 | "05604", 53 | "05610", 54 | "05612", 55 | "05614", 56 | "05620", 57 | "05621", 58 | "05622", 59 | "05626", 60 | "05628", 61 | "05630", 62 | "05632", 63 | "05644", 64 | "05660", 65 | "05661", 66 | "05664", 67 | "05670", 68 | "05672", 69 | "05673", 70 | "05674", 71 | "05675", 72 | "05676", 73 | "05680", 74 | "05690", 75 | "05696", 76 | "05700", 77 | "05710", 78 | "05720", 79 | "05990", 80 | "06250", 81 | "06509", 82 | "06550", 83 | "06570", 84 | "06660" 85 | ] 86 | }, 87 | { 88 | "name": "Ayer Hitam", 89 | "postcodes": [ 90 | "06150" 91 | ] 92 | }, 93 | { 94 | "name": "Baling", 95 | "postcodes": [ 96 | "09100" 97 | ] 98 | }, 99 | { 100 | "name": "Bandar Baharu", 101 | "postcodes": [ 102 | "34950" 103 | ] 104 | }, 105 | { 106 | "name": "Bandar Bahru", 107 | "postcodes": [ 108 | "14290", 109 | "14390" 110 | ] 111 | }, 112 | { 113 | "name": "Bedong", 114 | "postcodes": [ 115 | "08100", 116 | "08110" 117 | ] 118 | }, 119 | { 120 | "name": "Bukit Kayu Hitam", 121 | "postcodes": [ 122 | "06050" 123 | ] 124 | }, 125 | { 126 | "name": "Changloon", 127 | "postcodes": [ 128 | "06010" 129 | ] 130 | }, 131 | { 132 | "name": "Gurun", 133 | "postcodes": [ 134 | "08300", 135 | "08330", 136 | "08800" 137 | ] 138 | }, 139 | { 140 | "name": "Jeniang", 141 | "postcodes": [ 142 | "08320", 143 | "08700" 144 | ] 145 | }, 146 | { 147 | "name": "Jitra", 148 | "postcodes": [ 149 | "06000", 150 | "06007", 151 | "06009" 152 | ] 153 | }, 154 | { 155 | "name": "Karangan", 156 | "postcodes": [ 157 | "09700" 158 | ] 159 | }, 160 | { 161 | "name": "Kepala Batas", 162 | "postcodes": [ 163 | "06200", 164 | "06207", 165 | "06209" 166 | ] 167 | }, 168 | { 169 | "name": "Kodiang", 170 | "postcodes": [ 171 | "06100" 172 | ] 173 | }, 174 | { 175 | "name": "Kota Kuala Muda", 176 | "postcodes": [ 177 | "08500", 178 | "08507", 179 | "08509" 180 | ] 181 | }, 182 | { 183 | "name": "Kota Sarang Semut", 184 | "postcodes": [ 185 | "06800" 186 | ] 187 | }, 188 | { 189 | "name": "Kuala Kedah", 190 | "postcodes": [ 191 | "06600" 192 | ] 193 | }, 194 | { 195 | "name": "Kuala Ketil", 196 | "postcodes": [ 197 | "09300", 198 | "09310" 199 | ] 200 | }, 201 | { 202 | "name": "Kuala Nerang", 203 | "postcodes": [ 204 | "06300" 205 | ] 206 | }, 207 | { 208 | "name": "Kuala Pegang", 209 | "postcodes": [ 210 | "09110" 211 | ] 212 | }, 213 | { 214 | "name": "Kulim", 215 | "postcodes": [ 216 | "09000", 217 | "09007", 218 | "09009", 219 | "09010", 220 | "09020" 221 | ] 222 | }, 223 | { 224 | "name": "Kupang", 225 | "postcodes": [ 226 | "09200" 227 | ] 228 | }, 229 | { 230 | "name": "Langgar", 231 | "postcodes": [ 232 | "06500", 233 | "06507" 234 | ] 235 | }, 236 | { 237 | "name": "Langkawi", 238 | "postcodes": [ 239 | "07000", 240 | "07007", 241 | "07009", 242 | "07100" 243 | ] 244 | }, 245 | { 246 | "name": "Lunas", 247 | "postcodes": [ 248 | "09600" 249 | ] 250 | }, 251 | { 252 | "name": "Merbok", 253 | "postcodes": [ 254 | "08400", 255 | "08407", 256 | "08409" 257 | ] 258 | }, 259 | { 260 | "name": "Padang Serai", 261 | "postcodes": [ 262 | "09400", 263 | "09410" 264 | ] 265 | }, 266 | { 267 | "name": "Pendang", 268 | "postcodes": [ 269 | "06700", 270 | "06707", 271 | "06709", 272 | "06710", 273 | "06720", 274 | "06750", 275 | "06760" 276 | ] 277 | }, 278 | { 279 | "name": "Pokok Sena", 280 | "postcodes": [ 281 | "06350", 282 | "06400" 283 | ] 284 | }, 285 | { 286 | "name": "Serdang", 287 | "postcodes": [ 288 | "09800", 289 | "09810" 290 | ] 291 | }, 292 | { 293 | "name": "Sik", 294 | "postcodes": [ 295 | "08200", 296 | "08210", 297 | "08340" 298 | ] 299 | }, 300 | { 301 | "name": "Simpang Empat", 302 | "postcodes": [ 303 | "06650", 304 | "06680" 305 | ] 306 | }, 307 | { 308 | "name": "Sungai Petani", 309 | "postcodes": [ 310 | "08000", 311 | "08007", 312 | "08009", 313 | "08010", 314 | "08600" 315 | ] 316 | }, 317 | { 318 | "name": "Yan", 319 | "postcodes": [ 320 | "06900", 321 | "06910" 322 | ] 323 | } 324 | ] 325 | } -------------------------------------------------------------------------------- /examples/php_example.php: -------------------------------------------------------------------------------- 1 | = 5) break; 93 | echo " {$p['postcode']} - {$p['city']}, {$p['state']}\n"; 94 | } 95 | 96 | echo "\n"; 97 | } 98 | 99 | // Example 4: Validate a postcode 100 | function validatePostcode($postcode) { 101 | $json = file_get_contents('../data/json/postcodes.json'); 102 | $data = json_decode($json, true); 103 | 104 | foreach ($data['states'] as $state) { 105 | foreach ($state['cities'] as $city) { 106 | if (in_array($postcode, $city['postcodes'])) { 107 | return [ 108 | 'valid' => true, 109 | 'city' => $city['name'], 110 | 'state' => $state['name'], 111 | 'state_code' => $state['code'] 112 | ]; 113 | } 114 | } 115 | } 116 | 117 | return ['valid' => false]; 118 | } 119 | 120 | function exampleValidate() { 121 | echo str_repeat('=', 60) . "\n"; 122 | echo "Example 4: Validate postcodes\n"; 123 | echo str_repeat('=', 60) . "\n"; 124 | 125 | $testPostcodes = ['50000', '10000', '99999', '40100']; 126 | 127 | foreach ($testPostcodes as $pc) { 128 | $result = validatePostcode($pc); 129 | if ($result['valid']) { 130 | echo "\n✓ $pc is valid\n"; 131 | echo " City: {$result['city']}\n"; 132 | echo " State: {$result['state']} ({$result['state_code']})\n"; 133 | } else { 134 | echo "\n✗ $pc is not valid\n"; 135 | } 136 | } 137 | 138 | echo "\n"; 139 | } 140 | 141 | // Example 5: Get postcodes by state 142 | function getPostcodesByState($stateCode) { 143 | $postcodes = []; 144 | if (($handle = fopen('../data/csv/postcodes.csv', 'r')) !== false) { 145 | $header = fgetcsv($handle); 146 | while (($row = fgetcsv($handle)) !== false) { 147 | $data = array_combine($header, $row); 148 | if ($data['state_code'] === $stateCode) { 149 | $postcodes[] = $data; 150 | } 151 | } 152 | fclose($handle); 153 | } 154 | return $postcodes; 155 | } 156 | 157 | function exampleByState() { 158 | echo str_repeat('=', 60) . "\n"; 159 | echo "Example 5: Get postcodes by state\n"; 160 | echo str_repeat('=', 60) . "\n"; 161 | 162 | $stateCode = 'MLK'; // Melaka 163 | $postcodes = getPostcodesByState($stateCode); 164 | 165 | echo "\nPostcodes in $stateCode:\n"; 166 | echo "Total: " . count($postcodes) . "\n"; 167 | 168 | // Group by city 169 | $cities = []; 170 | foreach ($postcodes as $p) { 171 | $city = $p['city']; 172 | if (!isset($cities[$city])) { 173 | $cities[$city] = []; 174 | } 175 | $cities[$city][] = $p['postcode']; 176 | } 177 | 178 | ksort($cities); 179 | 180 | echo "\nCities: " . count($cities) . "\n"; 181 | foreach ($cities as $city => $pcs) { 182 | printf(" %-30s %3d postcodes\n", $city, count($pcs)); 183 | } 184 | 185 | echo "\n"; 186 | } 187 | 188 | // Run all examples 189 | if (php_sapi_name() === 'cli') { 190 | exampleJsonSearch(); 191 | exampleStateData(); 192 | exampleCsvRead(); 193 | exampleValidate(); 194 | exampleByState(); 195 | 196 | echo str_repeat('=', 60) . "\n"; 197 | echo "All examples completed!\n"; 198 | echo str_repeat('=', 60) . "\n"; 199 | } 200 | -------------------------------------------------------------------------------- /data/json/states/wp_kuala_lumpur.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Wp Kuala Lumpur", 3 | "code": "KUL", 4 | "cities": [ 5 | { 6 | "name": "Kuala Lumpur", 7 | "postcodes": [ 8 | "50000", 9 | "50050", 10 | "50088", 11 | "50100", 12 | "50150", 13 | "50200", 14 | "50250", 15 | "50300", 16 | "50350", 17 | "50400", 18 | "50420", 19 | "50450", 20 | "50460", 21 | "50470", 22 | "50480", 23 | "50489", 24 | "50490", 25 | "50500", 26 | "50502", 27 | "50504", 28 | "50505", 29 | "50506", 30 | "50507", 31 | "50508", 32 | "50512", 33 | "50514", 34 | "50515", 35 | "50519", 36 | "50528", 37 | "50529", 38 | "50530", 39 | "50532", 40 | "50534", 41 | "50536", 42 | "50538", 43 | "50540", 44 | "50544", 45 | "50546", 46 | "50548", 47 | "50550", 48 | "50551", 49 | "50552", 50 | "50554", 51 | "50556", 52 | "50560", 53 | "50562", 54 | "50564", 55 | "50566", 56 | "50568", 57 | "50572", 58 | "50576", 59 | "50578", 60 | "50580", 61 | "50582", 62 | "50586", 63 | "50588", 64 | "50590", 65 | "50592", 66 | "50594", 67 | "50596", 68 | "50598", 69 | "50599", 70 | "50600", 71 | "50603", 72 | "50604", 73 | "50605", 74 | "50608", 75 | "50609", 76 | "50610", 77 | "50612", 78 | "50614", 79 | "50620", 80 | "50621", 81 | "50622", 82 | "50623", 83 | "50626", 84 | "50630", 85 | "50632", 86 | "50634", 87 | "50636", 88 | "50638", 89 | "50640", 90 | "50642", 91 | "50644", 92 | "50646", 93 | "50648", 94 | "50650", 95 | "50652", 96 | "50653", 97 | "50656", 98 | "50658", 99 | "50660", 100 | "50661", 101 | "50662", 102 | "50664", 103 | "50666", 104 | "50668", 105 | "50670", 106 | "50672", 107 | "50673", 108 | "50674", 109 | "50676", 110 | "50677", 111 | "50678", 112 | "50680", 113 | "50682", 114 | "50684", 115 | "50688", 116 | "50694", 117 | "50700", 118 | "50702", 119 | "50704", 120 | "50706", 121 | "50708", 122 | "50710", 123 | "50712", 124 | "50714", 125 | "50716", 126 | "50718", 127 | "50720", 128 | "50722", 129 | "50724", 130 | "50726", 131 | "50728", 132 | "50730", 133 | "50732", 134 | "50734", 135 | "50736", 136 | "50738", 137 | "50740", 138 | "50742", 139 | "50744", 140 | "50746", 141 | "50748", 142 | "50750", 143 | "50752", 144 | "50754", 145 | "50758", 146 | "50760", 147 | "50762", 148 | "50764", 149 | "50766", 150 | "50768", 151 | "50770", 152 | "50772", 153 | "50774", 154 | "50776", 155 | "50778", 156 | "50780", 157 | "50782", 158 | "50784", 159 | "50786", 160 | "50788", 161 | "50790", 162 | "50792", 163 | "50794", 164 | "50796", 165 | "50798", 166 | "50800", 167 | "50802", 168 | "50804", 169 | "50806", 170 | "50808", 171 | "50810", 172 | "50812", 173 | "50814", 174 | "50816", 175 | "50818", 176 | "50901", 177 | "50902", 178 | "50903", 179 | "50904", 180 | "50906", 181 | "50907", 182 | "50908", 183 | "50909", 184 | "50910", 185 | "50911", 186 | "50912", 187 | "50913", 188 | "50914", 189 | "50915", 190 | "50916", 191 | "50917", 192 | "50918", 193 | "50919", 194 | "50920", 195 | "50921", 196 | "50922", 197 | "50923", 198 | "50924", 199 | "50925", 200 | "50926", 201 | "50927", 202 | "50928", 203 | "50929", 204 | "50930", 205 | "50931", 206 | "50932", 207 | "50933", 208 | "50934", 209 | "50935", 210 | "50936", 211 | "50937", 212 | "50938", 213 | "50939", 214 | "50940", 215 | "50941", 216 | "50942", 217 | "50943", 218 | "50944", 219 | "50945", 220 | "50946", 221 | "50947", 222 | "50948", 223 | "50949", 224 | "50950", 225 | "50988", 226 | "50989", 227 | "50990", 228 | "51000", 229 | "51100", 230 | "51200", 231 | "51300", 232 | "51640", 233 | "51700", 234 | "51800", 235 | "51900", 236 | "51990", 237 | "52000", 238 | "52100", 239 | "52109", 240 | "52200", 241 | "52210", 242 | "52220", 243 | "53000", 244 | "53100", 245 | "53200", 246 | "53500", 247 | "53700", 248 | "53800", 249 | "53990", 250 | "54000", 251 | "54050", 252 | "54100", 253 | "54200", 254 | "54540", 255 | "55000", 256 | "55100", 257 | "55188", 258 | "55200", 259 | "55220", 260 | "55300", 261 | "55330", 262 | "55700", 263 | "55710", 264 | "55720", 265 | "55900", 266 | "55902", 267 | "55904", 268 | "55906", 269 | "55908", 270 | "55910", 271 | "55912", 272 | "55914", 273 | "55916", 274 | "55918", 275 | "55920", 276 | "55922", 277 | "55924", 278 | "55926", 279 | "55928", 280 | "55930", 281 | "55932", 282 | "55934", 283 | "55990", 284 | "56000", 285 | "56100", 286 | "57000", 287 | "57100", 288 | "57200", 289 | "57700", 290 | "57990", 291 | "58000", 292 | "58100", 293 | "58200", 294 | "58209", 295 | "58700", 296 | "58990", 297 | "59000", 298 | "59001", 299 | "59100", 300 | "59200", 301 | "59206", 302 | "59700", 303 | "59800", 304 | "59990", 305 | "60000" 306 | ] 307 | }, 308 | { 309 | "name": "Setapak", 310 | "postcodes": [ 311 | "53300" 312 | ] 313 | } 314 | ] 315 | } -------------------------------------------------------------------------------- /data/csv/states/Terengganu.csv: -------------------------------------------------------------------------------- 1 | postcode,city,state,state_code 2 | 21800,Ajil,Terengganu,TRG 3 | 21810,Ajil,Terengganu,TRG 4 | 21820,Ajil,Terengganu,TRG 5 | 23400,Al Muktatfi Billah Shah,Terengganu,TRG 6 | 24050,Ayer Puteh,Terengganu,TRG 7 | 23200,Bukit Besi,Terengganu,TRG 8 | 21400,Bukit Payong,Terengganu,TRG 9 | 24060,Ceneh,Terengganu,TRG 10 | 21450,Chalok,Terengganu,TRG 11 | 24000,Cukai,Terengganu,TRG 12 | 24007,Cukai,Terengganu,TRG 13 | 24009,Cukai,Terengganu,TRG 14 | 24010,Cukai,Terengganu,TRG 15 | 24020,Cukai,Terengganu,TRG 16 | 24030,Cukai,Terengganu,TRG 17 | 24040,Cukai,Terengganu,TRG 18 | 23000,Dungun,Terengganu,TRG 19 | 23007,Dungun,Terengganu,TRG 20 | 23009,Dungun,Terengganu,TRG 21 | 23050,Dungun,Terengganu,TRG 22 | 22000,Jerteh,Terengganu,TRG 23 | 22010,Jerteh,Terengganu,TRG 24 | 22020,Jerteh,Terengganu,TRG 25 | 22030,Jerteh,Terengganu,TRG 26 | 22040,Jerteh,Terengganu,TRG 27 | 22200,Kampung Raja,Terengganu,TRG 28 | 24200,Kemasek,Terengganu,TRG 29 | 24207,Kemasek,Terengganu,TRG 30 | 24209,Kemasek,Terengganu,TRG 31 | 24210,Kemasek,Terengganu,TRG 32 | 24220,Kemasek,Terengganu,TRG 33 | 24300,Kerteh,Terengganu,TRG 34 | 23300,Ketengah Jaya,Terengganu,TRG 35 | 23345,Ketengah Jaya,Terengganu,TRG 36 | 24100,Kijal,Terengganu,TRG 37 | 24107,Kijal,Terengganu,TRG 38 | 24109,Kijal,Terengganu,TRG 39 | 21700,Kuala Berang,Terengganu,TRG 40 | 22300,Kuala Besut,Terengganu,TRG 41 | 22307,Kuala Besut,Terengganu,TRG 42 | 22309,Kuala Besut,Terengganu,TRG 43 | 20000,Kuala Terengganu,Terengganu,TRG 44 | 20050,Kuala Terengganu,Terengganu,TRG 45 | 20080,Kuala Terengganu,Terengganu,TRG 46 | 20100,Kuala Terengganu,Terengganu,TRG 47 | 20200,Kuala Terengganu,Terengganu,TRG 48 | 20300,Kuala Terengganu,Terengganu,TRG 49 | 20400,Kuala Terengganu,Terengganu,TRG 50 | 20500,Kuala Terengganu,Terengganu,TRG 51 | 20502,Kuala Terengganu,Terengganu,TRG 52 | 20503,Kuala Terengganu,Terengganu,TRG 53 | 20504,Kuala Terengganu,Terengganu,TRG 54 | 20505,Kuala Terengganu,Terengganu,TRG 55 | 20506,Kuala Terengganu,Terengganu,TRG 56 | 20508,Kuala Terengganu,Terengganu,TRG 57 | 20512,Kuala Terengganu,Terengganu,TRG 58 | 20514,Kuala Terengganu,Terengganu,TRG 59 | 20516,Kuala Terengganu,Terengganu,TRG 60 | 20517,Kuala Terengganu,Terengganu,TRG 61 | 20518,Kuala Terengganu,Terengganu,TRG 62 | 20519,Kuala Terengganu,Terengganu,TRG 63 | 20520,Kuala Terengganu,Terengganu,TRG 64 | 20532,Kuala Terengganu,Terengganu,TRG 65 | 20534,Kuala Terengganu,Terengganu,TRG 66 | 20536,Kuala Terengganu,Terengganu,TRG 67 | 20538,Kuala Terengganu,Terengganu,TRG 68 | 20540,Kuala Terengganu,Terengganu,TRG 69 | 20542,Kuala Terengganu,Terengganu,TRG 70 | 20546,Kuala Terengganu,Terengganu,TRG 71 | 20548,Kuala Terengganu,Terengganu,TRG 72 | 20550,Kuala Terengganu,Terengganu,TRG 73 | 20551,Kuala Terengganu,Terengganu,TRG 74 | 20552,Kuala Terengganu,Terengganu,TRG 75 | 20554,Kuala Terengganu,Terengganu,TRG 76 | 20556,Kuala Terengganu,Terengganu,TRG 77 | 20560,Kuala Terengganu,Terengganu,TRG 78 | 20564,Kuala Terengganu,Terengganu,TRG 79 | 20566,Kuala Terengganu,Terengganu,TRG 80 | 20568,Kuala Terengganu,Terengganu,TRG 81 | 20570,Kuala Terengganu,Terengganu,TRG 82 | 20572,Kuala Terengganu,Terengganu,TRG 83 | 20576,Kuala Terengganu,Terengganu,TRG 84 | 20578,Kuala Terengganu,Terengganu,TRG 85 | 20582,Kuala Terengganu,Terengganu,TRG 86 | 20586,Kuala Terengganu,Terengganu,TRG 87 | 20590,Kuala Terengganu,Terengganu,TRG 88 | 20592,Kuala Terengganu,Terengganu,TRG 89 | 20596,Kuala Terengganu,Terengganu,TRG 90 | 20600,Kuala Terengganu,Terengganu,TRG 91 | 20604,Kuala Terengganu,Terengganu,TRG 92 | 20606,Kuala Terengganu,Terengganu,TRG 93 | 20608,Kuala Terengganu,Terengganu,TRG 94 | 20609,Kuala Terengganu,Terengganu,TRG 95 | 20610,Kuala Terengganu,Terengganu,TRG 96 | 20612,Kuala Terengganu,Terengganu,TRG 97 | 20614,Kuala Terengganu,Terengganu,TRG 98 | 20618,Kuala Terengganu,Terengganu,TRG 99 | 20620,Kuala Terengganu,Terengganu,TRG 100 | 20622,Kuala Terengganu,Terengganu,TRG 101 | 20626,Kuala Terengganu,Terengganu,TRG 102 | 20628,Kuala Terengganu,Terengganu,TRG 103 | 20630,Kuala Terengganu,Terengganu,TRG 104 | 20632,Kuala Terengganu,Terengganu,TRG 105 | 20646,Kuala Terengganu,Terengganu,TRG 106 | 20648,Kuala Terengganu,Terengganu,TRG 107 | 20656,Kuala Terengganu,Terengganu,TRG 108 | 20658,Kuala Terengganu,Terengganu,TRG 109 | 20660,Kuala Terengganu,Terengganu,TRG 110 | 20661,Kuala Terengganu,Terengganu,TRG 111 | 20662,Kuala Terengganu,Terengganu,TRG 112 | 20664,Kuala Terengganu,Terengganu,TRG 113 | 20668,Kuala Terengganu,Terengganu,TRG 114 | 20670,Kuala Terengganu,Terengganu,TRG 115 | 20672,Kuala Terengganu,Terengganu,TRG 116 | 20673,Kuala Terengganu,Terengganu,TRG 117 | 20674,Kuala Terengganu,Terengganu,TRG 118 | 20676,Kuala Terengganu,Terengganu,TRG 119 | 20680,Kuala Terengganu,Terengganu,TRG 120 | 20690,Kuala Terengganu,Terengganu,TRG 121 | 20698,Kuala Terengganu,Terengganu,TRG 122 | 20700,Kuala Terengganu,Terengganu,TRG 123 | 20710,Kuala Terengganu,Terengganu,TRG 124 | 20720,Kuala Terengganu,Terengganu,TRG 125 | 20900,Kuala Terengganu,Terengganu,TRG 126 | 20902,Kuala Terengganu,Terengganu,TRG 127 | 20904,Kuala Terengganu,Terengganu,TRG 128 | 20906,Kuala Terengganu,Terengganu,TRG 129 | 20908,Kuala Terengganu,Terengganu,TRG 130 | 20910,Kuala Terengganu,Terengganu,TRG 131 | 20912,Kuala Terengganu,Terengganu,TRG 132 | 20914,Kuala Terengganu,Terengganu,TRG 133 | 20916,Kuala Terengganu,Terengganu,TRG 134 | 20918,Kuala Terengganu,Terengganu,TRG 135 | 20920,Kuala Terengganu,Terengganu,TRG 136 | 20922,Kuala Terengganu,Terengganu,TRG 137 | 20924,Kuala Terengganu,Terengganu,TRG 138 | 20926,Kuala Terengganu,Terengganu,TRG 139 | 20928,Kuala Terengganu,Terengganu,TRG 140 | 20930,Kuala Terengganu,Terengganu,TRG 141 | 20990,Kuala Terengganu,Terengganu,TRG 142 | 20999,Kuala Terengganu,Terengganu,TRG 143 | 21000,Kuala Terengganu,Terengganu,TRG 144 | 21009,Kuala Terengganu,Terengganu,TRG 145 | 21010,Kuala Terengganu,Terengganu,TRG 146 | 21020,Kuala Terengganu,Terengganu,TRG 147 | 21030,Kuala Terengganu,Terengganu,TRG 148 | 21040,Kuala Terengganu,Terengganu,TRG 149 | 21050,Kuala Terengganu,Terengganu,TRG 150 | 21060,Kuala Terengganu,Terengganu,TRG 151 | 21070,Kuala Terengganu,Terengganu,TRG 152 | 21080,Kuala Terengganu,Terengganu,TRG 153 | 21090,Kuala Terengganu,Terengganu,TRG 154 | 21100,Kuala Terengganu,Terengganu,TRG 155 | 21109,Kuala Terengganu,Terengganu,TRG 156 | 21200,Kuala Terengganu,Terengganu,TRG 157 | 21209,Kuala Terengganu,Terengganu,TRG 158 | 21210,Kuala Terengganu,Terengganu,TRG 159 | 21220,Kuala Terengganu,Terengganu,TRG 160 | 21300,Kuala Terengganu,Terengganu,TRG 161 | 21309,Kuala Terengganu,Terengganu,TRG 162 | 21600,Marang,Terengganu,TRG 163 | 21610,Marang,Terengganu,TRG 164 | 23100,Paka,Terengganu,TRG 165 | 22100,Permaisuri,Terengganu,TRG 166 | 22107,Permaisuri,Terengganu,TRG 167 | 22109,Permaisuri,Terengganu,TRG 168 | 22110,Permaisuri,Terengganu,TRG 169 | 22120,Permaisuri,Terengganu,TRG 170 | 21500,Sungai Tong,Terengganu,TRG 171 | -------------------------------------------------------------------------------- /examples/javascript_example.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Malaysia Postcode Usage Examples - JavaScript/Node.js 3 | * 4 | * This file demonstrates various ways to use the Malaysia postcode data in JavaScript. 5 | * 6 | * To run these examples: 7 | * node javascript_example.js 8 | */ 9 | 10 | const fs = require('fs'); 11 | const path = require('path'); 12 | 13 | // Example 1: Load and search JSON data 14 | function exampleJsonSearch() { 15 | console.log('='.repeat(60)); 16 | console.log('Example 1: Search postcodes in JSON format'); 17 | console.log('='.repeat(60)); 18 | 19 | // Load complete postcode data 20 | const data = JSON.parse( 21 | fs.readFileSync('../data/json/postcodes.json', 'utf-8') 22 | ); 23 | 24 | // Search for a specific city 25 | const searchCity = 'Shah Alam'; 26 | 27 | data.states.forEach(state => { 28 | state.cities.forEach(city => { 29 | if (city.name.toLowerCase().includes(searchCity.toLowerCase())) { 30 | console.log(`\nState: ${state.name} (${state.code})`); 31 | console.log(`City: ${city.name}`); 32 | console.log(`Postcodes: ${city.postcodes.slice(0, 10).join(', ')}...`); 33 | console.log(`Total: ${city.postcodes.length} postcodes`); 34 | } 35 | }); 36 | }); 37 | 38 | console.log(); 39 | } 40 | 41 | // Example 2: Load state-specific data 42 | function exampleStateData() { 43 | console.log('='.repeat(60)); 44 | console.log('Example 2: Load state-specific data'); 45 | console.log('='.repeat(60)); 46 | 47 | // Load Selangor data 48 | const selangor = JSON.parse( 49 | fs.readFileSync('../data/json/states/selangor.json', 'utf-8') 50 | ); 51 | 52 | console.log(`\nState: ${selangor.name} (${selangor.code})`); 53 | console.log(`Total cities: ${selangor.cities.length}`); 54 | console.log('\nFirst 5 cities:'); 55 | 56 | selangor.cities.slice(0, 5).forEach(city => { 57 | const postcodeRange = `${city.postcodes[0]} - ${city.postcodes[city.postcodes.length - 1]}`; 58 | console.log(` - ${city.name.padEnd(30)} (${String(city.postcodes.length).padStart(3)} postcodes) [${postcodeRange}]`); 59 | }); 60 | 61 | console.log(); 62 | } 63 | 64 | // Example 3: Validate a postcode 65 | function validatePostcode(postcode, data) { 66 | for (const state of data.states) { 67 | for (const city of state.cities) { 68 | if (city.postcodes.includes(postcode)) { 69 | return { 70 | valid: true, 71 | city: city.name, 72 | state: state.name, 73 | stateCode: state.code 74 | }; 75 | } 76 | } 77 | } 78 | 79 | return { valid: false }; 80 | } 81 | 82 | function exampleValidate() { 83 | console.log('='.repeat(60)); 84 | console.log('Example 3: Validate postcodes'); 85 | console.log('='.repeat(60)); 86 | 87 | const data = JSON.parse( 88 | fs.readFileSync('../data/json/postcodes.json', 'utf-8') 89 | ); 90 | 91 | const testPostcodes = ['50000', '10000', '99999', '40100']; 92 | 93 | testPostcodes.forEach(pc => { 94 | const result = validatePostcode(pc, data); 95 | if (result.valid) { 96 | console.log(`\n✓ ${pc} is valid`); 97 | console.log(` City: ${result.city}`); 98 | console.log(` State: ${result.state} (${result.stateCode})`); 99 | } else { 100 | console.log(`\n✗ ${pc} is not valid`); 101 | } 102 | }); 103 | 104 | console.log(); 105 | } 106 | 107 | // Example 4: Get all cities in a state 108 | function getCitiesByState(stateCode, data) { 109 | const state = data.states.find(s => s.code === stateCode); 110 | return state ? state.cities : []; 111 | } 112 | 113 | function exampleByState() { 114 | console.log('='.repeat(60)); 115 | console.log('Example 4: Get cities by state'); 116 | console.log('='.repeat(60)); 117 | 118 | const data = JSON.parse( 119 | fs.readFileSync('../data/json/postcodes.json', 'utf-8') 120 | ); 121 | 122 | const stateCode = 'PNG'; // Pulau Pinang 123 | const cities = getCitiesByState(stateCode, data); 124 | 125 | if (cities.length > 0) { 126 | const state = data.states.find(s => s.code === stateCode); 127 | console.log(`\nState: ${state.name} (${stateCode})`); 128 | console.log(`Total cities: ${cities.length}`); 129 | console.log('\nCities:'); 130 | 131 | cities.forEach(city => { 132 | console.log(` ${city.name.padEnd(30)} ${String(city.postcodes.length).padStart(3)} postcodes`); 133 | }); 134 | } 135 | 136 | console.log(); 137 | } 138 | 139 | // Example 5: Build a lookup map for fast searches 140 | function buildPostcodeLookup(data) { 141 | const lookup = new Map(); 142 | 143 | data.states.forEach(state => { 144 | state.cities.forEach(city => { 145 | city.postcodes.forEach(postcode => { 146 | lookup.set(postcode, { 147 | city: city.name, 148 | state: state.name, 149 | stateCode: state.code 150 | }); 151 | }); 152 | }); 153 | }); 154 | 155 | return lookup; 156 | } 157 | 158 | function exampleLookupMap() { 159 | console.log('='.repeat(60)); 160 | console.log('Example 5: Fast postcode lookup using Map'); 161 | console.log('='.repeat(60)); 162 | 163 | const data = JSON.parse( 164 | fs.readFileSync('../data/json/postcodes.json', 'utf-8') 165 | ); 166 | 167 | console.log('\nBuilding lookup map...'); 168 | const lookup = buildPostcodeLookup(data); 169 | console.log(`✓ Lookup map built with ${lookup.size} postcodes`); 170 | 171 | // Fast lookups 172 | const testPostcodes = ['50000', '40100', '10000']; 173 | 174 | console.log('\nFast lookups:'); 175 | testPostcodes.forEach(pc => { 176 | const info = lookup.get(pc); 177 | if (info) { 178 | console.log(` ${pc} -> ${info.city}, ${info.state} (${info.stateCode})`); 179 | } else { 180 | console.log(` ${pc} -> Not found`); 181 | } 182 | }); 183 | 184 | console.log(); 185 | } 186 | 187 | // Run all examples 188 | if (require.main === module) { 189 | exampleJsonSearch(); 190 | exampleStateData(); 191 | exampleValidate(); 192 | exampleByState(); 193 | exampleLookupMap(); 194 | 195 | console.log('='.repeat(60)); 196 | console.log('All examples completed!'); 197 | console.log('='.repeat(60)); 198 | } 199 | 200 | // Export functions for use as a module 201 | module.exports = { 202 | validatePostcode, 203 | getCitiesByState, 204 | buildPostcodeLookup 205 | }; 206 | -------------------------------------------------------------------------------- /data/csv/states/Perak.csv: -------------------------------------------------------------------------------- 1 | postcode,city,state,state_code 2 | 32400,Ayer Tawar,Perak,PRK 3 | 36100,Bagan Datoh,Perak,PRK 4 | 34300,Bagan Serai,Perak,PRK 5 | 34310,Bagan Serai,Perak,PRK 6 | 32610,Bandar Seri Iskandar,Perak,PRK 7 | 31000,Batu Gajah,Perak,PRK 8 | 31007,Batu Gajah,Perak,PRK 9 | 31009,Batu Gajah,Perak,PRK 10 | 34500,Batu Kurau,Perak,PRK 11 | 34510,Batu Kurau,Perak,PRK 12 | 34520,Batu Kurau,Perak,PRK 13 | 35950,Behrang Stesen,Perak,PRK 14 | 35500,Bidor,Perak,PRK 15 | 32600,Bota,Perak,PRK 16 | 32700,Bruas,Perak,PRK 17 | 34850,Changkat Jering,Perak,PRK 18 | 32500,Changkat Keruing,Perak,PRK 19 | 31200,Chemor,Perak,PRK 20 | 35300,Chenderiang,Perak,PRK 21 | 36600,Chenderong Balai,Perak,PRK 22 | 36750,Chikus,Perak,PRK 23 | 33600,Enggor,Perak,PRK 24 | 33300,Gerik,Perak,PRK 25 | 33310,Gerik,Perak,PRK 26 | 33320,Gerik,Perak,PRK 27 | 31600,Gopeng,Perak,PRK 28 | 31610,Gopeng,Perak,PRK 29 | 36400,Hutan Melintang,Perak,PRK 30 | 33200,Intan,Perak,PRK 31 | 30000,Ipoh,Perak,PRK 32 | 30010,Ipoh,Perak,PRK 33 | 30020,Ipoh,Perak,PRK 34 | 30100,Ipoh,Perak,PRK 35 | 30200,Ipoh,Perak,PRK 36 | 30205,Ipoh,Perak,PRK 37 | 30250,Ipoh,Perak,PRK 38 | 30300,Ipoh,Perak,PRK 39 | 30350,Ipoh,Perak,PRK 40 | 30400,Ipoh,Perak,PRK 41 | 30450,Ipoh,Perak,PRK 42 | 30500,Ipoh,Perak,PRK 43 | 30502,Ipoh,Perak,PRK 44 | 30503,Ipoh,Perak,PRK 45 | 30504,Ipoh,Perak,PRK 46 | 30505,Ipoh,Perak,PRK 47 | 30506,Ipoh,Perak,PRK 48 | 30508,Ipoh,Perak,PRK 49 | 30510,Ipoh,Perak,PRK 50 | 30512,Ipoh,Perak,PRK 51 | 30516,Ipoh,Perak,PRK 52 | 30517,Ipoh,Perak,PRK 53 | 30518,Ipoh,Perak,PRK 54 | 30519,Ipoh,Perak,PRK 55 | 30520,Ipoh,Perak,PRK 56 | 30524,Ipoh,Perak,PRK 57 | 30532,Ipoh,Perak,PRK 58 | 30534,Ipoh,Perak,PRK 59 | 30536,Ipoh,Perak,PRK 60 | 30540,Ipoh,Perak,PRK 61 | 30542,Ipoh,Perak,PRK 62 | 30546,Ipoh,Perak,PRK 63 | 30548,Ipoh,Perak,PRK 64 | 30550,Ipoh,Perak,PRK 65 | 30551,Ipoh,Perak,PRK 66 | 30552,Ipoh,Perak,PRK 67 | 30554,Ipoh,Perak,PRK 68 | 30556,Ipoh,Perak,PRK 69 | 30560,Ipoh,Perak,PRK 70 | 30564,Ipoh,Perak,PRK 71 | 30570,Ipoh,Perak,PRK 72 | 30576,Ipoh,Perak,PRK 73 | 30580,Ipoh,Perak,PRK 74 | 30582,Ipoh,Perak,PRK 75 | 30586,Ipoh,Perak,PRK 76 | 30590,Ipoh,Perak,PRK 77 | 30592,Ipoh,Perak,PRK 78 | 30594,Ipoh,Perak,PRK 79 | 30596,Ipoh,Perak,PRK 80 | 30600,Ipoh,Perak,PRK 81 | 30604,Ipoh,Perak,PRK 82 | 30606,Ipoh,Perak,PRK 83 | 30609,Ipoh,Perak,PRK 84 | 30610,Ipoh,Perak,PRK 85 | 30612,Ipoh,Perak,PRK 86 | 30614,Ipoh,Perak,PRK 87 | 30620,Ipoh,Perak,PRK 88 | 30621,Ipoh,Perak,PRK 89 | 30622,Ipoh,Perak,PRK 90 | 30626,Ipoh,Perak,PRK 91 | 30628,Ipoh,Perak,PRK 92 | 30630,Ipoh,Perak,PRK 93 | 30632,Ipoh,Perak,PRK 94 | 30634,Ipoh,Perak,PRK 95 | 30644,Ipoh,Perak,PRK 96 | 30646,Ipoh,Perak,PRK 97 | 30648,Ipoh,Perak,PRK 98 | 30656,Ipoh,Perak,PRK 99 | 30658,Ipoh,Perak,PRK 100 | 30660,Ipoh,Perak,PRK 101 | 30661,Ipoh,Perak,PRK 102 | 30662,Ipoh,Perak,PRK 103 | 30664,Ipoh,Perak,PRK 104 | 30668,Ipoh,Perak,PRK 105 | 30670,Ipoh,Perak,PRK 106 | 30673,Ipoh,Perak,PRK 107 | 30674,Ipoh,Perak,PRK 108 | 30676,Ipoh,Perak,PRK 109 | 30682,Ipoh,Perak,PRK 110 | 30690,Ipoh,Perak,PRK 111 | 30700,Ipoh,Perak,PRK 112 | 30710,Ipoh,Perak,PRK 113 | 30720,Ipoh,Perak,PRK 114 | 30730,Ipoh,Perak,PRK 115 | 30740,Ipoh,Perak,PRK 116 | 30750,Ipoh,Perak,PRK 117 | 30760,Ipoh,Perak,PRK 118 | 30770,Ipoh,Perak,PRK 119 | 30780,Ipoh,Perak,PRK 120 | 30790,Ipoh,Perak,PRK 121 | 30800,Ipoh,Perak,PRK 122 | 30810,Ipoh,Perak,PRK 123 | 30820,Ipoh,Perak,PRK 124 | 30830,Ipoh,Perak,PRK 125 | 30840,Ipoh,Perak,PRK 126 | 30900,Ipoh,Perak,PRK 127 | 30902,Ipoh,Perak,PRK 128 | 30904,Ipoh,Perak,PRK 129 | 30906,Ipoh,Perak,PRK 130 | 30908,Ipoh,Perak,PRK 131 | 30910,Ipoh,Perak,PRK 132 | 30912,Ipoh,Perak,PRK 133 | 30988,Ipoh,Perak,PRK 134 | 30990,Ipoh,Perak,PRK 135 | 31350,Ipoh,Perak,PRK 136 | 31400,Ipoh,Perak,PRK 137 | 31407,Ipoh,Perak,PRK 138 | 31409,Ipoh,Perak,PRK 139 | 31450,Ipoh,Perak,PRK 140 | 31500,Ipoh,Perak,PRK 141 | 31650,Ipoh,Perak,PRK 142 | 31672,Ipoh,Perak,PRK 143 | 31850,Jeram,Perak,PRK 144 | 31900,Kampar,Perak,PRK 145 | 31907,Kampar,Perak,PRK 146 | 31909,Kampar,Perak,PRK 147 | 31910,Kampar,Perak,PRK 148 | 31920,Kampar,Perak,PRK 149 | 31950,Kampar,Perak,PRK 150 | 36800,Kampung Gajah,Perak,PRK 151 | 36810,Kampung Gajah,Perak,PRK 152 | 31300,Kampung Kepayang,Perak,PRK 153 | 34600,Kamunting,Perak,PRK 154 | 33000,Kuala Kangsar,Perak,PRK 155 | 33007,Kuala Kangsar,Perak,PRK 156 | 33009,Kuala Kangsar,Perak,PRK 157 | 33010,Kuala Kangsar,Perak,PRK 158 | 33020,Kuala Kangsar,Perak,PRK 159 | 33030,Kuala Kangsar,Perak,PRK 160 | 33040,Kuala Kangsar,Perak,PRK 161 | 34350,Kuala Kurau,Perak,PRK 162 | 34650,Kuala Sepetang,Perak,PRK 163 | 32900,Lambor Kanan,Perak,PRK 164 | 32999,Lambor Kanan,Perak,PRK 165 | 36700,Langkap,Perak,PRK 166 | 33400,Lenggong,Perak,PRK 167 | 33410,Lenggong,Perak,PRK 168 | 33420,Lenggong,Perak,PRK 169 | 32200,Lumut,Perak,PRK 170 | 31700,Malim Nawar,Perak,PRK 171 | 33800,Manong,Perak,PRK 172 | 34750,Matang,Perak,PRK 173 | 33700,Padang Rengas,Perak,PRK 174 | 32300,Pangkor,Perak,PRK 175 | 34900,Pantai Remis,Perak,PRK 176 | 34910,Pantai Remis,Perak,PRK 177 | 32800,Parit,Perak,PRK 178 | 32810,Parit,Perak,PRK 179 | 34200,Parit Buntar,Perak,PRK 180 | 33100,Pengkalan Hulu,Perak,PRK 181 | 31550,Pusing,Perak,PRK 182 | 31560,Pusing,Perak,PRK 183 | 34140,Rantau Panjang,Perak,PRK 184 | 33500,Sauk,Perak,PRK 185 | 34100,Selama,Perak,PRK 186 | 34120,Selama,Perak,PRK 187 | 34130,Selama,Perak,PRK 188 | 36200,Selekoh,Perak,PRK 189 | 36207,Selekoh,Perak,PRK 190 | 36209,Selekoh,Perak,PRK 191 | 32040,Seri Manjung,Perak,PRK 192 | 32050,Seri Manjung,Perak,PRK 193 | 34700,Simpang,Perak,PRK 194 | 34400,Simpang Ampat Semanggol,Perak,PRK 195 | 32000,Sitiawan,Perak,PRK 196 | 32010,Sitiawan,Perak,PRK 197 | 32020,Sitiawan,Perak,PRK 198 | 35800,Slim River,Perak,PRK 199 | 35820,Slim River,Perak,PRK 200 | 31050,Sungai Siput,Perak,PRK 201 | 31100,Sungai Siput,Perak,PRK 202 | 31120,Sungai Siput,Perak,PRK 203 | 36300,Sungai Sumun,Perak,PRK 204 | 36307,Sungai Sumun,Perak,PRK 205 | 36309,Sungai Sumun,Perak,PRK 206 | 35600,Sungkai,Perak,PRK 207 | 32100,TLDM Lumut,Perak,PRK 208 | 34000,Taiping,Perak,PRK 209 | 34007,Taiping,Perak,PRK 210 | 34008,Taiping,Perak,PRK 211 | 34009,Taiping,Perak,PRK 212 | 34010,Taiping,Perak,PRK 213 | 34020,Taiping,Perak,PRK 214 | 34030,Taiping,Perak,PRK 215 | 35900,Tanjong Malim,Perak,PRK 216 | 35907,Tanjong Malim,Perak,PRK 217 | 35909,Tanjong Malim,Perak,PRK 218 | 35910,Tanjong Malim,Perak,PRK 219 | 34250,Tanjong Piandang,Perak,PRK 220 | 31250,Tanjong Rambutan,Perak,PRK 221 | 31800,Tanjong Tualang,Perak,PRK 222 | 35000,Tapah,Perak,PRK 223 | 35007,Tapah,Perak,PRK 224 | 35009,Tapah,Perak,PRK 225 | 35400,Tapah Road,Perak,PRK 226 | 36000,Teluk Intan,Perak,PRK 227 | 36007,Teluk Intan,Perak,PRK 228 | 36008,Teluk Intan,Perak,PRK 229 | 36009,Teluk Intan,Perak,PRK 230 | 36010,Teluk Intan,Perak,PRK 231 | 36020,Teluk Intan,Perak,PRK 232 | 36030,Teluk Intan,Perak,PRK 233 | 36110,Teluk Intan,Perak,PRK 234 | 35350,Temoh,Perak,PRK 235 | 35700,Trolak,Perak,PRK 236 | 34800,Trong,Perak,PRK 237 | 31750,Tronoh,Perak,PRK 238 | 36500,Ulu Bernam,Perak,PRK 239 | 31150,Ulu Kinta,Perak,PRK 240 | 31199,Ulu Kinta,Perak,PRK 241 | -------------------------------------------------------------------------------- /data/csv/states/Sarawak.csv: -------------------------------------------------------------------------------- 1 | postcode,city,state,state_code 2 | 94600,Asajaya,Sarawak,SRW 3 | 96350,Balingian,Sarawak,SRW 4 | 98050,Baram,Sarawak,SRW 5 | 98057,Baram,Sarawak,SRW 6 | 98058,Baram,Sarawak,SRW 7 | 98059,Baram,Sarawak,SRW 8 | 94000,Bau,Sarawak,SRW 9 | 94007,Bau,Sarawak,SRW 10 | 94009,Bau,Sarawak,SRW 11 | 98150,Bekenu,Sarawak,SRW 12 | 98157,Bekenu,Sarawak,SRW 13 | 98159,Bekenu,Sarawak,SRW 14 | 96900,Belaga,Sarawak,SRW 15 | 96950,Belaga,Sarawak,SRW 16 | 96999,Belaga,Sarawak,SRW 17 | 96150,Belawai,Sarawak,SRW 18 | 95700,Betong,Sarawak,SRW 19 | 95707,Betong,Sarawak,SRW 20 | 95709,Betong,Sarawak,SRW 21 | 96500,Bintangor,Sarawak,SRW 22 | 96507,Bintangor,Sarawak,SRW 23 | 96508,Bintangor,Sarawak,SRW 24 | 96509,Bintangor,Sarawak,SRW 25 | 96510,Bintangor,Sarawak,SRW 26 | 97000,Bintulu,Sarawak,SRW 27 | 97004,Bintulu,Sarawak,SRW 28 | 97007,Bintulu,Sarawak,SRW 29 | 97008,Bintulu,Sarawak,SRW 30 | 97009,Bintulu,Sarawak,SRW 31 | 97010,Bintulu,Sarawak,SRW 32 | 97011,Bintulu,Sarawak,SRW 33 | 97012,Bintulu,Sarawak,SRW 34 | 97013,Bintulu,Sarawak,SRW 35 | 97014,Bintulu,Sarawak,SRW 36 | 97015,Bintulu,Sarawak,SRW 37 | 97300,Bintulu,Sarawak,SRW 38 | 96300,Dalat,Sarawak,SRW 39 | 96307,Dalat,Sarawak,SRW 40 | 96309,Dalat,Sarawak,SRW 41 | 96200,Daro,Sarawak,SRW 42 | 95500,Debak,Sarawak,SRW 43 | 95800,Engkilili,Sarawak,SRW 44 | 96600,Julau,Sarawak,SRW 45 | 94650,Kabong,Sarawak,SRW 46 | 96700,Kanowit,Sarawak,SRW 47 | 96707,Kanowit,Sarawak,SRW 48 | 96709,Kanowit,Sarawak,SRW 49 | 96800,Kapit,Sarawak,SRW 50 | 96807,Kapit,Sarawak,SRW 51 | 96809,Kapit,Sarawak,SRW 52 | 94300,Kota Samarahan,Sarawak,SRW 53 | 93000,Kuching,Sarawak,SRW 54 | 93010,Kuching,Sarawak,SRW 55 | 93030,Kuching,Sarawak,SRW 56 | 93050,Kuching,Sarawak,SRW 57 | 93100,Kuching,Sarawak,SRW 58 | 93150,Kuching,Sarawak,SRW 59 | 93200,Kuching,Sarawak,SRW 60 | 93250,Kuching,Sarawak,SRW 61 | 93300,Kuching,Sarawak,SRW 62 | 93350,Kuching,Sarawak,SRW 63 | 93400,Kuching,Sarawak,SRW 64 | 93450,Kuching,Sarawak,SRW 65 | 93500,Kuching,Sarawak,SRW 66 | 93502,Kuching,Sarawak,SRW 67 | 93503,Kuching,Sarawak,SRW 68 | 93504,Kuching,Sarawak,SRW 69 | 93505,Kuching,Sarawak,SRW 70 | 93506,Kuching,Sarawak,SRW 71 | 93507,Kuching,Sarawak,SRW 72 | 93508,Kuching,Sarawak,SRW 73 | 93514,Kuching,Sarawak,SRW 74 | 93516,Kuching,Sarawak,SRW 75 | 93517,Kuching,Sarawak,SRW 76 | 93518,Kuching,Sarawak,SRW 77 | 93519,Kuching,Sarawak,SRW 78 | 93520,Kuching,Sarawak,SRW 79 | 93527,Kuching,Sarawak,SRW 80 | 93529,Kuching,Sarawak,SRW 81 | 93532,Kuching,Sarawak,SRW 82 | 93540,Kuching,Sarawak,SRW 83 | 93550,Kuching,Sarawak,SRW 84 | 93551,Kuching,Sarawak,SRW 85 | 93552,Kuching,Sarawak,SRW 86 | 93554,Kuching,Sarawak,SRW 87 | 93556,Kuching,Sarawak,SRW 88 | 93558,Kuching,Sarawak,SRW 89 | 93560,Kuching,Sarawak,SRW 90 | 93564,Kuching,Sarawak,SRW 91 | 93566,Kuching,Sarawak,SRW 92 | 93570,Kuching,Sarawak,SRW 93 | 93572,Kuching,Sarawak,SRW 94 | 93576,Kuching,Sarawak,SRW 95 | 93578,Kuching,Sarawak,SRW 96 | 93582,Kuching,Sarawak,SRW 97 | 93586,Kuching,Sarawak,SRW 98 | 93590,Kuching,Sarawak,SRW 99 | 93592,Kuching,Sarawak,SRW 100 | 93594,Kuching,Sarawak,SRW 101 | 93596,Kuching,Sarawak,SRW 102 | 93600,Kuching,Sarawak,SRW 103 | 93604,Kuching,Sarawak,SRW 104 | 93606,Kuching,Sarawak,SRW 105 | 93608,Kuching,Sarawak,SRW 106 | 93609,Kuching,Sarawak,SRW 107 | 93610,Kuching,Sarawak,SRW 108 | 93612,Kuching,Sarawak,SRW 109 | 93614,Kuching,Sarawak,SRW 110 | 93618,Kuching,Sarawak,SRW 111 | 93619,Kuching,Sarawak,SRW 112 | 93620,Kuching,Sarawak,SRW 113 | 93626,Kuching,Sarawak,SRW 114 | 93628,Kuching,Sarawak,SRW 115 | 93632,Kuching,Sarawak,SRW 116 | 93634,Kuching,Sarawak,SRW 117 | 93648,Kuching,Sarawak,SRW 118 | 93658,Kuching,Sarawak,SRW 119 | 93660,Kuching,Sarawak,SRW 120 | 93661,Kuching,Sarawak,SRW 121 | 93662,Kuching,Sarawak,SRW 122 | 93668,Kuching,Sarawak,SRW 123 | 93670,Kuching,Sarawak,SRW 124 | 93672,Kuching,Sarawak,SRW 125 | 93677,Kuching,Sarawak,SRW 126 | 93690,Kuching,Sarawak,SRW 127 | 93694,Kuching,Sarawak,SRW 128 | 93700,Kuching,Sarawak,SRW 129 | 93702,Kuching,Sarawak,SRW 130 | 93704,Kuching,Sarawak,SRW 131 | 93706,Kuching,Sarawak,SRW 132 | 93708,Kuching,Sarawak,SRW 133 | 93710,Kuching,Sarawak,SRW 134 | 93712,Kuching,Sarawak,SRW 135 | 93714,Kuching,Sarawak,SRW 136 | 93716,Kuching,Sarawak,SRW 137 | 93718,Kuching,Sarawak,SRW 138 | 93720,Kuching,Sarawak,SRW 139 | 93722,Kuching,Sarawak,SRW 140 | 93724,Kuching,Sarawak,SRW 141 | 93726,Kuching,Sarawak,SRW 142 | 93728,Kuching,Sarawak,SRW 143 | 93730,Kuching,Sarawak,SRW 144 | 93732,Kuching,Sarawak,SRW 145 | 93734,Kuching,Sarawak,SRW 146 | 93736,Kuching,Sarawak,SRW 147 | 93738,Kuching,Sarawak,SRW 148 | 93740,Kuching,Sarawak,SRW 149 | 93742,Kuching,Sarawak,SRW 150 | 93744,Kuching,Sarawak,SRW 151 | 93746,Kuching,Sarawak,SRW 152 | 93748,Kuching,Sarawak,SRW 153 | 93750,Kuching,Sarawak,SRW 154 | 93752,Kuching,Sarawak,SRW 155 | 93754,Kuching,Sarawak,SRW 156 | 93756,Kuching,Sarawak,SRW 157 | 93758,Kuching,Sarawak,SRW 158 | 93760,Kuching,Sarawak,SRW 159 | 93762,Kuching,Sarawak,SRW 160 | 93764,Kuching,Sarawak,SRW 161 | 93900,Kuching,Sarawak,SRW 162 | 93902,Kuching,Sarawak,SRW 163 | 93904,Kuching,Sarawak,SRW 164 | 93906,Kuching,Sarawak,SRW 165 | 93908,Kuching,Sarawak,SRW 166 | 93910,Kuching,Sarawak,SRW 167 | 93912,Kuching,Sarawak,SRW 168 | 93914,Kuching,Sarawak,SRW 169 | 93916,Kuching,Sarawak,SRW 170 | 93990,Kuching,Sarawak,SRW 171 | 98850,Lawas,Sarawak,SRW 172 | 98857,Lawas,Sarawak,SRW 173 | 98859,Lawas,Sarawak,SRW 174 | 98700,Limbang,Sarawak,SRW 175 | 98707,Limbang,Sarawak,SRW 176 | 98708,Limbang,Sarawak,SRW 177 | 98709,Limbang,Sarawak,SRW 178 | 94900,Lingga,Sarawak,SRW 179 | 98300,Long Lama,Sarawak,SRW 180 | 95900,Lubok Antu,Sarawak,SRW 181 | 94500,Lundu,Sarawak,SRW 182 | 94507,Lundu,Sarawak,SRW 183 | 94509,Lundu,Sarawak,SRW 184 | 98100,Lutong,Sarawak,SRW 185 | 98107,Lutong,Sarawak,SRW 186 | 98109,Lutong,Sarawak,SRW 187 | 96250,Matu,Sarawak,SRW 188 | 98000,Miri,Sarawak,SRW 189 | 98007,Miri,Sarawak,SRW 190 | 98008,Miri,Sarawak,SRW 191 | 98009,Miri,Sarawak,SRW 192 | 96400,Mukah,Sarawak,SRW 193 | 96410,Mukah,Sarawak,SRW 194 | 98750,Nanga Medamit,Sarawak,SRW 195 | 98200,Niah,Sarawak,SRW 196 | 94950,Pusa,Sarawak,SRW 197 | 98070,Pusat Mel Miri,Sarawak,SRW 198 | 95300,Roban,Sarawak,SRW 199 | 95400,Saratok,Sarawak,SRW 200 | 95407,Saratok,Sarawak,SRW 201 | 95409,Saratok,Sarawak,SRW 202 | 96100,Sarikei,Sarawak,SRW 203 | 96107,Sarikei,Sarawak,SRW 204 | 96108,Sarikei,Sarawak,SRW 205 | 96109,Sarikei,Sarawak,SRW 206 | 97100,Sebauh,Sarawak,SRW 207 | 94850,Sebuyau,Sarawak,SRW 208 | 94700,Serian,Sarawak,SRW 209 | 94707,Serian,Sarawak,SRW 210 | 94709,Serian,Sarawak,SRW 211 | 94750,Serian,Sarawak,SRW 212 | 94760,Serian,Sarawak,SRW 213 | 96000,Sibu,Sarawak,SRW 214 | 96007,Sibu,Sarawak,SRW 215 | 96008,Sibu,Sarawak,SRW 216 | 96009,Sibu,Sarawak,SRW 217 | 96010,Sibu Jaya,Sarawak,SRW 218 | 94200,Siburan,Sarawak,SRW 219 | 94800,Simunjan,Sarawak,SRW 220 | 94807,Simunjan,Sarawak,SRW 221 | 94809,Simunjan,Sarawak,SRW 222 | 96850,Song,Sarawak,SRW 223 | 95600,Spaoh,Sarawak,SRW 224 | 95000,Sri Aman,Sarawak,SRW 225 | 95007,Sri Aman,Sarawak,SRW 226 | 95008,Sri Aman,Sarawak,SRW 227 | 95009,Sri Aman,Sarawak,SRW 228 | 98800,Sundar,Sarawak,SRW 229 | 97200,Tatau,Sarawak,SRW 230 | -------------------------------------------------------------------------------- /data/csv/states/Johor.csv: -------------------------------------------------------------------------------- 1 | postcode,city,state,state_code 2 | 82100,Ayer Baloi,Johor,JHR 3 | 86100,Ayer Hitam,Johor,JHR 4 | 81920,Ayer Tawar 2,Johor,JHR 5 | 81930,Bandar Penawar,Johor,JHR 6 | 81960,Bandar Penawar,Johor,JHR 7 | 81440,Bandar Tenggara,Johor,JHR 8 | 85100,Batu Anam,Johor,JHR 9 | 83000,Batu Pahat,Johor,JHR 10 | 83010,Batu Pahat,Johor,JHR 11 | 83020,Batu Pahat,Johor,JHR 12 | 83030,Batu Pahat,Johor,JHR 13 | 83040,Batu Pahat,Johor,JHR 14 | 83050,Batu Pahat,Johor,JHR 15 | 86400,Batu Pahat,Johor,JHR 16 | 86500,Bekok,Johor,JHR 17 | 82200,Benut,Johor,JHR 18 | 84800,Bukit Gambir,Johor,JHR 19 | 84300,Bukit Pasir,Johor,JHR 20 | 85400,Chaah,Johor,JHR 21 | 86900,Endau,Johor,JHR 22 | 86999,Endau,Johor,JHR 23 | 81550,Gelang Patah,Johor,JHR 24 | 81560,Gelang Patah,Johor,JHR 25 | 84700,Gerisek,Johor,JHR 26 | 84710,Gerisek,Johor,JHR 27 | 81450,Gugusan Taib Andak,Johor,JHR 28 | 79000,Iskandar Puteri,Johor,JHR 29 | 79050,Iskandar Puteri,Johor,JHR 30 | 79100,Iskandar Puteri,Johor,JHR 31 | 79150,Iskandar Puteri,Johor,JHR 32 | 79200,Iskandar Puteri,Johor,JHR 33 | 79250,Iskandar Puteri,Johor,JHR 34 | 79502,Iskandar Puteri,Johor,JHR 35 | 79503,Iskandar Puteri,Johor,JHR 36 | 79504,Iskandar Puteri,Johor,JHR 37 | 79505,Iskandar Puteri,Johor,JHR 38 | 79511,Iskandar Puteri,Johor,JHR 39 | 79513,Iskandar Puteri,Johor,JHR 40 | 79514,Iskandar Puteri,Johor,JHR 41 | 79517,Iskandar Puteri,Johor,JHR 42 | 79518,Iskandar Puteri,Johor,JHR 43 | 79520,Iskandar Puteri,Johor,JHR 44 | 79521,Iskandar Puteri,Johor,JHR 45 | 79523,Iskandar Puteri,Johor,JHR 46 | 79532,Iskandar Puteri,Johor,JHR 47 | 79538,Iskandar Puteri,Johor,JHR 48 | 79540,Iskandar Puteri,Johor,JHR 49 | 79546,Iskandar Puteri,Johor,JHR 50 | 79548,Iskandar Puteri,Johor,JHR 51 | 79550,Iskandar Puteri,Johor,JHR 52 | 79552,Iskandar Puteri,Johor,JHR 53 | 79555,Iskandar Puteri,Johor,JHR 54 | 79570,Iskandar Puteri,Johor,JHR 55 | 79575,Iskandar Puteri,Johor,JHR 56 | 79576,Iskandar Puteri,Johor,JHR 57 | 79592,Iskandar Puteri,Johor,JHR 58 | 79601,Iskandar Puteri,Johor,JHR 59 | 79603,Iskandar Puteri,Johor,JHR 60 | 79605,Iskandar Puteri,Johor,JHR 61 | 79606,Iskandar Puteri,Johor,JHR 62 | 79612,Iskandar Puteri,Johor,JHR 63 | 79626,Iskandar Puteri,Johor,JHR 64 | 79630,Iskandar Puteri,Johor,JHR 65 | 79632,Iskandar Puteri,Johor,JHR 66 | 79646,Iskandar Puteri,Johor,JHR 67 | 79658,Iskandar Puteri,Johor,JHR 68 | 79660,Iskandar Puteri,Johor,JHR 69 | 79680,Iskandar Puteri,Johor,JHR 70 | 79681,Iskandar Puteri,Johor,JHR 71 | 79683,Iskandar Puteri,Johor,JHR 72 | 85200,Jementah,Johor,JHR 73 | 85210,Jementah,Johor,JHR 74 | 80000,Johor Bahru,Johor,JHR 75 | 80050,Johor Bahru,Johor,JHR 76 | 80100,Johor Bahru,Johor,JHR 77 | 80110,Johor Bahru,Johor,JHR 78 | 80150,Johor Bahru,Johor,JHR 79 | 80200,Johor Bahru,Johor,JHR 80 | 80250,Johor Bahru,Johor,JHR 81 | 80300,Johor Bahru,Johor,JHR 82 | 80350,Johor Bahru,Johor,JHR 83 | 80400,Johor Bahru,Johor,JHR 84 | 80500,Johor Bahru,Johor,JHR 85 | 80502,Johor Bahru,Johor,JHR 86 | 80503,Johor Bahru,Johor,JHR 87 | 80504,Johor Bahru,Johor,JHR 88 | 80505,Johor Bahru,Johor,JHR 89 | 80506,Johor Bahru,Johor,JHR 90 | 80508,Johor Bahru,Johor,JHR 91 | 80514,Johor Bahru,Johor,JHR 92 | 80516,Johor Bahru,Johor,JHR 93 | 80517,Johor Bahru,Johor,JHR 94 | 80518,Johor Bahru,Johor,JHR 95 | 80519,Johor Bahru,Johor,JHR 96 | 80520,Johor Bahru,Johor,JHR 97 | 80529,Johor Bahru,Johor,JHR 98 | 80530,Johor Bahru,Johor,JHR 99 | 80532,Johor Bahru,Johor,JHR 100 | 80534,Johor Bahru,Johor,JHR 101 | 80536,Johor Bahru,Johor,JHR 102 | 80538,Johor Bahru,Johor,JHR 103 | 80540,Johor Bahru,Johor,JHR 104 | 80542,Johor Bahru,Johor,JHR 105 | 80546,Johor Bahru,Johor,JHR 106 | 80548,Johor Bahru,Johor,JHR 107 | 80550,Johor Bahru,Johor,JHR 108 | 80552,Johor Bahru,Johor,JHR 109 | 80558,Johor Bahru,Johor,JHR 110 | 80560,Johor Bahru,Johor,JHR 111 | 80564,Johor Bahru,Johor,JHR 112 | 80568,Johor Bahru,Johor,JHR 113 | 80570,Johor Bahru,Johor,JHR 114 | 80576,Johor Bahru,Johor,JHR 115 | 80578,Johor Bahru,Johor,JHR 116 | 80584,Johor Bahru,Johor,JHR 117 | 80586,Johor Bahru,Johor,JHR 118 | 80590,Johor Bahru,Johor,JHR 119 | 80592,Johor Bahru,Johor,JHR 120 | 80594,Johor Bahru,Johor,JHR 121 | 80596,Johor Bahru,Johor,JHR 122 | 80600,Johor Bahru,Johor,JHR 123 | 80604,Johor Bahru,Johor,JHR 124 | 80606,Johor Bahru,Johor,JHR 125 | 80608,Johor Bahru,Johor,JHR 126 | 80610,Johor Bahru,Johor,JHR 127 | 80612,Johor Bahru,Johor,JHR 128 | 80620,Johor Bahru,Johor,JHR 129 | 80622,Johor Bahru,Johor,JHR 130 | 80626,Johor Bahru,Johor,JHR 131 | 80628,Johor Bahru,Johor,JHR 132 | 80630,Johor Bahru,Johor,JHR 133 | 80632,Johor Bahru,Johor,JHR 134 | 80644,Johor Bahru,Johor,JHR 135 | 80646,Johor Bahru,Johor,JHR 136 | 80648,Johor Bahru,Johor,JHR 137 | 80658,Johor Bahru,Johor,JHR 138 | 80660,Johor Bahru,Johor,JHR 139 | 80662,Johor Bahru,Johor,JHR 140 | 80664,Johor Bahru,Johor,JHR 141 | 80668,Johor Bahru,Johor,JHR 142 | 80670,Johor Bahru,Johor,JHR 143 | 80672,Johor Bahru,Johor,JHR 144 | 80673,Johor Bahru,Johor,JHR 145 | 80676,Johor Bahru,Johor,JHR 146 | 80700,Johor Bahru,Johor,JHR 147 | 80710,Johor Bahru,Johor,JHR 148 | 80720,Johor Bahru,Johor,JHR 149 | 80730,Johor Bahru,Johor,JHR 150 | 80750,Johor Bahru,Johor,JHR 151 | 80800,Johor Bahru,Johor,JHR 152 | 80900,Johor Bahru,Johor,JHR 153 | 80902,Johor Bahru,Johor,JHR 154 | 80904,Johor Bahru,Johor,JHR 155 | 80906,Johor Bahru,Johor,JHR 156 | 80908,Johor Bahru,Johor,JHR 157 | 80988,Johor Bahru,Johor,JHR 158 | 80990,Johor Bahru,Johor,JHR 159 | 81100,Johor Bahru,Johor,JHR 160 | 81110,Johor Bahru,Johor,JHR 161 | 81120,Johor Bahru,Johor,JHR 162 | 81200,Johor Bahru,Johor,JHR 163 | 81250,Johor Bahru,Johor,JHR 164 | 81300,Johor Bahru,Johor,JHR 165 | 81310,Johor Bahru,Johor,JHR 166 | 86700,Kahang,Johor,JHR 167 | 86000,Kluang,Johor,JHR 168 | 86007,Kluang,Johor,JHR 169 | 81900,Kota Tinggi,Johor,JHR 170 | 81907,Kota Tinggi,Johor,JHR 171 | 81910,Kota Tinggi,Johor,JHR 172 | 82300,Kukup,Johor,JHR 173 | 81000,Kulai,Johor,JHR 174 | 81010,Kulai,Johor,JHR 175 | 81020,Kulai,Johor,JHR 176 | 81030,Kulai,Johor,JHR 177 | 81040,Kulai,Johor,JHR 178 | 81050,Kulai,Johor,JHR 179 | 85300,Labis,Johor,JHR 180 | 81850,Layang-Layang,Johor,JHR 181 | 81750,Masai,Johor,JHR 182 | 81760,Masai,Johor,JHR 183 | 86800,Mersing,Johor,JHR 184 | 86810,Mersing,Johor,JHR 185 | 84000,Muar,Johor,JHR 186 | 84007,Muar,Johor,JHR 187 | 84010,Muar,Johor,JHR 188 | 84020,Muar,Johor,JHR 189 | 84030,Muar,Johor,JHR 190 | 84040,Muar,Johor,JHR 191 | 84050,Muar,Johor,JHR 192 | 84100,Muar,Johor,JHR 193 | 84200,Muar,Johor,JHR 194 | 84300,Muar,Johor,JHR 195 | 84410,Muar,Johor,JHR 196 | 84600,Pagoh,Johor,JHR 197 | 86600,Paloh,Johor,JHR 198 | 84500,Panchor,Johor,JHR 199 | 84150,Parit Jawa,Johor,JHR 200 | 84160,Parit Jawa,Johor,JHR 201 | 86400,Parit Raja,Johor,JHR 202 | 83500,Parit Sulong,Johor,JHR 203 | 81700,Pasir Gudang,Johor,JHR 204 | 81500,Pekan Nenas,Johor,JHR 205 | 81600,Pengerang,Johor,JHR 206 | 81620,Pengerang,Johor,JHR 207 | 81650,Pengerang,Johor,JHR 208 | 82000,Pontian,Johor,JHR 209 | 82010,Pontian,Johor,JHR 210 | 82020,Pontian,Johor,JHR 211 | 82030,Pontian,Johor,JHR 212 | 86300,Rengam,Johor,JHR 213 | 83100,Rengit,Johor,JHR 214 | 85000,Segamat,Johor,JHR 215 | 85010,Segamat,Johor,JHR 216 | 85020,Segamat,Johor,JHR 217 | 85030,Segamat,Johor,JHR 218 | 85060,Segamat,Johor,JHR 219 | 85070,Segamat,Johor,JHR 220 | 85080,Segamat,Johor,JHR 221 | 83600,Semerah,Johor,JHR 222 | 83610,Semerah,Johor,JHR 223 | 81400,Senai,Johor,JHR 224 | 81410,Senai,Johor,JHR 225 | 83200,Senggarang,Johor,JHR 226 | 83300,Seri Gading,Johor,JHR 227 | 83400,Seri Medan,Johor,JHR 228 | 86200,Simpang Rengam,Johor,JHR 229 | 84400,Sungai Mati,Johor,JHR 230 | 84409,Sungai Mati,Johor,JHR 231 | 84900,Tangkak,Johor,JHR 232 | 84990,Tangkak,Johor,JHR 233 | 86800,Tioman,Johor,JHR 234 | 81800,Ulu Tiram,Johor,JHR 235 | 81810,Ulu Tiram,Johor,JHR 236 | 83700,Yong Peng,Johor,JHR 237 | 83710,Yong Peng,Johor,JHR 238 | -------------------------------------------------------------------------------- /data/json/states/pahang.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Pahang", 3 | "code": "PHG", 4 | "cities": [ 5 | { 6 | "name": "Balok", 7 | "postcodes": [ 8 | "26080", 9 | "26100", 10 | "26150", 11 | "26190" 12 | ] 13 | }, 14 | { 15 | "name": "Bandar Pusat Jengka", 16 | "postcodes": [ 17 | "26400", 18 | "26410", 19 | "26420", 20 | "26430", 21 | "26440", 22 | "26450", 23 | "26460", 24 | "26485", 25 | "26490", 26 | "27080" 27 | ] 28 | }, 29 | { 30 | "name": "Bandar Tun Abdul Razak", 31 | "postcodes": [ 32 | "26900", 33 | "26999" 34 | ] 35 | }, 36 | { 37 | "name": "Benta", 38 | "postcodes": [ 39 | "27300", 40 | "27310" 41 | ] 42 | }, 43 | { 44 | "name": "Bentong", 45 | "postcodes": [ 46 | "28700", 47 | "28707", 48 | "28709", 49 | "28730", 50 | "28740", 51 | "28750" 52 | ] 53 | }, 54 | { 55 | "name": "Brinchang", 56 | "postcodes": [ 57 | "39100" 58 | ] 59 | }, 60 | { 61 | "name": "Bukit Fraser", 62 | "postcodes": [ 63 | "49000" 64 | ] 65 | }, 66 | { 67 | "name": "Bukit Goh", 68 | "postcodes": [ 69 | "26050", 70 | "26090" 71 | ] 72 | }, 73 | { 74 | "name": "Chenor", 75 | "postcodes": [ 76 | "28100" 77 | ] 78 | }, 79 | { 80 | "name": "Chini", 81 | "postcodes": [ 82 | "26690" 83 | ] 84 | }, 85 | { 86 | "name": "Damak", 87 | "postcodes": [ 88 | "27030" 89 | ] 90 | }, 91 | { 92 | "name": "Dong", 93 | "postcodes": [ 94 | "27400" 95 | ] 96 | }, 97 | { 98 | "name": "Gambang", 99 | "postcodes": [ 100 | "26300", 101 | "26310", 102 | "26320", 103 | "26330", 104 | "26340", 105 | "26350", 106 | "26360", 107 | "26370" 108 | ] 109 | }, 110 | { 111 | "name": "Genting Highlands", 112 | "postcodes": [ 113 | "69000" 114 | ] 115 | }, 116 | { 117 | "name": "Jaya Gading", 118 | "postcodes": [ 119 | "26250" 120 | ] 121 | }, 122 | { 123 | "name": "Jerantut", 124 | "postcodes": [ 125 | "27000", 126 | "27010", 127 | "27020", 128 | "27040", 129 | "27050", 130 | "27060", 131 | "27070", 132 | "27090", 133 | "27150" 134 | ] 135 | }, 136 | { 137 | "name": "Karak", 138 | "postcodes": [ 139 | "28600", 140 | "28610", 141 | "28620" 142 | ] 143 | }, 144 | { 145 | "name": "Kemayan", 146 | "postcodes": [ 147 | "28340", 148 | "28380" 149 | ] 150 | }, 151 | { 152 | "name": "Kuala Krau", 153 | "postcodes": [ 154 | "28050" 155 | ] 156 | }, 157 | { 158 | "name": "Kuala Lipis", 159 | "postcodes": [ 160 | "27200", 161 | "27207", 162 | "27209", 163 | "27210" 164 | ] 165 | }, 166 | { 167 | "name": "Kuala Rompin", 168 | "postcodes": [ 169 | "26800", 170 | "26810", 171 | "26820" 172 | ] 173 | }, 174 | { 175 | "name": "Kuantan", 176 | "postcodes": [ 177 | "25000", 178 | "25020", 179 | "25040", 180 | "25050", 181 | "25100", 182 | "25150", 183 | "25200", 184 | "25250", 185 | "25300", 186 | "25320", 187 | "25350", 188 | "25500", 189 | "25502", 190 | "25503", 191 | "25504", 192 | "25505", 193 | "25506", 194 | "25508", 195 | "25509", 196 | "25512", 197 | "25514", 198 | "25516", 199 | "25517", 200 | "25518", 201 | "25520", 202 | "25524", 203 | "25529", 204 | "25532", 205 | "25534", 206 | "25536", 207 | "25538", 208 | "25540", 209 | "25546", 210 | "25548", 211 | "25550", 212 | "25551", 213 | "25552", 214 | "25556", 215 | "25558", 216 | "25560", 217 | "25564", 218 | "25570", 219 | "25576", 220 | "25578", 221 | "25582", 222 | "25584", 223 | "25586", 224 | "25590", 225 | "25592", 226 | "25594", 227 | "25596", 228 | "25598", 229 | "25600", 230 | "25604", 231 | "25606", 232 | "25608", 233 | "25609", 234 | "25610", 235 | "25612", 236 | "25614", 237 | "25620", 238 | "25622", 239 | "25626", 240 | "25628", 241 | "25630", 242 | "25632", 243 | "25644", 244 | "25646", 245 | "25648", 246 | "25656", 247 | "25660", 248 | "25661", 249 | "25662", 250 | "25670", 251 | "25672", 252 | "25673", 253 | "25674", 254 | "25676", 255 | "25690", 256 | "25700", 257 | "25710", 258 | "25720", 259 | "25730", 260 | "25740", 261 | "25750", 262 | "25990", 263 | "26000", 264 | "26010", 265 | "26040", 266 | "26060", 267 | "26070", 268 | "26140", 269 | "26180" 270 | ] 271 | }, 272 | { 273 | "name": "Lanchang", 274 | "postcodes": [ 275 | "28500" 276 | ] 277 | }, 278 | { 279 | "name": "Lurah Bilut", 280 | "postcodes": [ 281 | "28800" 282 | ] 283 | }, 284 | { 285 | "name": "Maran", 286 | "postcodes": [ 287 | "26500" 288 | ] 289 | }, 290 | { 291 | "name": "Mentakab", 292 | "postcodes": [ 293 | "28400", 294 | "28407", 295 | "28409" 296 | ] 297 | }, 298 | { 299 | "name": "Muadzam Shah", 300 | "postcodes": [ 301 | "26700" 302 | ] 303 | }, 304 | { 305 | "name": "Padang Tengku", 306 | "postcodes": [ 307 | "27100" 308 | ] 309 | }, 310 | { 311 | "name": "Pekan", 312 | "postcodes": [ 313 | "26600", 314 | "26607", 315 | "26609", 316 | "26610", 317 | "26620", 318 | "26630", 319 | "26640", 320 | "26650", 321 | "26660", 322 | "26680" 323 | ] 324 | }, 325 | { 326 | "name": "Raub", 327 | "postcodes": [ 328 | "27600", 329 | "27607", 330 | "27609", 331 | "27610", 332 | "27620", 333 | "27630", 334 | "27670" 335 | ] 336 | }, 337 | { 338 | "name": "Ringlet", 339 | "postcodes": [ 340 | "39200" 341 | ] 342 | }, 343 | { 344 | "name": "Sega", 345 | "postcodes": [ 346 | "27660" 347 | ] 348 | }, 349 | { 350 | "name": "Sungai Koyan", 351 | "postcodes": [ 352 | "27650" 353 | ] 354 | }, 355 | { 356 | "name": "Sungai Lembing", 357 | "postcodes": [ 358 | "26200" 359 | ] 360 | }, 361 | { 362 | "name": "Sungai Ruan", 363 | "postcodes": [ 364 | "27500" 365 | ] 366 | }, 367 | { 368 | "name": "Tanah Rata", 369 | "postcodes": [ 370 | "39000", 371 | "39007", 372 | "39009", 373 | "39010" 374 | ] 375 | }, 376 | { 377 | "name": "Temerloh", 378 | "postcodes": [ 379 | "28000", 380 | "28007", 381 | "28009", 382 | "28010", 383 | "28020", 384 | "28030", 385 | "28040" 386 | ] 387 | }, 388 | { 389 | "name": "Triang", 390 | "postcodes": [ 391 | "28200", 392 | "28300", 393 | "28310", 394 | "28320", 395 | "28330", 396 | "28350" 397 | ] 398 | } 399 | ] 400 | } -------------------------------------------------------------------------------- /process_data.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | """ 3 | Malaysia Postcode Data Processor 4 | Converts JSON data to CSV and organizes by state 5 | """ 6 | 7 | import json 8 | import csv 9 | import os 10 | from pathlib import Path 11 | 12 | # State code mappings 13 | STATE_CODES = { 14 | "Johor": "JHR", 15 | "Kedah": "KDH", 16 | "Kelantan": "KTN", 17 | "Wp Kuala Lumpur": "KUL", 18 | "Wp Labuan": "LBN", 19 | "Melaka": "MLK", 20 | "Negeri Sembilan": "NSN", 21 | "Pahang": "PHG", 22 | "Wp Putrajaya": "PJY", 23 | "Perlis": "PLS", 24 | "Pulau Pinang": "PNG", 25 | "Perak": "PRK", 26 | "Sabah": "SBH", 27 | "Selangor": "SGR", 28 | "Sarawak": "SRW", 29 | "Terengganu": "TRG" 30 | } 31 | 32 | def load_json_data(json_file): 33 | """Load JSON data from file""" 34 | with open(json_file, 'r', encoding='utf-8') as f: 35 | return json.load(f) 36 | 37 | def create_postcode_csv(data, output_file): 38 | """Create main postcodes CSV file""" 39 | print(f"Creating {output_file}...") 40 | 41 | with open(output_file, 'w', newline='', encoding='utf-8') as f: 42 | writer = csv.writer(f) 43 | writer.writerow(['postcode', 'city', 'state', 'state_code']) 44 | 45 | for state_data in sorted(data['state'], key=lambda x: x['name']): 46 | state_name = state_data['name'] 47 | state_code = STATE_CODES.get(state_name, '') 48 | 49 | for city_data in sorted(state_data['city'], key=lambda x: x['name']): 50 | city_name = city_data['name'] 51 | 52 | for postcode in sorted(city_data['postcode']): 53 | writer.writerow([postcode, city_name, state_name, state_code]) 54 | 55 | print(f"✓ Created {output_file}") 56 | 57 | def create_states_csv(output_file): 58 | """Create states mapping CSV file""" 59 | print(f"Creating {output_file}...") 60 | 61 | with open(output_file, 'w', newline='', encoding='utf-8') as f: 62 | writer = csv.writer(f) 63 | writer.writerow(['state_code', 'state_name']) 64 | 65 | for state_name, state_code in sorted(STATE_CODES.items(), key=lambda x: x[1]): 66 | writer.writerow([state_code, state_name]) 67 | 68 | print(f"✓ Created {output_file}") 69 | 70 | def create_state_files(data, output_dir): 71 | """Create individual CSV files for each state""" 72 | print(f"Creating state-specific files in {output_dir}...") 73 | 74 | # Create output directory if it doesn't exist 75 | Path(output_dir).mkdir(exist_ok=True) 76 | 77 | for state_data in sorted(data['state'], key=lambda x: x['name']): 78 | state_name = state_data['name'] 79 | state_code = STATE_CODES.get(state_name, '') 80 | 81 | # Create filename 82 | filename = f"{state_name.replace(' ', '_')}.csv" 83 | filepath = os.path.join(output_dir, filename) 84 | 85 | with open(filepath, 'w', newline='', encoding='utf-8') as f: 86 | writer = csv.writer(f) 87 | writer.writerow(['postcode', 'city', 'state', 'state_code']) 88 | 89 | for city_data in sorted(state_data['city'], key=lambda x: x['name']): 90 | city_name = city_data['name'] 91 | 92 | for postcode in sorted(city_data['postcode']): 93 | writer.writerow([postcode, city_name, state_name, state_code]) 94 | 95 | print(f" ✓ Created {filename}") 96 | 97 | def create_state_json_files(data, output_dir): 98 | """Create individual JSON files for each state""" 99 | print(f"Creating state-specific JSON files in {output_dir}...") 100 | 101 | # Create output directory if it doesn't exist 102 | Path(output_dir).mkdir(exist_ok=True) 103 | 104 | for state_data in sorted(data['state'], key=lambda x: x['name']): 105 | state_name = state_data['name'] 106 | 107 | # Create filename 108 | filename = f"{state_name.replace(' ', '_').lower()}.json" 109 | filepath = os.path.join(output_dir, filename) 110 | 111 | # Prepare state data 112 | state_output = { 113 | "name": state_name, 114 | "code": STATE_CODES.get(state_name, ''), 115 | "cities": [] 116 | } 117 | 118 | for city_data in sorted(state_data['city'], key=lambda x: x['name']): 119 | city_output = { 120 | "name": city_data['name'], 121 | "postcodes": sorted(city_data['postcode']) 122 | } 123 | state_output['cities'].append(city_output) 124 | 125 | with open(filepath, 'w', encoding='utf-8') as f: 126 | json.dump(state_output, f, indent=2, ensure_ascii=False) 127 | 128 | print(f" ✓ Created {filename}") 129 | 130 | def create_complete_json(data, output_file): 131 | """Create complete JSON file with all data""" 132 | print(f"Creating {output_file}...") 133 | 134 | complete_data = { 135 | "metadata": { 136 | "version": "2025.1", 137 | "description": "Complete Malaysia postcode database", 138 | "total_states": len(data['state']), 139 | "source": "Community maintained - https://github.com/AsyrafHussin/malaysia-postcodes" 140 | }, 141 | "states": [] 142 | } 143 | 144 | for state_data in sorted(data['state'], key=lambda x: x['name']): 145 | state_name = state_data['name'] 146 | 147 | state_output = { 148 | "name": state_name, 149 | "code": STATE_CODES.get(state_name, ''), 150 | "cities": [] 151 | } 152 | 153 | for city_data in sorted(state_data['city'], key=lambda x: x['name']): 154 | city_output = { 155 | "name": city_data['name'], 156 | "postcodes": sorted(city_data['postcode']) 157 | } 158 | state_output['cities'].append(city_output) 159 | 160 | complete_data['states'].append(state_output) 161 | 162 | with open(output_file, 'w', encoding='utf-8') as f: 163 | json.dump(complete_data, f, indent=2, ensure_ascii=False) 164 | 165 | print(f"✓ Created {output_file}") 166 | 167 | def print_statistics(data): 168 | """Print data statistics""" 169 | print("\n" + "="*60) 170 | print("DATA STATISTICS") 171 | print("="*60) 172 | 173 | total_states = len(data['state']) 174 | total_cities = sum(len(state['city']) for state in data['state']) 175 | total_postcodes = sum(len(city['postcode']) for state in data['state'] for city in state['city']) 176 | 177 | print(f"Total States/Territories: {total_states}") 178 | print(f"Total Cities/Areas: {total_cities}") 179 | print(f"Total Postcodes: {total_postcodes}") 180 | print("\nBy State:") 181 | 182 | for state_data in sorted(data['state'], key=lambda x: x['name']): 183 | state_name = state_data['name'] 184 | state_code = STATE_CODES.get(state_name, '') 185 | cities_count = len(state_data['city']) 186 | postcodes_count = sum(len(city['postcode']) for city in state_data['city']) 187 | 188 | print(f" {state_code:3} - {state_name:30} {cities_count:3} cities, {postcodes_count:5} postcodes") 189 | 190 | print("="*60 + "\n") 191 | 192 | def main(): 193 | """Main processing function""" 194 | print("\n" + "="*60) 195 | print("MALAYSIA POSTCODE DATA PROCESSOR") 196 | print("="*60 + "\n") 197 | 198 | # Load JSON data 199 | json_file = '/tmp/malaysia-postcodes-new.json' 200 | print(f"Loading data from {json_file}...") 201 | data = load_json_data(json_file) 202 | print(f"✓ Data loaded successfully\n") 203 | 204 | # Print statistics 205 | print_statistics(data) 206 | 207 | # Create output directories 208 | Path('data').mkdir(exist_ok=True) 209 | Path('data/csv').mkdir(exist_ok=True) 210 | Path('data/json').mkdir(exist_ok=True) 211 | 212 | # Create CSV files 213 | print("Generating CSV files...") 214 | create_postcode_csv(data, 'data/csv/postcodes.csv') 215 | create_states_csv('data/csv/states.csv') 216 | create_state_files(data, 'data/csv/states') 217 | 218 | # Create JSON files 219 | print("\nGenerating JSON files...") 220 | create_complete_json(data, 'data/json/postcodes.json') 221 | create_state_json_files(data, 'data/json/states') 222 | 223 | print("\n" + "="*60) 224 | print("✓ ALL FILES GENERATED SUCCESSFULLY!") 225 | print("="*60) 226 | print("\nOutput structure:") 227 | print(" data/") 228 | print(" csv/") 229 | print(" postcodes.csv - All postcodes") 230 | print(" states.csv - State mappings") 231 | print(" states/ - Individual state CSV files") 232 | print(" json/") 233 | print(" postcodes.json - All postcodes (JSON)") 234 | print(" states/ - Individual state JSON files") 235 | print() 236 | 237 | if __name__ == '__main__': 238 | main() 239 | -------------------------------------------------------------------------------- /data/json/states/sarawak.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Sarawak", 3 | "code": "SRW", 4 | "cities": [ 5 | { 6 | "name": "Asajaya", 7 | "postcodes": [ 8 | "94600" 9 | ] 10 | }, 11 | { 12 | "name": "Balingian", 13 | "postcodes": [ 14 | "96350" 15 | ] 16 | }, 17 | { 18 | "name": "Baram", 19 | "postcodes": [ 20 | "98050", 21 | "98057", 22 | "98058", 23 | "98059" 24 | ] 25 | }, 26 | { 27 | "name": "Bau", 28 | "postcodes": [ 29 | "94000", 30 | "94007", 31 | "94009" 32 | ] 33 | }, 34 | { 35 | "name": "Bekenu", 36 | "postcodes": [ 37 | "98150", 38 | "98157", 39 | "98159" 40 | ] 41 | }, 42 | { 43 | "name": "Belaga", 44 | "postcodes": [ 45 | "96900", 46 | "96950", 47 | "96999" 48 | ] 49 | }, 50 | { 51 | "name": "Belawai", 52 | "postcodes": [ 53 | "96150" 54 | ] 55 | }, 56 | { 57 | "name": "Betong", 58 | "postcodes": [ 59 | "95700", 60 | "95707", 61 | "95709" 62 | ] 63 | }, 64 | { 65 | "name": "Bintangor", 66 | "postcodes": [ 67 | "96500", 68 | "96507", 69 | "96508", 70 | "96509", 71 | "96510" 72 | ] 73 | }, 74 | { 75 | "name": "Bintulu", 76 | "postcodes": [ 77 | "97000", 78 | "97004", 79 | "97007", 80 | "97008", 81 | "97009", 82 | "97010", 83 | "97011", 84 | "97012", 85 | "97013", 86 | "97014", 87 | "97015", 88 | "97300" 89 | ] 90 | }, 91 | { 92 | "name": "Dalat", 93 | "postcodes": [ 94 | "96300", 95 | "96307", 96 | "96309" 97 | ] 98 | }, 99 | { 100 | "name": "Daro", 101 | "postcodes": [ 102 | "96200" 103 | ] 104 | }, 105 | { 106 | "name": "Debak", 107 | "postcodes": [ 108 | "95500" 109 | ] 110 | }, 111 | { 112 | "name": "Engkilili", 113 | "postcodes": [ 114 | "95800" 115 | ] 116 | }, 117 | { 118 | "name": "Julau", 119 | "postcodes": [ 120 | "96600" 121 | ] 122 | }, 123 | { 124 | "name": "Kabong", 125 | "postcodes": [ 126 | "94650" 127 | ] 128 | }, 129 | { 130 | "name": "Kanowit", 131 | "postcodes": [ 132 | "96700", 133 | "96707", 134 | "96709" 135 | ] 136 | }, 137 | { 138 | "name": "Kapit", 139 | "postcodes": [ 140 | "96800", 141 | "96807", 142 | "96809" 143 | ] 144 | }, 145 | { 146 | "name": "Kota Samarahan", 147 | "postcodes": [ 148 | "94300" 149 | ] 150 | }, 151 | { 152 | "name": "Kuching", 153 | "postcodes": [ 154 | "93000", 155 | "93010", 156 | "93030", 157 | "93050", 158 | "93100", 159 | "93150", 160 | "93200", 161 | "93250", 162 | "93300", 163 | "93350", 164 | "93400", 165 | "93450", 166 | "93500", 167 | "93502", 168 | "93503", 169 | "93504", 170 | "93505", 171 | "93506", 172 | "93507", 173 | "93508", 174 | "93514", 175 | "93516", 176 | "93517", 177 | "93518", 178 | "93519", 179 | "93520", 180 | "93527", 181 | "93529", 182 | "93532", 183 | "93540", 184 | "93550", 185 | "93551", 186 | "93552", 187 | "93554", 188 | "93556", 189 | "93558", 190 | "93560", 191 | "93564", 192 | "93566", 193 | "93570", 194 | "93572", 195 | "93576", 196 | "93578", 197 | "93582", 198 | "93586", 199 | "93590", 200 | "93592", 201 | "93594", 202 | "93596", 203 | "93600", 204 | "93604", 205 | "93606", 206 | "93608", 207 | "93609", 208 | "93610", 209 | "93612", 210 | "93614", 211 | "93618", 212 | "93619", 213 | "93620", 214 | "93626", 215 | "93628", 216 | "93632", 217 | "93634", 218 | "93648", 219 | "93658", 220 | "93660", 221 | "93661", 222 | "93662", 223 | "93668", 224 | "93670", 225 | "93672", 226 | "93677", 227 | "93690", 228 | "93694", 229 | "93700", 230 | "93702", 231 | "93704", 232 | "93706", 233 | "93708", 234 | "93710", 235 | "93712", 236 | "93714", 237 | "93716", 238 | "93718", 239 | "93720", 240 | "93722", 241 | "93724", 242 | "93726", 243 | "93728", 244 | "93730", 245 | "93732", 246 | "93734", 247 | "93736", 248 | "93738", 249 | "93740", 250 | "93742", 251 | "93744", 252 | "93746", 253 | "93748", 254 | "93750", 255 | "93752", 256 | "93754", 257 | "93756", 258 | "93758", 259 | "93760", 260 | "93762", 261 | "93764", 262 | "93900", 263 | "93902", 264 | "93904", 265 | "93906", 266 | "93908", 267 | "93910", 268 | "93912", 269 | "93914", 270 | "93916", 271 | "93990" 272 | ] 273 | }, 274 | { 275 | "name": "Lawas", 276 | "postcodes": [ 277 | "98850", 278 | "98857", 279 | "98859" 280 | ] 281 | }, 282 | { 283 | "name": "Limbang", 284 | "postcodes": [ 285 | "98700", 286 | "98707", 287 | "98708", 288 | "98709" 289 | ] 290 | }, 291 | { 292 | "name": "Lingga", 293 | "postcodes": [ 294 | "94900" 295 | ] 296 | }, 297 | { 298 | "name": "Long Lama", 299 | "postcodes": [ 300 | "98300" 301 | ] 302 | }, 303 | { 304 | "name": "Lubok Antu", 305 | "postcodes": [ 306 | "95900" 307 | ] 308 | }, 309 | { 310 | "name": "Lundu", 311 | "postcodes": [ 312 | "94500", 313 | "94507", 314 | "94509" 315 | ] 316 | }, 317 | { 318 | "name": "Lutong", 319 | "postcodes": [ 320 | "98100", 321 | "98107", 322 | "98109" 323 | ] 324 | }, 325 | { 326 | "name": "Matu", 327 | "postcodes": [ 328 | "96250" 329 | ] 330 | }, 331 | { 332 | "name": "Miri", 333 | "postcodes": [ 334 | "98000", 335 | "98007", 336 | "98008", 337 | "98009" 338 | ] 339 | }, 340 | { 341 | "name": "Mukah", 342 | "postcodes": [ 343 | "96400", 344 | "96410" 345 | ] 346 | }, 347 | { 348 | "name": "Nanga Medamit", 349 | "postcodes": [ 350 | "98750" 351 | ] 352 | }, 353 | { 354 | "name": "Niah", 355 | "postcodes": [ 356 | "98200" 357 | ] 358 | }, 359 | { 360 | "name": "Pusa", 361 | "postcodes": [ 362 | "94950" 363 | ] 364 | }, 365 | { 366 | "name": "Pusat Mel Miri", 367 | "postcodes": [ 368 | "98070" 369 | ] 370 | }, 371 | { 372 | "name": "Roban", 373 | "postcodes": [ 374 | "95300" 375 | ] 376 | }, 377 | { 378 | "name": "Saratok", 379 | "postcodes": [ 380 | "95400", 381 | "95407", 382 | "95409" 383 | ] 384 | }, 385 | { 386 | "name": "Sarikei", 387 | "postcodes": [ 388 | "96100", 389 | "96107", 390 | "96108", 391 | "96109" 392 | ] 393 | }, 394 | { 395 | "name": "Sebauh", 396 | "postcodes": [ 397 | "97100" 398 | ] 399 | }, 400 | { 401 | "name": "Sebuyau", 402 | "postcodes": [ 403 | "94850" 404 | ] 405 | }, 406 | { 407 | "name": "Serian", 408 | "postcodes": [ 409 | "94700", 410 | "94707", 411 | "94709", 412 | "94750", 413 | "94760" 414 | ] 415 | }, 416 | { 417 | "name": "Sibu", 418 | "postcodes": [ 419 | "96000", 420 | "96007", 421 | "96008", 422 | "96009" 423 | ] 424 | }, 425 | { 426 | "name": "Sibu Jaya", 427 | "postcodes": [ 428 | "96010" 429 | ] 430 | }, 431 | { 432 | "name": "Siburan", 433 | "postcodes": [ 434 | "94200" 435 | ] 436 | }, 437 | { 438 | "name": "Simunjan", 439 | "postcodes": [ 440 | "94800", 441 | "94807", 442 | "94809" 443 | ] 444 | }, 445 | { 446 | "name": "Song", 447 | "postcodes": [ 448 | "96850" 449 | ] 450 | }, 451 | { 452 | "name": "Spaoh", 453 | "postcodes": [ 454 | "95600" 455 | ] 456 | }, 457 | { 458 | "name": "Sri Aman", 459 | "postcodes": [ 460 | "95000", 461 | "95007", 462 | "95008", 463 | "95009" 464 | ] 465 | }, 466 | { 467 | "name": "Sundar", 468 | "postcodes": [ 469 | "98800" 470 | ] 471 | }, 472 | { 473 | "name": "Tatau", 474 | "postcodes": [ 475 | "97200" 476 | ] 477 | } 478 | ] 479 | } -------------------------------------------------------------------------------- /data/json/states/johor.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Johor", 3 | "code": "JHR", 4 | "cities": [ 5 | { 6 | "name": "Ayer Baloi", 7 | "postcodes": [ 8 | "82100" 9 | ] 10 | }, 11 | { 12 | "name": "Ayer Hitam", 13 | "postcodes": [ 14 | "86100" 15 | ] 16 | }, 17 | { 18 | "name": "Ayer Tawar 2", 19 | "postcodes": [ 20 | "81920" 21 | ] 22 | }, 23 | { 24 | "name": "Bandar Penawar", 25 | "postcodes": [ 26 | "81930", 27 | "81960" 28 | ] 29 | }, 30 | { 31 | "name": "Bandar Tenggara", 32 | "postcodes": [ 33 | "81440" 34 | ] 35 | }, 36 | { 37 | "name": "Batu Anam", 38 | "postcodes": [ 39 | "85100" 40 | ] 41 | }, 42 | { 43 | "name": "Batu Pahat", 44 | "postcodes": [ 45 | "83000", 46 | "83010", 47 | "83020", 48 | "83030", 49 | "83040", 50 | "83050", 51 | "86400" 52 | ] 53 | }, 54 | { 55 | "name": "Bekok", 56 | "postcodes": [ 57 | "86500" 58 | ] 59 | }, 60 | { 61 | "name": "Benut", 62 | "postcodes": [ 63 | "82200" 64 | ] 65 | }, 66 | { 67 | "name": "Bukit Gambir", 68 | "postcodes": [ 69 | "84800" 70 | ] 71 | }, 72 | { 73 | "name": "Bukit Pasir", 74 | "postcodes": [ 75 | "84300" 76 | ] 77 | }, 78 | { 79 | "name": "Chaah", 80 | "postcodes": [ 81 | "85400" 82 | ] 83 | }, 84 | { 85 | "name": "Endau", 86 | "postcodes": [ 87 | "86900", 88 | "86999" 89 | ] 90 | }, 91 | { 92 | "name": "Gelang Patah", 93 | "postcodes": [ 94 | "81550", 95 | "81560" 96 | ] 97 | }, 98 | { 99 | "name": "Gerisek", 100 | "postcodes": [ 101 | "84700", 102 | "84710" 103 | ] 104 | }, 105 | { 106 | "name": "Gugusan Taib Andak", 107 | "postcodes": [ 108 | "81450" 109 | ] 110 | }, 111 | { 112 | "name": "Iskandar Puteri", 113 | "postcodes": [ 114 | "79000", 115 | "79050", 116 | "79100", 117 | "79150", 118 | "79200", 119 | "79250", 120 | "79502", 121 | "79503", 122 | "79504", 123 | "79505", 124 | "79511", 125 | "79513", 126 | "79514", 127 | "79517", 128 | "79518", 129 | "79520", 130 | "79521", 131 | "79523", 132 | "79532", 133 | "79538", 134 | "79540", 135 | "79546", 136 | "79548", 137 | "79550", 138 | "79552", 139 | "79555", 140 | "79570", 141 | "79575", 142 | "79576", 143 | "79592", 144 | "79601", 145 | "79603", 146 | "79605", 147 | "79606", 148 | "79612", 149 | "79626", 150 | "79630", 151 | "79632", 152 | "79646", 153 | "79658", 154 | "79660", 155 | "79680", 156 | "79681", 157 | "79683" 158 | ] 159 | }, 160 | { 161 | "name": "Jementah", 162 | "postcodes": [ 163 | "85200", 164 | "85210" 165 | ] 166 | }, 167 | { 168 | "name": "Johor Bahru", 169 | "postcodes": [ 170 | "80000", 171 | "80050", 172 | "80100", 173 | "80110", 174 | "80150", 175 | "80200", 176 | "80250", 177 | "80300", 178 | "80350", 179 | "80400", 180 | "80500", 181 | "80502", 182 | "80503", 183 | "80504", 184 | "80505", 185 | "80506", 186 | "80508", 187 | "80514", 188 | "80516", 189 | "80517", 190 | "80518", 191 | "80519", 192 | "80520", 193 | "80529", 194 | "80530", 195 | "80532", 196 | "80534", 197 | "80536", 198 | "80538", 199 | "80540", 200 | "80542", 201 | "80546", 202 | "80548", 203 | "80550", 204 | "80552", 205 | "80558", 206 | "80560", 207 | "80564", 208 | "80568", 209 | "80570", 210 | "80576", 211 | "80578", 212 | "80584", 213 | "80586", 214 | "80590", 215 | "80592", 216 | "80594", 217 | "80596", 218 | "80600", 219 | "80604", 220 | "80606", 221 | "80608", 222 | "80610", 223 | "80612", 224 | "80620", 225 | "80622", 226 | "80626", 227 | "80628", 228 | "80630", 229 | "80632", 230 | "80644", 231 | "80646", 232 | "80648", 233 | "80658", 234 | "80660", 235 | "80662", 236 | "80664", 237 | "80668", 238 | "80670", 239 | "80672", 240 | "80673", 241 | "80676", 242 | "80700", 243 | "80710", 244 | "80720", 245 | "80730", 246 | "80750", 247 | "80800", 248 | "80900", 249 | "80902", 250 | "80904", 251 | "80906", 252 | "80908", 253 | "80988", 254 | "80990", 255 | "81100", 256 | "81110", 257 | "81120", 258 | "81200", 259 | "81250", 260 | "81300", 261 | "81310" 262 | ] 263 | }, 264 | { 265 | "name": "Kahang", 266 | "postcodes": [ 267 | "86700" 268 | ] 269 | }, 270 | { 271 | "name": "Kluang", 272 | "postcodes": [ 273 | "86000", 274 | "86007" 275 | ] 276 | }, 277 | { 278 | "name": "Kota Tinggi", 279 | "postcodes": [ 280 | "81900", 281 | "81907", 282 | "81910" 283 | ] 284 | }, 285 | { 286 | "name": "Kukup", 287 | "postcodes": [ 288 | "82300" 289 | ] 290 | }, 291 | { 292 | "name": "Kulai", 293 | "postcodes": [ 294 | "81000", 295 | "81010", 296 | "81020", 297 | "81030", 298 | "81040", 299 | "81050" 300 | ] 301 | }, 302 | { 303 | "name": "Labis", 304 | "postcodes": [ 305 | "85300" 306 | ] 307 | }, 308 | { 309 | "name": "Layang-Layang", 310 | "postcodes": [ 311 | "81850" 312 | ] 313 | }, 314 | { 315 | "name": "Masai", 316 | "postcodes": [ 317 | "81750", 318 | "81760" 319 | ] 320 | }, 321 | { 322 | "name": "Mersing", 323 | "postcodes": [ 324 | "86800", 325 | "86810" 326 | ] 327 | }, 328 | { 329 | "name": "Muar", 330 | "postcodes": [ 331 | "84000", 332 | "84007", 333 | "84010", 334 | "84020", 335 | "84030", 336 | "84040", 337 | "84050", 338 | "84100", 339 | "84200", 340 | "84300", 341 | "84410" 342 | ] 343 | }, 344 | { 345 | "name": "Pagoh", 346 | "postcodes": [ 347 | "84600" 348 | ] 349 | }, 350 | { 351 | "name": "Paloh", 352 | "postcodes": [ 353 | "86600" 354 | ] 355 | }, 356 | { 357 | "name": "Panchor", 358 | "postcodes": [ 359 | "84500" 360 | ] 361 | }, 362 | { 363 | "name": "Parit Jawa", 364 | "postcodes": [ 365 | "84150", 366 | "84160" 367 | ] 368 | }, 369 | { 370 | "name": "Parit Raja", 371 | "postcodes": [ 372 | "86400" 373 | ] 374 | }, 375 | { 376 | "name": "Parit Sulong", 377 | "postcodes": [ 378 | "83500" 379 | ] 380 | }, 381 | { 382 | "name": "Pasir Gudang", 383 | "postcodes": [ 384 | "81700" 385 | ] 386 | }, 387 | { 388 | "name": "Pekan Nenas", 389 | "postcodes": [ 390 | "81500" 391 | ] 392 | }, 393 | { 394 | "name": "Pengerang", 395 | "postcodes": [ 396 | "81600", 397 | "81620", 398 | "81650" 399 | ] 400 | }, 401 | { 402 | "name": "Pontian", 403 | "postcodes": [ 404 | "82000", 405 | "82010", 406 | "82020", 407 | "82030" 408 | ] 409 | }, 410 | { 411 | "name": "Rengam", 412 | "postcodes": [ 413 | "86300" 414 | ] 415 | }, 416 | { 417 | "name": "Rengit", 418 | "postcodes": [ 419 | "83100" 420 | ] 421 | }, 422 | { 423 | "name": "Segamat", 424 | "postcodes": [ 425 | "85000", 426 | "85010", 427 | "85020", 428 | "85030", 429 | "85060", 430 | "85070", 431 | "85080" 432 | ] 433 | }, 434 | { 435 | "name": "Semerah", 436 | "postcodes": [ 437 | "83600", 438 | "83610" 439 | ] 440 | }, 441 | { 442 | "name": "Senai", 443 | "postcodes": [ 444 | "81400", 445 | "81410" 446 | ] 447 | }, 448 | { 449 | "name": "Senggarang", 450 | "postcodes": [ 451 | "83200" 452 | ] 453 | }, 454 | { 455 | "name": "Seri Gading", 456 | "postcodes": [ 457 | "83300" 458 | ] 459 | }, 460 | { 461 | "name": "Seri Medan", 462 | "postcodes": [ 463 | "83400" 464 | ] 465 | }, 466 | { 467 | "name": "Simpang Rengam", 468 | "postcodes": [ 469 | "86200" 470 | ] 471 | }, 472 | { 473 | "name": "Sungai Mati", 474 | "postcodes": [ 475 | "84400", 476 | "84409" 477 | ] 478 | }, 479 | { 480 | "name": "Tangkak", 481 | "postcodes": [ 482 | "84900", 483 | "84990" 484 | ] 485 | }, 486 | { 487 | "name": "Tioman", 488 | "postcodes": [ 489 | "86800" 490 | ] 491 | }, 492 | { 493 | "name": "Ulu Tiram", 494 | "postcodes": [ 495 | "81800", 496 | "81810" 497 | ] 498 | }, 499 | { 500 | "name": "Yong Peng", 501 | "postcodes": [ 502 | "83700", 503 | "83710" 504 | ] 505 | } 506 | ] 507 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Malaysia Postcodes 2 | 3 | A comprehensive, up-to-date database of Malaysian postcodes, cities, and states. Available in both JSON and CSV formats for easy integration into your applications. 4 | 5 | ## Features 6 | 7 | - **2,932 unique postcodes** covering all Malaysian states and federal territories 8 | - **443 cities/areas** across 16 states and territories 9 | - **Multiple formats**: JSON and CSV 10 | - **State-specific files** for optimized loading 11 | - **Well-structured** and easy to use 12 | - **Code examples** in Python, JavaScript, and PHP 13 | - **Free and open source** under CC BY 4.0 license 14 | 15 | ## Quick Start 16 | 17 | ### Option 1: Use JSON (Recommended) 18 | 19 | ```javascript 20 | // Node.js 21 | const postcodes = require('./data/json/postcodes.json'); 22 | 23 | // Find postcodes for a city 24 | postcodes.states.forEach(state => { 25 | state.cities.forEach(city => { 26 | if (city.name === 'Petaling Jaya') { 27 | console.log(city.postcodes); // ['46000', '46050', ...] 28 | } 29 | }); 30 | }); 31 | ``` 32 | 33 | ```python 34 | # Python 35 | import json 36 | 37 | with open('data/json/postcodes.json', 'r') as f: 38 | data = json.load(f) 39 | 40 | # Find postcodes for a city 41 | for state in data['states']: 42 | for city in state['cities']: 43 | if city['name'] == 'Shah Alam': 44 | print(city['postcodes']) # ['40000', '40100', ...] 45 | ``` 46 | 47 | ### Option 2: Use CSV 48 | 49 | ```python 50 | import csv 51 | 52 | with open('data/csv/postcodes.csv', 'r') as f: 53 | reader = csv.DictReader(f) 54 | for row in reader: 55 | print(f"{row['postcode']} - {row['city']}, {row['state']}") 56 | ``` 57 | 58 | ## Data Structure 59 | 60 | ### Directory Layout 61 | 62 | ``` 63 | malaysia-postcodes/ 64 | ├── data/ 65 | │ ├── csv/ 66 | │ │ ├── postcodes.csv # All postcodes in CSV format 67 | │ │ ├── states.csv # State code mappings 68 | │ │ └── states/ # Individual state CSV files 69 | │ │ ├── Johor.csv 70 | │ │ ├── Selangor.csv 71 | │ │ └── ... 72 | │ └── json/ 73 | │ ├── postcodes.json # All postcodes in JSON format 74 | │ └── states/ # Individual state JSON files 75 | │ ├── johor.json 76 | │ ├── selangor.json 77 | │ └── ... 78 | ├── examples/ # Code examples 79 | │ ├── python_example.py 80 | │ ├── javascript_example.js 81 | │ └── php_example.php 82 | └── process_data.py # Data processing script 83 | ``` 84 | 85 | ### JSON Format 86 | 87 | ```json 88 | { 89 | "metadata": { 90 | "version": "2025.1", 91 | "description": "Complete Malaysia postcode database", 92 | "total_states": 16 93 | }, 94 | "states": [ 95 | { 96 | "name": "Selangor", 97 | "code": "SGR", 98 | "cities": [ 99 | { 100 | "name": "Shah Alam", 101 | "postcodes": ["40000", "40100", "40150", ...] 102 | } 103 | ] 104 | } 105 | ] 106 | } 107 | ``` 108 | 109 | ### CSV Format 110 | 111 | ```csv 112 | postcode,city,state,state_code 113 | 40000,Shah Alam,Selangor,SGR 114 | 40100,Shah Alam,Selangor,SGR 115 | 50000,Kuala Lumpur,Wp Kuala Lumpur,KUL 116 | ``` 117 | 118 | ## State Codes 119 | 120 | | Code | State/Territory | 121 | |------|----------------| 122 | | JHR | Johor | 123 | | KDH | Kedah | 124 | | KTN | Kelantan | 125 | | MLK | Melaka | 126 | | NSN | Negeri Sembilan | 127 | | PHG | Pahang | 128 | | PRK | Perak | 129 | | PLS | Perlis | 130 | | PNG | Pulau Pinang | 131 | | SBH | Sabah | 132 | | SGR | Selangor | 133 | | SRW | Sarawak | 134 | | TRG | Terengganu | 135 | | KUL | Wilayah Persekutuan Kuala Lumpur | 136 | | LBN | Wilayah Persekutuan Labuan | 137 | | PJY | Wilayah Persekutuan Putrajaya | 138 | 139 | ## Statistics by State 140 | 141 | | State | Code | Cities | Postcodes | Range | 142 | |-------|------|--------|-----------|-------| 143 | | Johor | JHR | 53 | 236 | 79000 - 86900 | 144 | | Kedah | KDH | 34 | 149 | 05000 - 09810 | 145 | | Kelantan | KTN | 22 | 145 | 15000 - 19800 | 146 | | Melaka | MLK | 16 | 37 | 75000 - 78309 | 147 | | Negeri Sembilan | NSN | 25 | 157 | 70000 - 73509 | 148 | | Pahang | PHG | 38 | 204 | 25000 - 28800 | 149 | | Perak | PRK | 71 | 239 | 30000 - 36810 | 150 | | Perlis | PLS | 6 | 77 | 01000 - 02800 | 151 | | Pulau Pinang | PNG | 22 | 142 | 10000 - 14400 | 152 | | Sabah | SBH | 33 | 410 | 87000 - 91309 | 153 | | Sarawak | SRW | 49 | 228 | 93000 - 98859 | 154 | | Selangor | SGR | 48 | 339 | 40000 - 68100 | 155 | | Terengganu | TRG | 22 | 169 | 20000 - 24300 | 156 | | WP Kuala Lumpur | KUL | 2 | 299 | 50000 - 60000 | 157 | | WP Labuan | LBN | 1 | 27 | 87000 - 87033 | 158 | | WP Putrajaya | PJY | 1 | 74 | 62000 - 62988 | 159 | 160 | ## Common Use Cases 161 | 162 | ### 1. Validate a Postcode 163 | 164 | ```python 165 | def validate_postcode(postcode): 166 | with open('data/csv/postcodes.csv', 'r') as f: 167 | reader = csv.DictReader(f) 168 | for row in reader: 169 | if row['postcode'] == postcode: 170 | return { 171 | 'valid': True, 172 | 'city': row['city'], 173 | 'state': row['state'] 174 | } 175 | return {'valid': False} 176 | 177 | result = validate_postcode('50000') 178 | # {'valid': True, 'city': 'Kuala Lumpur', 'state': 'Wp Kuala Lumpur'} 179 | ``` 180 | 181 | ### 2. Get All Cities in a State 182 | 183 | ```javascript 184 | const data = require('./data/json/postcodes.json'); 185 | 186 | function getCitiesByState(stateCode) { 187 | const state = data.states.find(s => s.code === stateCode); 188 | return state ? state.cities : []; 189 | } 190 | 191 | const selangorCities = getCitiesByState('SGR'); 192 | // Returns array of cities in Selangor 193 | ``` 194 | 195 | ### 3. Address Autocomplete 196 | 197 | ```python 198 | import json 199 | 200 | with open('data/json/postcodes.json', 'r') as f: 201 | data = json.load(f) 202 | 203 | def get_city_by_postcode(postcode): 204 | for state in data['states']: 205 | for city in state['cities']: 206 | if postcode in city['postcodes']: 207 | return { 208 | 'city': city['name'], 209 | 'state': state['name'], 210 | 'state_code': state['code'] 211 | } 212 | return None 213 | 214 | info = get_city_by_postcode('40100') 215 | # {'city': 'Shah Alam', 'state': 'Selangor', 'state_code': 'SGR'} 216 | ``` 217 | 218 | ### 4. Load State-Specific Data 219 | 220 | For applications that only need data for specific states, use the individual state files: 221 | 222 | ```javascript 223 | // Smaller file size, faster loading 224 | const selangor = require('./data/json/states/selangor.json'); 225 | 226 | console.log(`${selangor.name} (${selangor.code})`); 227 | console.log(`Cities: ${selangor.cities.length}`); 228 | ``` 229 | 230 | ## Code Examples 231 | 232 | Check the [`examples/`](examples/) directory for complete working examples: 233 | 234 | - **Python**: [`examples/python_example.py`](examples/python_example.py) 235 | - **JavaScript/Node.js**: [`examples/javascript_example.js`](examples/javascript_example.js) 236 | - **PHP**: [`examples/php_example.php`](examples/php_example.php) 237 | 238 | Run them to see various usage patterns: 239 | 240 | ```bash 241 | # Python 242 | cd examples && python3 python_example.py 243 | 244 | # Node.js 245 | cd examples && node javascript_example.js 246 | 247 | # PHP 248 | cd examples && php php_example.php 249 | ``` 250 | 251 | ## Data Source 252 | 253 | This database is compiled from community-maintained sources: 254 | - Primary source: [AsyrafHussin/malaysia-postcodes](https://github.com/AsyrafHussin/malaysia-postcodes) 255 | - Last updated: 2025 256 | 257 | The data is regularly updated to ensure accuracy. If you find any errors or missing postcodes, please [open an issue](https://github.com/heiswayi/malaysia-postcodes/issues). 258 | 259 | ## Updating the Data 260 | 261 | To regenerate all data files from the latest source: 262 | 263 | ```bash 264 | # Download latest data 265 | curl -o /tmp/malaysia-postcodes-new.json \ 266 | https://raw.githubusercontent.com/AsyrafHussin/malaysia-postcodes/main/all.json 267 | 268 | # Process and generate files 269 | python3 process_data.py 270 | ``` 271 | 272 | This will regenerate: 273 | - All CSV files in `data/csv/` 274 | - All JSON files in `data/json/` 275 | - State-specific files in both formats 276 | 277 | ## API Integration Ideas 278 | 279 | This dataset is perfect for building: 280 | 281 | 1. **Address Validation APIs** - Validate Malaysian addresses 282 | 2. **Postcode Lookup Services** - RESTful API for postcode queries 283 | 3. **E-commerce Platforms** - Shipping and delivery zone calculations 284 | 4. **Form Autocomplete** - Dynamic city/state selection based on postcode 285 | 5. **Logistics Systems** - Route planning and zone management 286 | 6. **Mobile Apps** - Offline postcode lookup 287 | 288 | ### Example REST API Endpoint 289 | 290 | ```javascript 291 | // Express.js example 292 | const express = require('express'); 293 | const postcodes = require('./data/json/postcodes.json'); 294 | 295 | const app = express(); 296 | 297 | app.get('/api/postcode/:code', (req, res) => { 298 | const code = req.params.code; 299 | 300 | for (const state of postcodes.states) { 301 | for (const city of state.cities) { 302 | if (city.postcodes.includes(code)) { 303 | return res.json({ 304 | postcode: code, 305 | city: city.name, 306 | state: state.name, 307 | state_code: state.code 308 | }); 309 | } 310 | } 311 | } 312 | 313 | res.status(404).json({ error: 'Postcode not found' }); 314 | }); 315 | 316 | app.listen(3000); 317 | ``` 318 | 319 | ## Contributing 320 | 321 | Contributions are welcome! If you find any issues or have suggestions: 322 | 323 | 1. Check existing [issues](https://github.com/heiswayi/malaysia-postcodes/issues) 324 | 2. Open a new issue with details 325 | 3. Submit a pull request with fixes or improvements 326 | 327 | ## License 328 | 329 | This repository and its data are licensed under [CC BY 4.0 DEED](https://creativecommons.org/licenses/by/4.0/deed.en). 330 | 331 | You are free to: 332 | - **Share** — copy and redistribute the material 333 | - **Adapt** — remix, transform, and build upon the material for any purpose 334 | 335 | Under the following terms: 336 | - **Attribution** — You must give appropriate credit and link back to this repository 337 | 338 | ## Acknowledgments 339 | 340 | - Original data compilation: [MalaysiaPostcode.com](https://malaysiapostcode.com/) 341 | - Community updates: [AsyrafHussin/malaysia-postcodes](https://github.com/AsyrafHussin/malaysia-postcodes) 342 | - Maintained with contributions from the developer community 343 | 344 | --- 345 | 346 | **Made with ❤️ for Malaysian developers** 347 | 348 | If this repository helped you, please give it a ⭐️ star! 349 | -------------------------------------------------------------------------------- /data/json/states/perak.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Perak", 3 | "code": "PRK", 4 | "cities": [ 5 | { 6 | "name": "Ayer Tawar", 7 | "postcodes": [ 8 | "32400" 9 | ] 10 | }, 11 | { 12 | "name": "Bagan Datoh", 13 | "postcodes": [ 14 | "36100" 15 | ] 16 | }, 17 | { 18 | "name": "Bagan Serai", 19 | "postcodes": [ 20 | "34300", 21 | "34310" 22 | ] 23 | }, 24 | { 25 | "name": "Bandar Seri Iskandar", 26 | "postcodes": [ 27 | "32610" 28 | ] 29 | }, 30 | { 31 | "name": "Batu Gajah", 32 | "postcodes": [ 33 | "31000", 34 | "31007", 35 | "31009" 36 | ] 37 | }, 38 | { 39 | "name": "Batu Kurau", 40 | "postcodes": [ 41 | "34500", 42 | "34510", 43 | "34520" 44 | ] 45 | }, 46 | { 47 | "name": "Behrang Stesen", 48 | "postcodes": [ 49 | "35950" 50 | ] 51 | }, 52 | { 53 | "name": "Bidor", 54 | "postcodes": [ 55 | "35500" 56 | ] 57 | }, 58 | { 59 | "name": "Bota", 60 | "postcodes": [ 61 | "32600" 62 | ] 63 | }, 64 | { 65 | "name": "Bruas", 66 | "postcodes": [ 67 | "32700" 68 | ] 69 | }, 70 | { 71 | "name": "Changkat Jering", 72 | "postcodes": [ 73 | "34850" 74 | ] 75 | }, 76 | { 77 | "name": "Changkat Keruing", 78 | "postcodes": [ 79 | "32500" 80 | ] 81 | }, 82 | { 83 | "name": "Chemor", 84 | "postcodes": [ 85 | "31200" 86 | ] 87 | }, 88 | { 89 | "name": "Chenderiang", 90 | "postcodes": [ 91 | "35300" 92 | ] 93 | }, 94 | { 95 | "name": "Chenderong Balai", 96 | "postcodes": [ 97 | "36600" 98 | ] 99 | }, 100 | { 101 | "name": "Chikus", 102 | "postcodes": [ 103 | "36750" 104 | ] 105 | }, 106 | { 107 | "name": "Enggor", 108 | "postcodes": [ 109 | "33600" 110 | ] 111 | }, 112 | { 113 | "name": "Gerik", 114 | "postcodes": [ 115 | "33300", 116 | "33310", 117 | "33320" 118 | ] 119 | }, 120 | { 121 | "name": "Gopeng", 122 | "postcodes": [ 123 | "31600", 124 | "31610" 125 | ] 126 | }, 127 | { 128 | "name": "Hutan Melintang", 129 | "postcodes": [ 130 | "36400" 131 | ] 132 | }, 133 | { 134 | "name": "Intan", 135 | "postcodes": [ 136 | "33200" 137 | ] 138 | }, 139 | { 140 | "name": "Ipoh", 141 | "postcodes": [ 142 | "30000", 143 | "30010", 144 | "30020", 145 | "30100", 146 | "30200", 147 | "30205", 148 | "30250", 149 | "30300", 150 | "30350", 151 | "30400", 152 | "30450", 153 | "30500", 154 | "30502", 155 | "30503", 156 | "30504", 157 | "30505", 158 | "30506", 159 | "30508", 160 | "30510", 161 | "30512", 162 | "30516", 163 | "30517", 164 | "30518", 165 | "30519", 166 | "30520", 167 | "30524", 168 | "30532", 169 | "30534", 170 | "30536", 171 | "30540", 172 | "30542", 173 | "30546", 174 | "30548", 175 | "30550", 176 | "30551", 177 | "30552", 178 | "30554", 179 | "30556", 180 | "30560", 181 | "30564", 182 | "30570", 183 | "30576", 184 | "30580", 185 | "30582", 186 | "30586", 187 | "30590", 188 | "30592", 189 | "30594", 190 | "30596", 191 | "30600", 192 | "30604", 193 | "30606", 194 | "30609", 195 | "30610", 196 | "30612", 197 | "30614", 198 | "30620", 199 | "30621", 200 | "30622", 201 | "30626", 202 | "30628", 203 | "30630", 204 | "30632", 205 | "30634", 206 | "30644", 207 | "30646", 208 | "30648", 209 | "30656", 210 | "30658", 211 | "30660", 212 | "30661", 213 | "30662", 214 | "30664", 215 | "30668", 216 | "30670", 217 | "30673", 218 | "30674", 219 | "30676", 220 | "30682", 221 | "30690", 222 | "30700", 223 | "30710", 224 | "30720", 225 | "30730", 226 | "30740", 227 | "30750", 228 | "30760", 229 | "30770", 230 | "30780", 231 | "30790", 232 | "30800", 233 | "30810", 234 | "30820", 235 | "30830", 236 | "30840", 237 | "30900", 238 | "30902", 239 | "30904", 240 | "30906", 241 | "30908", 242 | "30910", 243 | "30912", 244 | "30988", 245 | "30990", 246 | "31350", 247 | "31400", 248 | "31407", 249 | "31409", 250 | "31450", 251 | "31500", 252 | "31650", 253 | "31672" 254 | ] 255 | }, 256 | { 257 | "name": "Jeram", 258 | "postcodes": [ 259 | "31850" 260 | ] 261 | }, 262 | { 263 | "name": "Kampar", 264 | "postcodes": [ 265 | "31900", 266 | "31907", 267 | "31909", 268 | "31910", 269 | "31920", 270 | "31950" 271 | ] 272 | }, 273 | { 274 | "name": "Kampung Gajah", 275 | "postcodes": [ 276 | "36800", 277 | "36810" 278 | ] 279 | }, 280 | { 281 | "name": "Kampung Kepayang", 282 | "postcodes": [ 283 | "31300" 284 | ] 285 | }, 286 | { 287 | "name": "Kamunting", 288 | "postcodes": [ 289 | "34600" 290 | ] 291 | }, 292 | { 293 | "name": "Kuala Kangsar", 294 | "postcodes": [ 295 | "33000", 296 | "33007", 297 | "33009", 298 | "33010", 299 | "33020", 300 | "33030", 301 | "33040" 302 | ] 303 | }, 304 | { 305 | "name": "Kuala Kurau", 306 | "postcodes": [ 307 | "34350" 308 | ] 309 | }, 310 | { 311 | "name": "Kuala Sepetang", 312 | "postcodes": [ 313 | "34650" 314 | ] 315 | }, 316 | { 317 | "name": "Lambor Kanan", 318 | "postcodes": [ 319 | "32900", 320 | "32999" 321 | ] 322 | }, 323 | { 324 | "name": "Langkap", 325 | "postcodes": [ 326 | "36700" 327 | ] 328 | }, 329 | { 330 | "name": "Lenggong", 331 | "postcodes": [ 332 | "33400", 333 | "33410", 334 | "33420" 335 | ] 336 | }, 337 | { 338 | "name": "Lumut", 339 | "postcodes": [ 340 | "32200" 341 | ] 342 | }, 343 | { 344 | "name": "Malim Nawar", 345 | "postcodes": [ 346 | "31700" 347 | ] 348 | }, 349 | { 350 | "name": "Manong", 351 | "postcodes": [ 352 | "33800" 353 | ] 354 | }, 355 | { 356 | "name": "Matang", 357 | "postcodes": [ 358 | "34750" 359 | ] 360 | }, 361 | { 362 | "name": "Padang Rengas", 363 | "postcodes": [ 364 | "33700" 365 | ] 366 | }, 367 | { 368 | "name": "Pangkor", 369 | "postcodes": [ 370 | "32300" 371 | ] 372 | }, 373 | { 374 | "name": "Pantai Remis", 375 | "postcodes": [ 376 | "34900", 377 | "34910" 378 | ] 379 | }, 380 | { 381 | "name": "Parit", 382 | "postcodes": [ 383 | "32800", 384 | "32810" 385 | ] 386 | }, 387 | { 388 | "name": "Parit Buntar", 389 | "postcodes": [ 390 | "34200" 391 | ] 392 | }, 393 | { 394 | "name": "Pengkalan Hulu", 395 | "postcodes": [ 396 | "33100" 397 | ] 398 | }, 399 | { 400 | "name": "Pusing", 401 | "postcodes": [ 402 | "31550", 403 | "31560" 404 | ] 405 | }, 406 | { 407 | "name": "Rantau Panjang", 408 | "postcodes": [ 409 | "34140" 410 | ] 411 | }, 412 | { 413 | "name": "Sauk", 414 | "postcodes": [ 415 | "33500" 416 | ] 417 | }, 418 | { 419 | "name": "Selama", 420 | "postcodes": [ 421 | "34100", 422 | "34120", 423 | "34130" 424 | ] 425 | }, 426 | { 427 | "name": "Selekoh", 428 | "postcodes": [ 429 | "36200", 430 | "36207", 431 | "36209" 432 | ] 433 | }, 434 | { 435 | "name": "Seri Manjung", 436 | "postcodes": [ 437 | "32040", 438 | "32050" 439 | ] 440 | }, 441 | { 442 | "name": "Simpang", 443 | "postcodes": [ 444 | "34700" 445 | ] 446 | }, 447 | { 448 | "name": "Simpang Ampat Semanggol", 449 | "postcodes": [ 450 | "34400" 451 | ] 452 | }, 453 | { 454 | "name": "Sitiawan", 455 | "postcodes": [ 456 | "32000", 457 | "32010", 458 | "32020" 459 | ] 460 | }, 461 | { 462 | "name": "Slim River", 463 | "postcodes": [ 464 | "35800", 465 | "35820" 466 | ] 467 | }, 468 | { 469 | "name": "Sungai Siput", 470 | "postcodes": [ 471 | "31050", 472 | "31100", 473 | "31120" 474 | ] 475 | }, 476 | { 477 | "name": "Sungai Sumun", 478 | "postcodes": [ 479 | "36300", 480 | "36307", 481 | "36309" 482 | ] 483 | }, 484 | { 485 | "name": "Sungkai", 486 | "postcodes": [ 487 | "35600" 488 | ] 489 | }, 490 | { 491 | "name": "TLDM Lumut", 492 | "postcodes": [ 493 | "32100" 494 | ] 495 | }, 496 | { 497 | "name": "Taiping", 498 | "postcodes": [ 499 | "34000", 500 | "34007", 501 | "34008", 502 | "34009", 503 | "34010", 504 | "34020", 505 | "34030" 506 | ] 507 | }, 508 | { 509 | "name": "Tanjong Malim", 510 | "postcodes": [ 511 | "35900", 512 | "35907", 513 | "35909", 514 | "35910" 515 | ] 516 | }, 517 | { 518 | "name": "Tanjong Piandang", 519 | "postcodes": [ 520 | "34250" 521 | ] 522 | }, 523 | { 524 | "name": "Tanjong Rambutan", 525 | "postcodes": [ 526 | "31250" 527 | ] 528 | }, 529 | { 530 | "name": "Tanjong Tualang", 531 | "postcodes": [ 532 | "31800" 533 | ] 534 | }, 535 | { 536 | "name": "Tapah", 537 | "postcodes": [ 538 | "35000", 539 | "35007", 540 | "35009" 541 | ] 542 | }, 543 | { 544 | "name": "Tapah Road", 545 | "postcodes": [ 546 | "35400" 547 | ] 548 | }, 549 | { 550 | "name": "Teluk Intan", 551 | "postcodes": [ 552 | "36000", 553 | "36007", 554 | "36008", 555 | "36009", 556 | "36010", 557 | "36020", 558 | "36030", 559 | "36110" 560 | ] 561 | }, 562 | { 563 | "name": "Temoh", 564 | "postcodes": [ 565 | "35350" 566 | ] 567 | }, 568 | { 569 | "name": "Trolak", 570 | "postcodes": [ 571 | "35700" 572 | ] 573 | }, 574 | { 575 | "name": "Trong", 576 | "postcodes": [ 577 | "34800" 578 | ] 579 | }, 580 | { 581 | "name": "Tronoh", 582 | "postcodes": [ 583 | "31750" 584 | ] 585 | }, 586 | { 587 | "name": "Ulu Bernam", 588 | "postcodes": [ 589 | "36500" 590 | ] 591 | }, 592 | { 593 | "name": "Ulu Kinta", 594 | "postcodes": [ 595 | "31150", 596 | "31199" 597 | ] 598 | } 599 | ] 600 | } -------------------------------------------------------------------------------- /data/csv/states/Selangor.csv: -------------------------------------------------------------------------------- 1 | postcode,city,state,state_code 2 | 68000,Ampang,Selangor,SGR 3 | 43650,Bandar Baru Bangi,Selangor,SGR 4 | 42300,Bandar Puncak Alam,Selangor,SGR 5 | 43600,Bangi,Selangor,SGR 6 | 42700,Banting,Selangor,SGR 7 | 45600,Batang Berjuntai,Selangor,SGR 8 | 45607,Batang Berjuntai,Selangor,SGR 9 | 45609,Batang Berjuntai,Selangor,SGR 10 | 45620,Batang Berjuntai,Selangor,SGR 11 | 45630,Batang Berjuntai,Selangor,SGR 12 | 44300,Batang Kali,Selangor,SGR 13 | 44309,Batang Kali,Selangor,SGR 14 | 44330,Batang Kali,Selangor,SGR 15 | 68100,Batu Caves,Selangor,SGR 16 | 43700,Beranang,Selangor,SGR 17 | 43701,Beranang,Selangor,SGR 18 | 45700,Bukit Rotan,Selangor,SGR 19 | 43200,Cheras,Selangor,SGR 20 | 43207,Cheras,Selangor,SGR 21 | 63000,Cyberjaya,Selangor,SGR 22 | 63100,Cyberjaya,Selangor,SGR 23 | 63200,Cyberjaya,Selangor,SGR 24 | 63300,Cyberjaya,Selangor,SGR 25 | 43800,Dengkil,Selangor,SGR 26 | 43807,Dengkil,Selangor,SGR 27 | 43100,Hulu Langat,Selangor,SGR 28 | 42600,Jenjarom,Selangor,SGR 29 | 42610,Jenjarom,Selangor,SGR 30 | 42619,Jenjarom,Selangor,SGR 31 | 45800,Jeram,Selangor,SGR 32 | 64000,KLIA,Selangor,SGR 33 | 43000,Kajang,Selangor,SGR 34 | 43007,Kajang,Selangor,SGR 35 | 43009,Kajang,Selangor,SGR 36 | 43558,Kajang,Selangor,SGR 37 | 42200,Kapar,Selangor,SGR 38 | 42209,Kapar,Selangor,SGR 39 | 44100,Kerling,Selangor,SGR 40 | 41000,Klang,Selangor,SGR 41 | 41050,Klang,Selangor,SGR 42 | 41070,Klang,Selangor,SGR 43 | 41100,Klang,Selangor,SGR 44 | 41150,Klang,Selangor,SGR 45 | 41160,Klang,Selangor,SGR 46 | 41200,Klang,Selangor,SGR 47 | 41205,Klang,Selangor,SGR 48 | 41250,Klang,Selangor,SGR 49 | 41299,Klang,Selangor,SGR 50 | 41300,Klang,Selangor,SGR 51 | 41301,Klang,Selangor,SGR 52 | 41400,Klang,Selangor,SGR 53 | 41500,Klang,Selangor,SGR 54 | 41506,Klang,Selangor,SGR 55 | 41560,Klang,Selangor,SGR 56 | 41586,Klang,Selangor,SGR 57 | 41600,Klang,Selangor,SGR 58 | 41670,Klang,Selangor,SGR 59 | 41672,Klang,Selangor,SGR 60 | 41700,Klang,Selangor,SGR 61 | 41710,Klang,Selangor,SGR 62 | 41720,Klang,Selangor,SGR 63 | 41730,Klang,Selangor,SGR 64 | 41750,Klang,Selangor,SGR 65 | 41780,Klang,Selangor,SGR 66 | 41900,Klang,Selangor,SGR 67 | 41902,Klang,Selangor,SGR 68 | 41904,Klang,Selangor,SGR 69 | 41906,Klang,Selangor,SGR 70 | 41908,Klang,Selangor,SGR 71 | 41910,Klang,Selangor,SGR 72 | 41912,Klang,Selangor,SGR 73 | 41914,Klang,Selangor,SGR 74 | 41916,Klang,Selangor,SGR 75 | 41918,Klang,Selangor,SGR 76 | 41990,Klang,Selangor,SGR 77 | 42100,Klang,Selangor,SGR 78 | 42150,Klang,Selangor,SGR 79 | 44000,Kuala Kubu Baru,Selangor,SGR 80 | 44010,Kuala Kubu Baru,Selangor,SGR 81 | 44020,Kuala Kubu Baru,Selangor,SGR 82 | 44110,Kuala Kubu Baru,Selangor,SGR 83 | 45000,Kuala Selangor,Selangor,SGR 84 | 45010,Kuala Selangor,Selangor,SGR 85 | 42000,Pelabuhan Klang,Selangor,SGR 86 | 42007,Pelabuhan Klang,Selangor,SGR 87 | 42008,Pelabuhan Klang,Selangor,SGR 88 | 42009,Pelabuhan Klang,Selangor,SGR 89 | 46000,Petaling Jaya,Selangor,SGR 90 | 46040,Petaling Jaya,Selangor,SGR 91 | 46050,Petaling Jaya,Selangor,SGR 92 | 46080,Petaling Jaya,Selangor,SGR 93 | 46100,Petaling Jaya,Selangor,SGR 94 | 46150,Petaling Jaya,Selangor,SGR 95 | 46160,Petaling Jaya,Selangor,SGR 96 | 46200,Petaling Jaya,Selangor,SGR 97 | 46300,Petaling Jaya,Selangor,SGR 98 | 46350,Petaling Jaya,Selangor,SGR 99 | 46400,Petaling Jaya,Selangor,SGR 100 | 46460,Petaling Jaya,Selangor,SGR 101 | 46500,Petaling Jaya,Selangor,SGR 102 | 46505,Petaling Jaya,Selangor,SGR 103 | 46506,Petaling Jaya,Selangor,SGR 104 | 46510,Petaling Jaya,Selangor,SGR 105 | 46547,Petaling Jaya,Selangor,SGR 106 | 46549,Petaling Jaya,Selangor,SGR 107 | 46551,Petaling Jaya,Selangor,SGR 108 | 46564,Petaling Jaya,Selangor,SGR 109 | 46582,Petaling Jaya,Selangor,SGR 110 | 46598,Petaling Jaya,Selangor,SGR 111 | 46662,Petaling Jaya,Selangor,SGR 112 | 46667,Petaling Jaya,Selangor,SGR 113 | 46668,Petaling Jaya,Selangor,SGR 114 | 46672,Petaling Jaya,Selangor,SGR 115 | 46675,Petaling Jaya,Selangor,SGR 116 | 46692,Petaling Jaya,Selangor,SGR 117 | 46700,Petaling Jaya,Selangor,SGR 118 | 46710,Petaling Jaya,Selangor,SGR 119 | 46720,Petaling Jaya,Selangor,SGR 120 | 46730,Petaling Jaya,Selangor,SGR 121 | 46740,Petaling Jaya,Selangor,SGR 122 | 46750,Petaling Jaya,Selangor,SGR 123 | 46760,Petaling Jaya,Selangor,SGR 124 | 46770,Petaling Jaya,Selangor,SGR 125 | 46780,Petaling Jaya,Selangor,SGR 126 | 46781,Petaling Jaya,Selangor,SGR 127 | 46782,Petaling Jaya,Selangor,SGR 128 | 46783,Petaling Jaya,Selangor,SGR 129 | 46784,Petaling Jaya,Selangor,SGR 130 | 46785,Petaling Jaya,Selangor,SGR 131 | 46786,Petaling Jaya,Selangor,SGR 132 | 46787,Petaling Jaya,Selangor,SGR 133 | 46788,Petaling Jaya,Selangor,SGR 134 | 46789,Petaling Jaya,Selangor,SGR 135 | 46790,Petaling Jaya,Selangor,SGR 136 | 46791,Petaling Jaya,Selangor,SGR 137 | 46792,Petaling Jaya,Selangor,SGR 138 | 46793,Petaling Jaya,Selangor,SGR 139 | 46794,Petaling Jaya,Selangor,SGR 140 | 46795,Petaling Jaya,Selangor,SGR 141 | 46796,Petaling Jaya,Selangor,SGR 142 | 46797,Petaling Jaya,Selangor,SGR 143 | 46798,Petaling Jaya,Selangor,SGR 144 | 46799,Petaling Jaya,Selangor,SGR 145 | 46800,Petaling Jaya,Selangor,SGR 146 | 46801,Petaling Jaya,Selangor,SGR 147 | 46802,Petaling Jaya,Selangor,SGR 148 | 46803,Petaling Jaya,Selangor,SGR 149 | 46804,Petaling Jaya,Selangor,SGR 150 | 46805,Petaling Jaya,Selangor,SGR 151 | 46806,Petaling Jaya,Selangor,SGR 152 | 46860,Petaling Jaya,Selangor,SGR 153 | 46870,Petaling Jaya,Selangor,SGR 154 | 46960,Petaling Jaya,Selangor,SGR 155 | 46962,Petaling Jaya,Selangor,SGR 156 | 46964,Petaling Jaya,Selangor,SGR 157 | 46966,Petaling Jaya,Selangor,SGR 158 | 46968,Petaling Jaya,Selangor,SGR 159 | 46970,Petaling Jaya,Selangor,SGR 160 | 46972,Petaling Jaya,Selangor,SGR 161 | 46974,Petaling Jaya,Selangor,SGR 162 | 46976,Petaling Jaya,Selangor,SGR 163 | 46978,Petaling Jaya,Selangor,SGR 164 | 46990,Petaling Jaya,Selangor,SGR 165 | 47300,Petaling Jaya,Selangor,SGR 166 | 47301,Petaling Jaya,Selangor,SGR 167 | 47304,Petaling Jaya,Selangor,SGR 168 | 47307,Petaling Jaya,Selangor,SGR 169 | 47308,Petaling Jaya,Selangor,SGR 170 | 47309,Petaling Jaya,Selangor,SGR 171 | 47310,Petaling Jaya,Selangor,SGR 172 | 47400,Petaling Jaya,Selangor,SGR 173 | 47410,Petaling Jaya,Selangor,SGR 174 | 47430,Petaling Jaya,Selangor,SGR 175 | 47800,Petaling Jaya,Selangor,SGR 176 | 47801,Petaling Jaya,Selangor,SGR 177 | 47810,Petaling Jaya,Selangor,SGR 178 | 47820,Petaling Jaya,Selangor,SGR 179 | 47829,Petaling Jaya,Selangor,SGR 180 | 47830,Petaling Jaya,Selangor,SGR 181 | 47850,Petaling Jaya,Selangor,SGR 182 | 47100,Puchong,Selangor,SGR 183 | 47110,Puchong,Selangor,SGR 184 | 47120,Puchong,Selangor,SGR 185 | 47130,Puchong,Selangor,SGR 186 | 47140,Puchong,Selangor,SGR 187 | 47150,Puchong,Selangor,SGR 188 | 47160,Puchong,Selangor,SGR 189 | 47170,Puchong,Selangor,SGR 190 | 47180,Puchong,Selangor,SGR 191 | 47190,Puchong,Selangor,SGR 192 | 42960,Pulau Carey,Selangor,SGR 193 | 42999,Pulau Carey,Selangor,SGR 194 | 42900,Pulau Indah,Selangor,SGR 195 | 42907,Pulau Indah,Selangor,SGR 196 | 42920,Pulau Indah,Selangor,SGR 197 | 42940,Pulau Ketam,Selangor,SGR 198 | 44200,Rasa,Selangor,SGR 199 | 48000,Rawang,Selangor,SGR 200 | 48009,Rawang,Selangor,SGR 201 | 48010,Rawang,Selangor,SGR 202 | 48020,Rawang,Selangor,SGR 203 | 48050,Rawang,Selangor,SGR 204 | 48100,Rawang,Selangor,SGR 205 | 48300,Rawang,Selangor,SGR 206 | 48302,Rawang,Selangor,SGR 207 | 45200,Sabak Bernam,Selangor,SGR 208 | 45207,Sabak Bernam,Selangor,SGR 209 | 45209,Sabak Bernam,Selangor,SGR 210 | 45400,Sekinchan,Selangor,SGR 211 | 43500,Semenyih,Selangor,SGR 212 | 43900,Sepang,Selangor,SGR 213 | 43400,Serdang,Selangor,SGR 214 | 48200,Serendah,Selangor,SGR 215 | 48250,Serendah,Selangor,SGR 216 | 43300,Seri Kembangan,Selangor,SGR 217 | 43399,Seri Kembangan,Selangor,SGR 218 | 40000,Shah Alam,Selangor,SGR 219 | 40100,Shah Alam,Selangor,SGR 220 | 40140,Shah Alam,Selangor,SGR 221 | 40150,Shah Alam,Selangor,SGR 222 | 40160,Shah Alam,Selangor,SGR 223 | 40169,Shah Alam,Selangor,SGR 224 | 40170,Shah Alam,Selangor,SGR 225 | 40179,Shah Alam,Selangor,SGR 226 | 40200,Shah Alam,Selangor,SGR 227 | 40250,Shah Alam,Selangor,SGR 228 | 40300,Shah Alam,Selangor,SGR 229 | 40350,Shah Alam,Selangor,SGR 230 | 40400,Shah Alam,Selangor,SGR 231 | 40409,Shah Alam,Selangor,SGR 232 | 40410,Shah Alam,Selangor,SGR 233 | 40440,Shah Alam,Selangor,SGR 234 | 40450,Shah Alam,Selangor,SGR 235 | 40460,Shah Alam,Selangor,SGR 236 | 40470,Shah Alam,Selangor,SGR 237 | 40490,Shah Alam,Selangor,SGR 238 | 40500,Shah Alam,Selangor,SGR 239 | 40502,Shah Alam,Selangor,SGR 240 | 40503,Shah Alam,Selangor,SGR 241 | 40505,Shah Alam,Selangor,SGR 242 | 40512,Shah Alam,Selangor,SGR 243 | 40517,Shah Alam,Selangor,SGR 244 | 40520,Shah Alam,Selangor,SGR 245 | 40529,Shah Alam,Selangor,SGR 246 | 40542,Shah Alam,Selangor,SGR 247 | 40548,Shah Alam,Selangor,SGR 248 | 40550,Shah Alam,Selangor,SGR 249 | 40551,Shah Alam,Selangor,SGR 250 | 40560,Shah Alam,Selangor,SGR 251 | 40564,Shah Alam,Selangor,SGR 252 | 40570,Shah Alam,Selangor,SGR 253 | 40572,Shah Alam,Selangor,SGR 254 | 40576,Shah Alam,Selangor,SGR 255 | 40578,Shah Alam,Selangor,SGR 256 | 40582,Shah Alam,Selangor,SGR 257 | 40590,Shah Alam,Selangor,SGR 258 | 40592,Shah Alam,Selangor,SGR 259 | 40594,Shah Alam,Selangor,SGR 260 | 40596,Shah Alam,Selangor,SGR 261 | 40598,Shah Alam,Selangor,SGR 262 | 40600,Shah Alam,Selangor,SGR 263 | 40604,Shah Alam,Selangor,SGR 264 | 40607,Shah Alam,Selangor,SGR 265 | 40608,Shah Alam,Selangor,SGR 266 | 40610,Shah Alam,Selangor,SGR 267 | 40612,Shah Alam,Selangor,SGR 268 | 40620,Shah Alam,Selangor,SGR 269 | 40622,Shah Alam,Selangor,SGR 270 | 40626,Shah Alam,Selangor,SGR 271 | 40630,Shah Alam,Selangor,SGR 272 | 40632,Shah Alam,Selangor,SGR 273 | 40646,Shah Alam,Selangor,SGR 274 | 40648,Shah Alam,Selangor,SGR 275 | 40650,Shah Alam,Selangor,SGR 276 | 40660,Shah Alam,Selangor,SGR 277 | 40664,Shah Alam,Selangor,SGR 278 | 40670,Shah Alam,Selangor,SGR 279 | 40672,Shah Alam,Selangor,SGR 280 | 40673,Shah Alam,Selangor,SGR 281 | 40674,Shah Alam,Selangor,SGR 282 | 40675,Shah Alam,Selangor,SGR 283 | 40676,Shah Alam,Selangor,SGR 284 | 40680,Shah Alam,Selangor,SGR 285 | 40690,Shah Alam,Selangor,SGR 286 | 40700,Shah Alam,Selangor,SGR 287 | 40702,Shah Alam,Selangor,SGR 288 | 40704,Shah Alam,Selangor,SGR 289 | 40706,Shah Alam,Selangor,SGR 290 | 40708,Shah Alam,Selangor,SGR 291 | 40710,Shah Alam,Selangor,SGR 292 | 40712,Shah Alam,Selangor,SGR 293 | 40714,Shah Alam,Selangor,SGR 294 | 40716,Shah Alam,Selangor,SGR 295 | 40718,Shah Alam,Selangor,SGR 296 | 40720,Shah Alam,Selangor,SGR 297 | 40722,Shah Alam,Selangor,SGR 298 | 40724,Shah Alam,Selangor,SGR 299 | 40726,Shah Alam,Selangor,SGR 300 | 40728,Shah Alam,Selangor,SGR 301 | 40730,Shah Alam,Selangor,SGR 302 | 40732,Shah Alam,Selangor,SGR 303 | 40800,Shah Alam,Selangor,SGR 304 | 40802,Shah Alam,Selangor,SGR 305 | 40804,Shah Alam,Selangor,SGR 306 | 40806,Shah Alam,Selangor,SGR 307 | 40808,Shah Alam,Selangor,SGR 308 | 40810,Shah Alam,Selangor,SGR 309 | 40900,Shah Alam,Selangor,SGR 310 | 40912,Shah Alam,Selangor,SGR 311 | 40915,Shah Alam,Selangor,SGR 312 | 40990,Shah Alam,Selangor,SGR 313 | 42450,Shah Alam,Selangor,SGR 314 | 47200,Subang Airport,Selangor,SGR 315 | 47210,Subang Airport,Selangor,SGR 316 | 47500,Subang Jaya,Selangor,SGR 317 | 47507,Subang Jaya,Selangor,SGR 318 | 47510,Subang Jaya,Selangor,SGR 319 | 47600,Subang Jaya,Selangor,SGR 320 | 47601,Subang Jaya,Selangor,SGR 321 | 47610,Subang Jaya,Selangor,SGR 322 | 47618,Subang Jaya,Selangor,SGR 323 | 47620,Subang Jaya,Selangor,SGR 324 | 47630,Subang Jaya,Selangor,SGR 325 | 47640,Subang Jaya,Selangor,SGR 326 | 47650,Subang Jaya,Selangor,SGR 327 | 55555,Subang Jaya,Selangor,SGR 328 | 45100,Sungai Ayer Tawar,Selangor,SGR 329 | 45300,Sungai Besar,Selangor,SGR 330 | 47000,Sungai Buloh,Selangor,SGR 331 | 47020,Sungai Buloh,Selangor,SGR 332 | 47031,Sungai Buloh,Selangor,SGR 333 | 43950,Sungai Pelek,Selangor,SGR 334 | 43999,Sungai Pelek,Selangor,SGR 335 | 45500,Tanjong Karang,Selangor,SGR 336 | 42800,Tanjong Sepat,Selangor,SGR 337 | 42425,Telok Panglima Garang,Selangor,SGR 338 | 42500,Telok Panglima Garang,Selangor,SGR 339 | 42507,Telok Panglima Garang,Selangor,SGR 340 | 42509,Telok Panglima Garang,Selangor,SGR 341 | -------------------------------------------------------------------------------- /data/json/states/selangor.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Selangor", 3 | "code": "SGR", 4 | "cities": [ 5 | { 6 | "name": "Ampang", 7 | "postcodes": [ 8 | "68000" 9 | ] 10 | }, 11 | { 12 | "name": "Bandar Baru Bangi", 13 | "postcodes": [ 14 | "43650" 15 | ] 16 | }, 17 | { 18 | "name": "Bandar Puncak Alam", 19 | "postcodes": [ 20 | "42300" 21 | ] 22 | }, 23 | { 24 | "name": "Bangi", 25 | "postcodes": [ 26 | "43600" 27 | ] 28 | }, 29 | { 30 | "name": "Banting", 31 | "postcodes": [ 32 | "42700" 33 | ] 34 | }, 35 | { 36 | "name": "Batang Berjuntai", 37 | "postcodes": [ 38 | "45600", 39 | "45607", 40 | "45609", 41 | "45620", 42 | "45630" 43 | ] 44 | }, 45 | { 46 | "name": "Batang Kali", 47 | "postcodes": [ 48 | "44300", 49 | "44309", 50 | "44330" 51 | ] 52 | }, 53 | { 54 | "name": "Batu Caves", 55 | "postcodes": [ 56 | "68100" 57 | ] 58 | }, 59 | { 60 | "name": "Beranang", 61 | "postcodes": [ 62 | "43700", 63 | "43701" 64 | ] 65 | }, 66 | { 67 | "name": "Bukit Rotan", 68 | "postcodes": [ 69 | "45700" 70 | ] 71 | }, 72 | { 73 | "name": "Cheras", 74 | "postcodes": [ 75 | "43200", 76 | "43207" 77 | ] 78 | }, 79 | { 80 | "name": "Cyberjaya", 81 | "postcodes": [ 82 | "63000", 83 | "63100", 84 | "63200", 85 | "63300" 86 | ] 87 | }, 88 | { 89 | "name": "Dengkil", 90 | "postcodes": [ 91 | "43800", 92 | "43807" 93 | ] 94 | }, 95 | { 96 | "name": "Hulu Langat", 97 | "postcodes": [ 98 | "43100" 99 | ] 100 | }, 101 | { 102 | "name": "Jenjarom", 103 | "postcodes": [ 104 | "42600", 105 | "42610", 106 | "42619" 107 | ] 108 | }, 109 | { 110 | "name": "Jeram", 111 | "postcodes": [ 112 | "45800" 113 | ] 114 | }, 115 | { 116 | "name": "KLIA", 117 | "postcodes": [ 118 | "64000" 119 | ] 120 | }, 121 | { 122 | "name": "Kajang", 123 | "postcodes": [ 124 | "43000", 125 | "43007", 126 | "43009", 127 | "43558" 128 | ] 129 | }, 130 | { 131 | "name": "Kapar", 132 | "postcodes": [ 133 | "42200", 134 | "42209" 135 | ] 136 | }, 137 | { 138 | "name": "Kerling", 139 | "postcodes": [ 140 | "44100" 141 | ] 142 | }, 143 | { 144 | "name": "Klang", 145 | "postcodes": [ 146 | "41000", 147 | "41050", 148 | "41070", 149 | "41100", 150 | "41150", 151 | "41160", 152 | "41200", 153 | "41205", 154 | "41250", 155 | "41299", 156 | "41300", 157 | "41301", 158 | "41400", 159 | "41500", 160 | "41506", 161 | "41560", 162 | "41586", 163 | "41600", 164 | "41670", 165 | "41672", 166 | "41700", 167 | "41710", 168 | "41720", 169 | "41730", 170 | "41750", 171 | "41780", 172 | "41900", 173 | "41902", 174 | "41904", 175 | "41906", 176 | "41908", 177 | "41910", 178 | "41912", 179 | "41914", 180 | "41916", 181 | "41918", 182 | "41990", 183 | "42100", 184 | "42150" 185 | ] 186 | }, 187 | { 188 | "name": "Kuala Kubu Baru", 189 | "postcodes": [ 190 | "44000", 191 | "44010", 192 | "44020", 193 | "44110" 194 | ] 195 | }, 196 | { 197 | "name": "Kuala Selangor", 198 | "postcodes": [ 199 | "45000", 200 | "45010" 201 | ] 202 | }, 203 | { 204 | "name": "Pelabuhan Klang", 205 | "postcodes": [ 206 | "42000", 207 | "42007", 208 | "42008", 209 | "42009" 210 | ] 211 | }, 212 | { 213 | "name": "Petaling Jaya", 214 | "postcodes": [ 215 | "46000", 216 | "46040", 217 | "46050", 218 | "46080", 219 | "46100", 220 | "46150", 221 | "46160", 222 | "46200", 223 | "46300", 224 | "46350", 225 | "46400", 226 | "46460", 227 | "46500", 228 | "46505", 229 | "46506", 230 | "46510", 231 | "46547", 232 | "46549", 233 | "46551", 234 | "46564", 235 | "46582", 236 | "46598", 237 | "46662", 238 | "46667", 239 | "46668", 240 | "46672", 241 | "46675", 242 | "46692", 243 | "46700", 244 | "46710", 245 | "46720", 246 | "46730", 247 | "46740", 248 | "46750", 249 | "46760", 250 | "46770", 251 | "46780", 252 | "46781", 253 | "46782", 254 | "46783", 255 | "46784", 256 | "46785", 257 | "46786", 258 | "46787", 259 | "46788", 260 | "46789", 261 | "46790", 262 | "46791", 263 | "46792", 264 | "46793", 265 | "46794", 266 | "46795", 267 | "46796", 268 | "46797", 269 | "46798", 270 | "46799", 271 | "46800", 272 | "46801", 273 | "46802", 274 | "46803", 275 | "46804", 276 | "46805", 277 | "46806", 278 | "46860", 279 | "46870", 280 | "46960", 281 | "46962", 282 | "46964", 283 | "46966", 284 | "46968", 285 | "46970", 286 | "46972", 287 | "46974", 288 | "46976", 289 | "46978", 290 | "46990", 291 | "47300", 292 | "47301", 293 | "47304", 294 | "47307", 295 | "47308", 296 | "47309", 297 | "47310", 298 | "47400", 299 | "47410", 300 | "47430", 301 | "47800", 302 | "47801", 303 | "47810", 304 | "47820", 305 | "47829", 306 | "47830", 307 | "47850" 308 | ] 309 | }, 310 | { 311 | "name": "Puchong", 312 | "postcodes": [ 313 | "47100", 314 | "47110", 315 | "47120", 316 | "47130", 317 | "47140", 318 | "47150", 319 | "47160", 320 | "47170", 321 | "47180", 322 | "47190" 323 | ] 324 | }, 325 | { 326 | "name": "Pulau Carey", 327 | "postcodes": [ 328 | "42960", 329 | "42999" 330 | ] 331 | }, 332 | { 333 | "name": "Pulau Indah", 334 | "postcodes": [ 335 | "42900", 336 | "42907", 337 | "42920" 338 | ] 339 | }, 340 | { 341 | "name": "Pulau Ketam", 342 | "postcodes": [ 343 | "42940" 344 | ] 345 | }, 346 | { 347 | "name": "Rasa", 348 | "postcodes": [ 349 | "44200" 350 | ] 351 | }, 352 | { 353 | "name": "Rawang", 354 | "postcodes": [ 355 | "48000", 356 | "48009", 357 | "48010", 358 | "48020", 359 | "48050", 360 | "48100", 361 | "48300", 362 | "48302" 363 | ] 364 | }, 365 | { 366 | "name": "Sabak Bernam", 367 | "postcodes": [ 368 | "45200", 369 | "45207", 370 | "45209" 371 | ] 372 | }, 373 | { 374 | "name": "Sekinchan", 375 | "postcodes": [ 376 | "45400" 377 | ] 378 | }, 379 | { 380 | "name": "Semenyih", 381 | "postcodes": [ 382 | "43500" 383 | ] 384 | }, 385 | { 386 | "name": "Sepang", 387 | "postcodes": [ 388 | "43900" 389 | ] 390 | }, 391 | { 392 | "name": "Serdang", 393 | "postcodes": [ 394 | "43400" 395 | ] 396 | }, 397 | { 398 | "name": "Serendah", 399 | "postcodes": [ 400 | "48200", 401 | "48250" 402 | ] 403 | }, 404 | { 405 | "name": "Seri Kembangan", 406 | "postcodes": [ 407 | "43300", 408 | "43399" 409 | ] 410 | }, 411 | { 412 | "name": "Shah Alam", 413 | "postcodes": [ 414 | "40000", 415 | "40100", 416 | "40140", 417 | "40150", 418 | "40160", 419 | "40169", 420 | "40170", 421 | "40179", 422 | "40200", 423 | "40250", 424 | "40300", 425 | "40350", 426 | "40400", 427 | "40409", 428 | "40410", 429 | "40440", 430 | "40450", 431 | "40460", 432 | "40470", 433 | "40490", 434 | "40500", 435 | "40502", 436 | "40503", 437 | "40505", 438 | "40512", 439 | "40517", 440 | "40520", 441 | "40529", 442 | "40542", 443 | "40548", 444 | "40550", 445 | "40551", 446 | "40560", 447 | "40564", 448 | "40570", 449 | "40572", 450 | "40576", 451 | "40578", 452 | "40582", 453 | "40590", 454 | "40592", 455 | "40594", 456 | "40596", 457 | "40598", 458 | "40600", 459 | "40604", 460 | "40607", 461 | "40608", 462 | "40610", 463 | "40612", 464 | "40620", 465 | "40622", 466 | "40626", 467 | "40630", 468 | "40632", 469 | "40646", 470 | "40648", 471 | "40650", 472 | "40660", 473 | "40664", 474 | "40670", 475 | "40672", 476 | "40673", 477 | "40674", 478 | "40675", 479 | "40676", 480 | "40680", 481 | "40690", 482 | "40700", 483 | "40702", 484 | "40704", 485 | "40706", 486 | "40708", 487 | "40710", 488 | "40712", 489 | "40714", 490 | "40716", 491 | "40718", 492 | "40720", 493 | "40722", 494 | "40724", 495 | "40726", 496 | "40728", 497 | "40730", 498 | "40732", 499 | "40800", 500 | "40802", 501 | "40804", 502 | "40806", 503 | "40808", 504 | "40810", 505 | "40900", 506 | "40912", 507 | "40915", 508 | "40990", 509 | "42450" 510 | ] 511 | }, 512 | { 513 | "name": "Subang Airport", 514 | "postcodes": [ 515 | "47200", 516 | "47210" 517 | ] 518 | }, 519 | { 520 | "name": "Subang Jaya", 521 | "postcodes": [ 522 | "47500", 523 | "47507", 524 | "47510", 525 | "47600", 526 | "47601", 527 | "47610", 528 | "47618", 529 | "47620", 530 | "47630", 531 | "47640", 532 | "47650", 533 | "55555" 534 | ] 535 | }, 536 | { 537 | "name": "Sungai Ayer Tawar", 538 | "postcodes": [ 539 | "45100" 540 | ] 541 | }, 542 | { 543 | "name": "Sungai Besar", 544 | "postcodes": [ 545 | "45300" 546 | ] 547 | }, 548 | { 549 | "name": "Sungai Buloh", 550 | "postcodes": [ 551 | "47000", 552 | "47020", 553 | "47031" 554 | ] 555 | }, 556 | { 557 | "name": "Sungai Pelek", 558 | "postcodes": [ 559 | "43950", 560 | "43999" 561 | ] 562 | }, 563 | { 564 | "name": "Tanjong Karang", 565 | "postcodes": [ 566 | "45500" 567 | ] 568 | }, 569 | { 570 | "name": "Tanjong Sepat", 571 | "postcodes": [ 572 | "42800" 573 | ] 574 | }, 575 | { 576 | "name": "Telok Panglima Garang", 577 | "postcodes": [ 578 | "42425", 579 | "42500", 580 | "42507", 581 | "42509" 582 | ] 583 | } 584 | ] 585 | } -------------------------------------------------------------------------------- /data/json/states/sabah.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Sabah", 3 | "code": "SBH", 4 | "cities": [ 5 | { 6 | "name": "Beaufort", 7 | "postcodes": [ 8 | "89800", 9 | "89807", 10 | "89808", 11 | "89809" 12 | ] 13 | }, 14 | { 15 | "name": "Beluran", 16 | "postcodes": [ 17 | "90100", 18 | "90107", 19 | "90109" 20 | ] 21 | }, 22 | { 23 | "name": "Beverly", 24 | "postcodes": [ 25 | "88700", 26 | "89260" 27 | ] 28 | }, 29 | { 30 | "name": "Bongawan", 31 | "postcodes": [ 32 | "89700", 33 | "89707", 34 | "89708", 35 | "89709" 36 | ] 37 | }, 38 | { 39 | "name": "Inanam", 40 | "postcodes": [ 41 | "88857" 42 | ] 43 | }, 44 | { 45 | "name": "Keningau", 46 | "postcodes": [ 47 | "89000", 48 | "89007", 49 | "89008", 50 | "89009" 51 | ] 52 | }, 53 | { 54 | "name": "Kota Belud", 55 | "postcodes": [ 56 | "89150", 57 | "89157", 58 | "89158", 59 | "89159" 60 | ] 61 | }, 62 | { 63 | "name": "Kota Kinabalu", 64 | "postcodes": [ 65 | "88000", 66 | "88100", 67 | "88110", 68 | "88150", 69 | "88200", 70 | "88220", 71 | "88300", 72 | "88400", 73 | "88450", 74 | "88458", 75 | "88460", 76 | "88500", 77 | "88502", 78 | "88504", 79 | "88505", 80 | "88506", 81 | "88508", 82 | "88510", 83 | "88512", 84 | "88514", 85 | "88516", 86 | "88518", 87 | "88520", 88 | "88526", 89 | "88527", 90 | "88532", 91 | "88534", 92 | "88538", 93 | "88540", 94 | "88546", 95 | "88550", 96 | "88551", 97 | "88552", 98 | "88554", 99 | "88556", 100 | "88558", 101 | "88560", 102 | "88562", 103 | "88564", 104 | "88566", 105 | "88568", 106 | "88570", 107 | "88572", 108 | "88576", 109 | "88580", 110 | "88582", 111 | "88586", 112 | "88590", 113 | "88592", 114 | "88594", 115 | "88596", 116 | "88598", 117 | "88600", 118 | "88602", 119 | "88604", 120 | "88606", 121 | "88608", 122 | "88609", 123 | "88610", 124 | "88612", 125 | "88614", 126 | "88617", 127 | "88618", 128 | "88620", 129 | "88621", 130 | "88622", 131 | "88624", 132 | "88626", 133 | "88628", 134 | "88630", 135 | "88632", 136 | "88634", 137 | "88644", 138 | "88646", 139 | "88648", 140 | "88656", 141 | "88658", 142 | "88660", 143 | "88661", 144 | "88662", 145 | "88670", 146 | "88672", 147 | "88673", 148 | "88675", 149 | "88676", 150 | "88680", 151 | "88690", 152 | "88740", 153 | "88757", 154 | "88758", 155 | "88759", 156 | "88760", 157 | "88761", 158 | "88762", 159 | "88763", 160 | "88764", 161 | "88765", 162 | "88766", 163 | "88767", 164 | "88768", 165 | "88769", 166 | "88770", 167 | "88771", 168 | "88772", 169 | "88773", 170 | "88774", 171 | "88775", 172 | "88776", 173 | "88777", 174 | "88778", 175 | "88779", 176 | "88780", 177 | "88781", 178 | "88782", 179 | "88783", 180 | "88784", 181 | "88785", 182 | "88786", 183 | "88787", 184 | "88788", 185 | "88789", 186 | "88790", 187 | "88800", 188 | "88801", 189 | "88802", 190 | "88803", 191 | "88804", 192 | "88805", 193 | "88806", 194 | "88807", 195 | "88808", 196 | "88809", 197 | "88810", 198 | "88811", 199 | "88812", 200 | "88813", 201 | "88814", 202 | "88815", 203 | "88816", 204 | "88817", 205 | "88818", 206 | "88819", 207 | "88820", 208 | "88821", 209 | "88822", 210 | "88823", 211 | "88824", 212 | "88825", 213 | "88826", 214 | "88827", 215 | "88828", 216 | "88829", 217 | "88830", 218 | "88831", 219 | "88832", 220 | "88833", 221 | "88834", 222 | "88835", 223 | "88836", 224 | "88837", 225 | "88838", 226 | "88839", 227 | "88840", 228 | "88841", 229 | "88842", 230 | "88843", 231 | "88844", 232 | "88845", 233 | "88846", 234 | "88847", 235 | "88848", 236 | "88849", 237 | "88850", 238 | "88851", 239 | "88852", 240 | "88853", 241 | "88854", 242 | "88855", 243 | "88860", 244 | "88861", 245 | "88862", 246 | "88863", 247 | "88865", 248 | "88866", 249 | "88867", 250 | "88868", 251 | "88869", 252 | "88870", 253 | "88871", 254 | "88872", 255 | "88873", 256 | "88874", 257 | "88875", 258 | "88900", 259 | "88901", 260 | "88902", 261 | "88903", 262 | "88904", 263 | "88905", 264 | "88906", 265 | "88988", 266 | "88990", 267 | "88991", 268 | "88992", 269 | "88993", 270 | "88994", 271 | "88995", 272 | "88996", 273 | "88997", 274 | "88998", 275 | "88999" 276 | ] 277 | }, 278 | { 279 | "name": "Kota Kinabatangan", 280 | "postcodes": [ 281 | "90200" 282 | ] 283 | }, 284 | { 285 | "name": "Kota Marudu", 286 | "postcodes": [ 287 | "89100", 288 | "89107", 289 | "89108", 290 | "89109" 291 | ] 292 | }, 293 | { 294 | "name": "Kuala Penyu", 295 | "postcodes": [ 296 | "89740", 297 | "89747", 298 | "89748", 299 | "89749" 300 | ] 301 | }, 302 | { 303 | "name": "Kudat", 304 | "postcodes": [ 305 | "89050", 306 | "89057", 307 | "89058", 308 | "89059" 309 | ] 310 | }, 311 | { 312 | "name": "Kunak", 313 | "postcodes": [ 314 | "91200", 315 | "91207", 316 | "91209" 317 | ] 318 | }, 319 | { 320 | "name": "Lahad Datu", 321 | "postcodes": [ 322 | "91100", 323 | "91108", 324 | "91109", 325 | "91110", 326 | "91111", 327 | "91112", 328 | "91113", 329 | "91114", 330 | "91115", 331 | "91116", 332 | "91117", 333 | "91118", 334 | "91119", 335 | "91120", 336 | "91121", 337 | "91122", 338 | "91123", 339 | "91124", 340 | "91125", 341 | "91126", 342 | "91127", 343 | "91128", 344 | "91150" 345 | ] 346 | }, 347 | { 348 | "name": "Likas", 349 | "postcodes": [ 350 | "88856" 351 | ] 352 | }, 353 | { 354 | "name": "Membakut", 355 | "postcodes": [ 356 | "89720", 357 | "89727", 358 | "89728", 359 | "89729" 360 | ] 361 | }, 362 | { 363 | "name": "Menumbok", 364 | "postcodes": [ 365 | "89760", 366 | "89767", 367 | "89768", 368 | "89769" 369 | ] 370 | }, 371 | { 372 | "name": "Nabawan", 373 | "postcodes": [ 374 | "89950", 375 | "89957", 376 | "89958", 377 | "89959" 378 | ] 379 | }, 380 | { 381 | "name": "Pamol", 382 | "postcodes": [ 383 | "90400" 384 | ] 385 | }, 386 | { 387 | "name": "Papar", 388 | "postcodes": [ 389 | "89600", 390 | "89607", 391 | "89608", 392 | "89609" 393 | ] 394 | }, 395 | { 396 | "name": "Penampang", 397 | "postcodes": [ 398 | "89500", 399 | "89507", 400 | "89508", 401 | "89509" 402 | ] 403 | }, 404 | { 405 | "name": "Putatan", 406 | "postcodes": [ 407 | "88721", 408 | "88722", 409 | "88723", 410 | "88724", 411 | "88725" 412 | ] 413 | }, 414 | { 415 | "name": "Ranau", 416 | "postcodes": [ 417 | "89300", 418 | "89307", 419 | "89308", 420 | "89309", 421 | "89320", 422 | "89350", 423 | "89357" 424 | ] 425 | }, 426 | { 427 | "name": "Sandakan", 428 | "postcodes": [ 429 | "90000", 430 | "90008", 431 | "90009", 432 | "90300", 433 | "90307", 434 | "90700", 435 | "90701", 436 | "90702", 437 | "90703", 438 | "90704", 439 | "90705", 440 | "90706", 441 | "90707", 442 | "90708", 443 | "90709", 444 | "90711", 445 | "90712", 446 | "90713", 447 | "90714", 448 | "90715", 449 | "90716", 450 | "90717", 451 | "90718", 452 | "90719", 453 | "90720", 454 | "90721", 455 | "90722", 456 | "90723", 457 | "90724", 458 | "90725", 459 | "90726", 460 | "90727", 461 | "90728", 462 | "90729", 463 | "90730", 464 | "90731", 465 | "90732", 466 | "90733", 467 | "90734", 468 | "90735", 469 | "90736", 470 | "90737", 471 | "90738", 472 | "90739", 473 | "90740", 474 | "90741" 475 | ] 476 | }, 477 | { 478 | "name": "Semporna", 479 | "postcodes": [ 480 | "91300", 481 | "91307", 482 | "91308", 483 | "91309" 484 | ] 485 | }, 486 | { 487 | "name": "Sipitang", 488 | "postcodes": [ 489 | "89850", 490 | "89857", 491 | "89858", 492 | "89859" 493 | ] 494 | }, 495 | { 496 | "name": "Tambunan", 497 | "postcodes": [ 498 | "89650", 499 | "89657", 500 | "89658", 501 | "89659" 502 | ] 503 | }, 504 | { 505 | "name": "Tamparuli", 506 | "postcodes": [ 507 | "89250", 508 | "89257", 509 | "89258", 510 | "89259" 511 | ] 512 | }, 513 | { 514 | "name": "Tanjung Aru", 515 | "postcodes": [ 516 | "88858" 517 | ] 518 | }, 519 | { 520 | "name": "Tawau", 521 | "postcodes": [ 522 | "91000", 523 | "91007", 524 | "91008", 525 | "91009", 526 | "91010", 527 | "91011", 528 | "91012", 529 | "91013", 530 | "91014", 531 | "91015", 532 | "91016", 533 | "91017", 534 | "91018", 535 | "91019", 536 | "91020", 537 | "91021", 538 | "91022", 539 | "91023", 540 | "91024", 541 | "91025", 542 | "91026", 543 | "91027", 544 | "91028", 545 | "91029", 546 | "91030", 547 | "91031", 548 | "91032", 549 | "91033", 550 | "91034", 551 | "91035", 552 | "91045", 553 | "91056" 554 | ] 555 | }, 556 | { 557 | "name": "Tenghilan", 558 | "postcodes": [ 559 | "89260" 560 | ] 561 | }, 562 | { 563 | "name": "Tenom", 564 | "postcodes": [ 565 | "89900", 566 | "89907", 567 | "89908", 568 | "89909" 569 | ] 570 | }, 571 | { 572 | "name": "Tuaran", 573 | "postcodes": [ 574 | "89200", 575 | "89207", 576 | "89208", 577 | "89209" 578 | ] 579 | } 580 | ] 581 | } --------------------------------------------------------------------------------