My Hive Posts

    Get Indian PinCode Information using an NPM package

    I have written an npm package which will give you the details of the Indian pincode information which can be easily called from the Node.js app. This is the tutorial which will show you how to query the pincode npm package to get the details.

    Since it is a npm package at first you need to install it using the command npm install pincode.

    There is mainly two types by which you can search the pincode, either by pincode or by the area. If it is by pincode it will give you all the details about the pincode whereas if it is by the area it will give the details about the area as well as the pincode of that area.

    Search by Pincode

    var pin = require('pincode');
    pin.seachByPin('560038', function (response){
        response.forEach(function (data) {
            console.log(data);
        });
    });
    

    image.png

    As shown above when searched by the pincode it gave the details like teh Taluk Name, Office Name etc.

    Search by Area

    pin.seachByArea('Bangalore', function (response) {
        response.forEach(function (data) {
            console.log(data);
        });
    });
    

    image.png

    It was actually created just for my use, so that I can get the info of any Indian Pincode at any point of time.



    Posted on Utopian.io - Rewarding Open Source Contributors