Location Toolkit

v1.0.0
io.github.ameerasofficial-ai/location-toolkit Checked 2 days ago Published 9 days ago

Global geocoding helpers: Plus Codes, reverse lookup, local time, postal checks, distance.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

location_code Convert coordinates to DIGIPIN (India) and Plus Code (worldwide), or a code back to coordinates

Send 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 1 call per day free.

ParameterTypeDescription
codestringInstead of lat/lng: a DIGIPIN like 4P3-JK8-52C9 or a full Plus Code like 7J4VXH8P+2C
latnumberLatitude (-90..90). Use with lng.
lngnumberLongitude (-180..180). Use with lat.
paymentstringOptional x402 payment (base64 X-PAYMENT header value). Not needed while the free daily sample lasts.

india_pincode_lookup Look up an Indian PIN code: post offices, district, state, postal circle, centre coordinates and DIGIPIN

Full India Post directory (19,500+ PIN codes, 165,000+ post offices). Returns every post office under the PIN with its type (head, sub or branch office), district, state, circle, approximate centre point, its DIGIPIN and Plus Code. Not charged if the PIN does not exist. Price 0.002 USDC per call; first 1 call per day free.

ParameterTypeDescription
pincode *string6-digit Indian PIN code
paymentstringOptional x402 payment (base64 X-PAYMENT header value). Not needed while the free daily sample lasts.

reverse_lookup Coordinates to nearest towns worldwide (town, region, country, distance), plus nearest PIN code inside India

Reverse lookup from coordinates (or a DIGIPIN / Plus Code) to the 3 nearest populated places from GeoNames (170,000+ towns worldwide) with region, country and distance in km. Inside India it also returns the nearest PIN code with district and state. Approximate (town level), not a street address. Price 0.002 USDC per call; first 1 call per day free.

ParameterTypeDescription
codestringInstead of lat/lng: a DIGIPIN or Plus Code
latnumberLatitude. Use with lng.
lngnumberLongitude. Use with lat.
paymentstringOptional x402 payment (base64 X-PAYMENT header value). Not needed while the free daily sample lasts.

postal_code_check Check if a postal code has a valid format for any of 240+ countries (full lookup for India)

Validates postal / ZIP / PIN code format for 240+ countries and returns the cleaned form. For India it also checks that the PIN really exists and returns district and state. Price 0.001 USDC per call; first 1 call per day free.

ParameterTypeDescription
country *string2-letter country code, e.g. IN, US, GB, DE
postal_code *stringThe postal code to check
paymentstringOptional x402 payment (base64 X-PAYMENT header value). Not needed while the free daily sample lasts.

distance_between Distance and direction between two places given as coordinates, DIGIPIN, Plus Code or Indian PIN code

Great-circle distance (km and miles) and compass bearing between two points. Each point can be {lat,lng}, "13.08,80.27", a DIGIPIN, a Plus Code or a 6-digit Indian PIN code. Price 0.001 USDC per call; first 1 call per day free.

ParameterTypeDescription
from *stringStart point: "lat,lng", DIGIPIN, Plus Code or Indian PIN (or an object {lat,lng})
to *stringEnd point, same formats
paymentstringOptional x402 payment (base64 X-PAYMENT header value). Not needed while the free daily sample lasts.

clean_address Clean a messy address from any country into structured fields, with India PIN, district and state checks

AI turns free-text addresses (any language or format, e.g. "near water tank 2nd main rd AN chennai 40") into house, street, landmark, locality, city, district, state, postal code and country. Then checks the postal code format for the country, and for India that the PIN exists and matches the district and state, with warnings and suggested fixes. Never invents a postal code. Price 0.005 USDC per call; first 1 call per day free.

ParameterTypeDescription
address *stringFree-text address (max 500 chars)
countrystringOptional 2-letter country hint, e.g. IN
paymentstringOptional x402 payment (base64 X-PAYMENT header value). Not needed while the free daily sample lasts.

local_time_and_working_days Local time, time zone, DST, weekend days and business hours for any point on Earth, plus working-day counts

From coordinates, a Plus Code, DIGIPIN or Indian PIN: the IANA time zone, local date and time, UTC offset, whether daylight saving is active, the country's weekend days (e.g. Friday-Saturday in Saudi Arabia, Sunday only in Nepal), whether it is business hours now and when the next business day opens (local and UTC). Optional: count working days between two dates, or add N working days to a date (deadlines, delivery estimates, SLAs). Public holidays are not included. Price 0.001 USDC per call; first 1 call per day free.

ParameterTypeDescription
add_working_daysnumberOptional: add this many working days to start_date
atstringOptional ISO date-time to convert instead of now, e.g. 2026-12-01T15:00:00Z
close_hournumberBusiness closing hour (default 17)
codestringInstead of lat/lng: Plus Code, DIGIPIN or 6-digit Indian PIN
end_datestringOptional YYYY-MM-DD: count working days from start_date to end_date
latnumberLatitude. Use with lng.
lngnumberLongitude. Use with lat.
open_hournumberBusiness opening hour (default 9)
paymentstringOptional x402 payment (base64 X-PAYMENT header value). Not needed while the free daily sample lasts.
start_datestringOptional YYYY-MM-DD (default: today local)