GET /v1/zip-by-coordsReverse geocode to ZIP/postal code
Agent Tools lf-agent-tools
Tells you the ZIP or postal code and place name for a spot on the map. Looks up the postal code (ZIP code), city, state, and country for a given latitude/longitude using OpenStreetMap Nominatim.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
lat | number | Yes | Latitude |
lon | number | Yes | Longitude |
Response Schema
zip (string): Postal/ZIP code
city (string): City name
state (string): State/region
country (string): Country name
displayName (string): Full address string
cURL Example
curl 'https://lf-agent-tools.laminarforge.dev/v1/zip-by-coords?lat=40.71&lon=-74.01' -H 'Authorization: Bearer lf_YourApiKey'
Python Example
import requests
url = 'https://lf-agent-tools.laminarforge.dev/v1/zip-by-coords'
headers = {'Authorization': 'Bearer lf_YourApiKey'}
params = {'lat': 40.71, 'lon': -74.01}
response = requests.get(url, headers=headers, params=params)
print(response.json())