Pincode API
Returns all post offices that share a PIN code with their locality, office type, delivery status, postal division, taluk, district, state and coordinates where available. Data comes from the India Post directory.
Post offices for a PIN code
GEThttps://superapi.fly.dev/v1/pincode
Parameters
| Name | Type | Description |
|---|---|---|
pincode required | string | 6-digit Indian PIN code. |
Sample request
curl "https://superapi.fly.dev/v1/pincode?pincode=110001" \
-H "X-Api-Key: YOUR_API_KEY"import requests
resp = requests.get(
"https://superapi.fly.dev/v1/pincode",
params={"pincode": "110001"},
headers={"X-Api-Key": "YOUR_API_KEY"},
timeout=10,
)
resp.raise_for_status()
print(resp.json())const params = new URLSearchParams({"pincode":"110001"});
const resp = await fetch(`https://superapi.fly.dev/v1/pincode?${params}`, {
headers: { 'X-Api-Key': 'YOUR_API_KEY' },
});
if (!resp.ok) throw new Error((await resp.json()).error);
console.log(await resp.json());req, _ := http.NewRequest("GET", "https://superapi.fly.dev/v1/pincode?pincode=110001", nil)
req.Header.Set("X-Api-Key", "YOUR_API_KEY")
resp, err := http.DefaultClient.Do(req)
if err != nil {
log.Fatal(err)
}
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))Sample response
[
{
"pincode": "110001",
"office_name": "New Delhi G.P.O.",
"locality": "New Delhi",
"office_type": "Head Office",
"delivery": true,
"division": "New Delhi GPO",
"region": "Delhi",
"circle": "Delhi",
"taluk": "New Delhi",
"district": "New Delhi",
"state": "Delhi",
"state_code": "DL",
"latitude": null,
"longitude": null
},
{
"pincode": "110001",
"office_name": "Sansad Marg H.O",
"locality": "Sansad Marg",
"office_type": "Head Office",
"delivery": false,
"division": "New Delhi Central",
"region": "Delhi",
"circle": "Delhi",
"taluk": "New Delhi",
"district": "Central Delhi",
"state": "Delhi",
"state_code": "DL",
"latitude": null,
"longitude": null
},
{
"pincode": "110001",
"office_name": "Baroda House S.O",
"locality": "Baroda House",
"office_type": "Sub Office",
"delivery": false,
"division": "New Delhi Central",
"region": "Delhi",
"circle": "Delhi",
"taluk": "New Delhi",
"district": "Central Delhi",
"state": "Delhi",
"state_code": "DL",
"latitude": null,
"longitude": null
}
]Try it
Authentication
Send your API key in the X-Api-Key header (or as Authorization: Bearer <key>). Every response carries X-RateLimit-Limit, X-RateLimit-Remaining and, on metered plans, X-Quota-Limit and X-Quota-Remaining.
Errors
Errors return a JSON body of the form {"error": "message"}.
| Status | Meaning |
|---|---|
| 400 | A parameter is missing or invalid. The message says which. |
| 401 | Missing, invalid or revoked API key. |
| 429 | Rate limit or monthly quota exceeded. Honour Retry-After. |
| 5xx | Server error. Safe to retry with backoff. |