NewConnect Claude, Gemini, ChatGPT, and other AI agents to API Ninjas via our MCP server →

India PIN Code API

The PIN Code API looks up any Indian pincode and returns the city, district, state and coordinates as JSON. A PIN code — short for Postal Index Number — is the six-digit code India Post uses to route mail, and 110001 in New Delhi is a typical one.

Both spellings work the same way here: "pincode" and "PIN code" refer to the same six digits, and the API accepts 110001, 110 001 and 110-001 interchangeably.

We hold 19,238 distinct Indian pincodes. For postal codes outside India, use the Postal Code API, which covers over 100 countries — this endpoint is the same data, scoped to India and named the way India names it. See also the India coverage breakdown.

Online
(4.6)

From 6,854 users

2,900+

Applications using this API

API Status

Online - All Systems Operational

API Response Times

Average
P50
P75
P90
P95
324ms345ms420ms668ms1050ms

Didn't find what you were looking for? Suggest an improvement

https://api.api-ninjas.com/v1/pincode

Returns a list of locations matching the given pincode. One pincode often covers several localities, so the response is always an array.

Parameters

At least one of pincode, city, district or state must be set:

  • pincode  optional

    The six-digit Indian PIN code to look up. Spaces and hyphens are normalized automatically.

  • city  Premium only

    Reverse lookup by city or locality name.

  • district  Premium only

    Reverse lookup by district (e.g., Pune, Thane).

  • state  Premium only

    Reverse lookup by state or union territory (e.g., Maharashtra, Delhi).

Response Fields

  • pincode

    The six-digit Postal Index Number.

  • city

    The city or locality the pincode covers.

  • state

    The state or union territory.

  • state_code  Premium only

    Code for the state, where published.

  • district  Premium only

    The district the pincode sits in.

  • district_code  Premium only

    Code for the district, where published.

  • lat  Premium only

    Latitude of the pincode location.

  • lon  Premium only

    Longitude of the pincode location.

  • accuracy  Premium only

    How the coordinates were derived: 6 = centroid of the addresses or shape, 4 = gazetteer match, 1 = estimated. We publish this rather than implying uniform precision — no Indian coordinate in this dataset is currently a surveyed centroid.

  • timezone

    The IANA timezone for the location (Asia/Kolkata).

Live Demo

Live demo · no API key required
Query parameters
pincode
district Premium only

Get a free API key to get started — no credit card required.

Headers
X-Api-KeyLog in or sign up to get your API key
GET
https://api.api-ninjas.com/v1/pincode?pincode=110001
Sample response
[
{
"pincode": "110001",
"city": "New Delhi",
"state": "Delhi",
"state_code": "DL",
"district": "New Delhi",
"district_code": "...",
"lat": "28.6139",
"lon": "77.2090",
"accuracy": 4,
"timezone": "Asia/Kolkata"
}
]

Code Examples

curl -X GET "https://api.api-ninjas.com/v1/pincode?pincode=110001" \ -H "X-Api-Key: YOUR_API_KEY"

If your programming language is not listed in the Code Example above, you can still make API calls by using a HTTP request library written in your programming language and following the above documentation.

Frequently Asked Questions

  • Yes, but you must have a premium subscription. Commercial use of the PIN Code API is not permitted on the free tier. See our pricing page to choose a plan that fits your needs.
  • Sign up for a free account to instantly get your API key, then pass it in the X-Api-Key header on every request. The documentation above includes ready-to-run examples in cURL, Python, JavaScript, Node.js, and more.
  • Your API requests will simply be denied once you hit your monthly quota — you will never be charged more than the plan you signed up for. To increase your quota, you can upgrade your plan any time on our pricing page.
  • The API responds with a standard HTTP status code and a JSON error message describing the problem. See our error codes reference for the full list of codes and how to resolve each one, or contact support if you need help.