S2Coder Address
Features Pricing Documentation FAQ

Endpoints

Pincode API

Resolve an Indian PIN code to its state, district, city, post offices and localities.

GET /api/v1/pincode/{pincode}

Request

curl "https://address.s2coder.com/api/v1/pincode/226010" \ -H "X-API-Key: YOUR_API_KEY"

Response

{ "success": true, "pincode": "226010", "state": "Uttar Pradesh", "district": "Lucknow", "city": "Lucknow", "division": "Lucknow", "region": "Lucknow", "circle": "Uttar Pradesh", "latitude": 26.8467, "longitude": 80.9462, "localities": ["Gomti Nagar", "Vibhuti Khand", "Vishesh Khand"], "offices": [ { "name": "Gomti Nagar", "type": "Sub Post Office", "delivery_status": "Delivery", "locality": "Gomti Nagar", "latitude": 26.8467, "longitude": 80.9462 } ] }

Fields

FieldDescription
stateCanonical state or union territory name.
districtRevenue district.
cityCity or town. Falls back to the district when the two share a name.
division / region / circleIndia Post administrative hierarchy.
localitiesEvery distinct locality name recorded under this PIN, sorted alphabetically.
officesOne entry per post office. A single PIN often covers several.
latitude / longitudeCentroid, taken from the first office with coordinates. May be null.

Errors

StatusWhen
422The value is not a valid Indian PIN code — six digits starting with 1–8.
404Valid format, but not present in the reference database.

Caching

PIN code reference data changes rarely, so responses are cached server-side for 600 seconds. Caching them on your side too is safe and recommended — the payload for a given PIN is stable for months at a time.