Socket
Book a DemoInstallSign in
Socket

jp-postal

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jp-postal

There are instructions to download, rebuild and obtain the latest data from official source

latest
Source
npmnpm
Version
4.0.1
Version published
Weekly downloads
29
-81.41%
Maintainers
1
Weekly downloads
 
Created
Source

Japanese postal data from official database

There are instructions to download, rebuild and obtain the latest data from official source

Latest database update: December 12, 2025

更新日:2025年12月13日

Data source and explanation

  • General page: http://www.post.japanpost.jp/zipcode/download.html
  • Download page: http://www.post.japanpost.jp/zipcode/dl/kogaki-zip.html
  • Explanation: http://www.post.japanpost.jp/zipcode/dl/readme.html

Usage

npm i jp-postal
import postal from 'jp-postal'


console.log(postal['1130021'])
// [ [ '東京都', '文京区', '本駒込', 'トウキョウト', 'ブンキョウク', 'ホンコマゴメ' ] ]

console.log(postal['0040000'])
// [
// [ '北海道', '札幌市厚別区', '', 'ホッカイドウ', 'サッポロシアツベツク', '' ],
// 	[ '北海道', '札幌市清田区', '', 'ホッカイドウ', 'サッポロシキヨタク', '' ]
// ]

console.log(postal['4980000'])
// [
// [ '愛知県', '弥富市', '', 'アイチケン', 'ヤトミシ', '' ],
// 	[ '三重県', '桑名郡木曽岬町', '', 'ミエケン', 'クワナグンキソサキチョウ', '' ]
// ]
  • Default export maps 7 digits postal code (string format) into an array whose elements are array of [prefecture, region, subregion, prefecture kana, region kana, subregion kana]

How to rebuild

To rebuild to obtain the latest database

npm i
npm run rebuild

Test

npm run test

Keywords

japanese

FAQs

Package last updated on 13 Dec 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts