Location Name
Let users provide human-readable place names that we geocode. Best practices, performance notes, and examples.
Using locationName
allows your users to provide a human-readable place name (e.g., "London, UK", "Mayfair, London", or "Claridge's, London") instead of coordinates. We geocode these names to lat/lon behind the scenes so you can keep using the same search API.
When to use locationName
- Use when you do not know the coordinates you would like use
- Use when your customers search for a location themselves
- Mix and match with coordinates in the same request – both are supported
Precedence: coordinates win
If both lat
/lon
and locationName
are provided, we will use the
coordinates and skip geocoding for optimal performance.
Provide specific names
Geocoding works best when the input is specific. Common names can refer to multiple places.
- Prefer: "Camden, London, UK" over "Camden"
- Prefer: "Times Square, New York, USA" over "Times Square"
- Prefer: Full addresses where possible (street, city, country)
Be as specific as possible
The more detail provided (city + region/country), the more accurate the geocoding. Vague names can match multiple results and may not geocode as you expect.
Examples
Performance
- Multiple names are geocoded in parallel to keep requests fast.
- If coordinates are provided, we skip geocoding entirely.
Fastest path
Provide coordinates whenever you have them. Use locationName
as a fallback
for user input. You can mix both in the same request.
Validation
Every locations
entry must include either:
lat
andlon
, orlocationName
If neither is provided, the request will be rejected.