Base URL
https://api-digipin.myappclub.in
The same calls also work on this site under /api/, e.g. https://digipin.myappclub.in/api/pincode/380001.
Try it
Press Send.
Access and limits
- Lookups (PIN code, post office, DIGIPIN) are open: no key needed. If you send your key, the calls count toward your usage.
- Partner keys come from MyAppClub only, straight into your app’s admin panel (🔑 API Key Hub → Key Received). A key is never sent by email. Send it in the header
X-API-Key: mac_…(orAuthorization: Bearer mac_…). - A key opens only the parts it was given: PIN code & post office lookup, DIGIPIN make / read, or both. A stopped, ended or replaced key gets
401. - Member addresses are not part of this API: every member’s addresses live in My UniLogin, and an app gets them only with the member’s permission.
- Keep the key on your server. Do not put it in a mobile app or web page, where anyone can read it.
Endpoints
| Method | Path | Key | What it does |
|---|---|---|---|
| GET | /pincode/{pin} | no | District, state, taluk and every post office of a 6-digit PIN |
| GET | /postoffices?q=navrang&state=Gujarat | no | Post offices whose name starts with q (3+ letters), with their PIN; state is optional |
| GET | /digipin/encode?lat=…&lon=… | no | DIGIPIN of a point in India |
| GET | /digipin/decode?digipin=… | no | Centre and bounds of a DIGIPIN cell (~4 m × 4 m) |
The earlier address form /index.php?r=pincode/380001 still works.
Examples
PIN code lookup
curl https://api-digipin.myappclub.in/pincode/380001
{"ok":true,"pincode":"380001","district":"Ahmedabad","state":"Gujarat","taluk":"Ahmadabad City","count":14,
"offices":[{"name":"Ahmedabad","type":"HO","delivery":"Delivery","taluk":"Ahmadabad City", …}, …]}
DIGIPIN of a point
curl "https://api-digipin.myappclub.in/digipin/encode?lat=23.0225&lon=72.5714"
{"ok":true,"digipin":"3KL-K9F-LMT6","lat":23.0225,"lon":72.5714}
JavaScript (from your server, with your key)
const res = await fetch("https://api-digipin.myappclub.in/postoffices?q=navrang&state=Gujarat", {
headers: { "X-API-Key": process.env.MYAPPCLUB_KEY }
});
const data = await res.json();
if (!data.ok) throw new Error(data.message);
console.log(data.count, data.results);
PHP
$ch = curl_init("https://api-digipin.myappclub.in/pincode/380001");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$data = json_decode(curl_exec($ch), true);
echo $data["district"] . ", " . $data["state"];
Errors
Every error has the same shape: {"ok":false,"error":"code","message":"Readable text"}.
| HTTP | Meaning |
|---|---|
| 400 | Bad input in the URL, e.g. bad_pincode, bad_digipin |
| 401 | The key is wrong, stopped, ended or replaced (bad_key) |
| 403 | The key was not given this part (section_not_given) |
| 404 | PIN code not found |
| 500 | Server problem; try again later |
About the data
- PIN codes: India Post "All India Pincode Directory" from data.gov.in (Government Open Data License – India). A few new PIN codes may be missing; you then get 404.
- DIGIPIN: the open DIGIPIN algorithm published by India Post (Department of Posts).