Get FREE
Pincodes API for India.

The most easiest way of generating pincodes on your site, for all the cities of India.

  • Get Pincodes on your site in no time
  • Seamless integration
  • Secure and reliable
  • Simple 1-2-3 process

3 Simple Steps. Get the Code Now!

  • 1.
    Register with us.
  • 2.
    Activate your account, from the email we send across.
  • 3.
    Generate your PinCodes API key.
    Login to go to My Sites. Add your website(s) to
    generate PinCode API key.
  •  
    Our code is compatible with:LinuxWindowsMacAndroidChromeMozillaOperaSafariInternet Explorer

People Say...

I was developing a restaurant website. Using pincodes on my site was super duper easy. - Rohit Seth, Delhi

Easy Directions: How to use the code on your site.

Advance Users

Add below API Code before </head> in your webpage. <script src="http://pincodes.co.in/public/scripts/pincode.js" type="text/javascript" language="javascript"> </script> <script type="text/javascript" > load_pincode('API key',' State _id','0','0','0','0'); </script>

Replace {API key} text with your PinCodes API key.

To receive state list replace {State_id} text with your MenuList id.

To receive city list, add onChange="load_pincode('API key',' State _id','City_id','0',this.value,'1');" in your states MenuList and replace {City_id} with your citys MenuList id.

To receive PinCodes, add onChange="load_pincode('API key',' State _id','City_id','pincode_ld',this.value,'2');" in your city MenuList and replace {Pincode_id} with your pincodes textfield id.

To receive State & City, add onBlur="load_pincode('API key',' State _id','City_id','pincode_ld',this.value,'3');" in your Pincode Field and replace {State_id} & {City_id} with your State MenuList & City MenuList.

Basic Users

Add below API Code before </head> in your webpage. <script src="http://pincodes.co.in/public/scripts/pincode.js" type="text/javascript" language="javascript"> </script> <script type="text/javascript" > load_pincode('API key',' State _id','0','0','0','0'); </script>

Replace {API key} text with your PinCodes API key in above function.

To receive state list add below code: <select name="state" id="State_id" on onChange="load_pincode(' API key ',' State _id ','City_id','0',this.value,'1');"> <option value="">Please select State</option> </select>

To receive city list add below code: <select name="city" id="City_id" on onChange="load_pincode(' API key ','State_id','City_id',' pincode_id ',this.value,'2');"> <option value="">Please select City</option> </select>

To receive PinCodes add below code: If user fills correct pincode you can auto select the state and city. Add this code:<p id="pincode_id"><input type="text" name="pincode" class="textfield" onBlur="load_pincode(' API key ',''State_id ','City_id',' pincode_id ',this.value,'3');"> </p>

Validations

All the above code is free from your validation, which means that you can write your own code to check the validations on your above mentioned form objects.

CSS Design

You can use your own custom defined css classes and styles to design your form object.

Live Demo

On typing correct PinCode - State and City get auto-selected.

Need Help? Join the Discusssion.

Send us your questions and we shall answer them.

Move to Top