Home / LatLongAPI documentation

LatLongAPI documentation

Learn the LatLongAPI POST request format, license authentication, coordinate limits, response fields, and language integrations.

Endpoint and authentication

POST /api/v1/reverse returns address information for the supplied coordinates. Set Content-Type: application/json and provide your license in the api field. Keep licenses in server-side configuration. Contact contact@latlongapi.com to arrange access.

Set LATLONG_API_BASE_URL to the HTTPS origin assigned to your deployment. For the test environment use https://v1-dev.latlongapi.com. Use a license issued for that environment.

Request fields

Send decimal-degree coordinates using the named lat and long fields to avoid ambiguity about coordinate order. Preserve negative values for southern latitudes and western longitudes. Reverse geocoding returns address information for coordinates; it does not calculate routes or convert a street address into coordinates.

FieldTypeRequirement
latnumberRequired, -90 to 90
longnumberRequired, -180 to 180
apistringRequired API license
zoomintegerOptional, 0 to 18; default 18

Send a request

curl --fail-with-body --max-time 10 "$LATLONG_API_BASE_URL/api/v1/reverse" \
  -H 'Content-Type: application/json' \
  --data '{"lat":51.5007,"long":-0.1246,"api":"YOUR_API_LICENSE"}'

Read the response

result includes short_address, long_address, nullable city and country_code, and precision. meta includes request_id and latency_ms. Address detail varies by location.

Handle errors

Check the HTTP status before reading a successful result. A 401 indicates an invalid or inactive license, 422 indicates a request validation error, and 429 indicates rate limiting. Use bounded retries with backoff for temporary failures; correct invalid input and credentials before retrying.

Integration guides