Geocoding API
Convert addresses to coordinates (forward) and coordinates to addresses (reverse) using OpenStreetMap data.
GET
/api/geocoding/forward
2 sats
Convert an address or place name to latitude/longitude coordinates.
| Parameter | Type | Description |
|---|---|---|
address | string | Address or place name to geocode |
limit | int | Max results (1-20, default 5) |
curl "https://agent-commerce.store/api/geocoding/forward?address=1600+Pennsylvania+Ave+Washington+DC&limit=3"
GET
/api/geocoding/reverse
2 sats
Convert latitude/longitude coordinates to a human-readable address.
| Parameter | Type | Description |
|---|---|---|
latitude | double | Latitude (-90 to 90) |
longitude | double | Longitude (-180 to 180) |
curl "https://agent-commerce.store/api/geocoding/reverse?latitude=38.8977&longitude=-77.0365"
Usage tips: Forward geocoding works best with specific addresses but also handles place names, landmarks, and partial addresses. Reverse geocoding returns the nearest address for the given coordinates. Global coverage via OpenStreetMap data.
Value-Add
- Simplified response structure — extracts city, state, country from verbose Nominatim output
- Coordinate validation before upstream calls
- Multiple result candidates ranked by relevance
- Works globally with OpenStreetMap's comprehensive dataset
- No API key required — managed rate limiting keeps service reliable
Upstream Source
Nominatim geocoding service powered by OpenStreetMap data.