TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/V3RNE42/helios/llms.txt
Use this file to discover all available pages before exploring further.
/api/geocode endpoint accepts a city name and country name and returns their geographic coordinates. It uses Nominatim (OpenStreetMap) as the primary geocoder, falling back to OpenCage when Nominatim fails or rate-limits.
Request
Method:GETPath:
/api/geocode
The city or locality name.
The country name.
Response
On success the endpoint returns a JSON object with the coordinates of the requested city.Latitude in decimal degrees.
Longitude in decimal degrees.
response.ok and throws:
Providers
Primary — Nominatim (https://nominatim.openstreetmap.org/search)No API key is required. The serverless function sends a valid
User-Agent header as required by Nominatim’s usage policy.
Fallback — OpenCage (https://api.opencagedata.com/geocode/v1/json)Used when Nominatim fails or rate-limits. Requires the
OPENCAGE_KEY environment variable.
City and country names are URL-encoded by the front-end using
encodeURIComponent() before being passed as query parameters to this endpoint.