Socket
Book a DemoInstallSign in
Socket

indian_address

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

indian_address

It gives list of states, districts on each state and pincode on each district

1.1.3
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

indian_address

It gives list of states, districts on each state and pincode on each district.

Installation

You can install it using npm:

npm install indian_address

Usage

Here's details of how to use indian_address library.

Note: for typescript you can use type as imported like states, districts, pininfo

Getting states list

const {states} = require("indian_address");

console.log(states) 
// output: [ "Gujarat","Haryana", "Himachal Pradesh", "Jammu & Kashmir", ... ]

Getting districts list (for example up)

const {districts} = require("indian_address");

console.log(districts["uttar pradesh"]) 
// output: [ "Meerut", "Bagpat", "Ghaziabad", "Bulandshahr", "Aligarh" ... ]

Getting pincode list (for example up, lucknow)

const {pincodes} = require("indian_address");

// state and district separated by underscore ( _ ) 
// for example state: uttar pradesh and district: lucknow as written bellow
console.log(pincodes["uttar pradesh_lucknow"]) 
// output: [ "226002", "226003", "226016", "226018", "226026", ... ]

Getting pincode list (for example up, lucknow)

const {pininfo} = require("indian_address");

console.log(pininfo["110001"]) 
// output: { "state": "Delhi", "city": "Central Delhi" }

console.log(pininfo["110001"]) 
// output: { "state": "Delhi", "city": "Central Delhi" }

Acknowledgments

This library uses data from https://data.opendatasoft.com/explore/dataset/geonames-postal-code%40public/?sort=-latitude for pincode information.

Contact

If you have any questions or suggestions, please feel free to contact us.
Siddharth Sharma i@sidsharma.in

Keywords

Address

FAQs

Package last updated on 24 May 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

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.