Convert coordinates to DIGIPIN (India) and Plus Code (worldwide), or a code back to coordinates
location_codeSend lat+lng to get the Plus Code (Open Location Code, works everywhere, ~14 m square) and, inside India, the official India Post DIGIPIN (~4 m square). Or send any DIGIPIN or Plus Code as "code" to get its coordinates and cell bounds. Pure maths, exact to the official specs. Price 0.001 USDC per call; first 3 calls per day free.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "location_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lat | No | Latitude (-90..90). Use with lng. | |
| lng | No | Longitude (-180..180). Use with lat. | |
| code | No | Instead of lat/lng: a DIGIPIN like 4P3-JK8-52C9 or a full Plus Code like 7J4VXH8P+2C | |
| payment | No | Optional x402 payment (base64 X-PAYMENT header value). Not needed while the free daily sample lasts. |