GET /v1/plus-codeConvert lat/lng to/from Plus Code
Agent Tools lf-agent-tools
Turns map coordinates into a short address-like code, or turns that code back into coordinates. Converts latitude/longitude to an Open Location Code (Plus Code) or decodes a Plus Code to coordinates.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
code | string | No | Plus Code to decode |
lat | number | No | Latitude to encode |
lon | number | No | Longitude to encode |
Response Schema
success (boolean): Operation success
plus_code (string): Encoded Plus Code
latitude (number): Decoded latitude
longitude (number): Decoded longitude
cURL Example
curl 'https://lf-agent-tools.laminarforge.dev/v1/plus-code?lat=40.71&lon=-74.01' -H 'Authorization: Bearer lf_YourApiKey'
Python Example
import requests
url = 'https://lf-agent-tools.laminarforge.dev/v1/plus-code'
headers = {'Authorization': 'Bearer lf_YourApiKey'}
params = {'lat': 40.71, 'lon': -74.01}
response = requests.get(url, headers=headers, params=params)
print(response.json())