Locations
This object enables you to define one to many locations. Depending on the properties you provide, you can find locations at a single point, along a path, or between points
The locations array is the foundation of every search request. It defines where to search from and can represent anything from a single user's location to complex multi-user scenarios with custom weighting. Locations don't always have to be a person, they can be places like locations along an itinerary.
Basic structure
Mode
Mode should always be provided. It allows you to specify the type of search you want to perform and the distance you want to search. See Mode for more information.
Properties
lat (optional)
Latitude coordinate between -90 and 90. Use decimal degrees (e.g., 51.5072 for London).
lon (optional)
Longitude coordinate between -180 and 180. Use decimal degrees (e.g., -0.1276 for London).
locationName (optional)
A human-readable place name to geocode (e.g., "London, UK", "Times Square, New York"). Provide as much detail as possible (city + region/country) to avoid ambiguity.
weight (optional)
Relative importance of this location (0-100). Defaults to 50. Higher weights pull the search centre closer.
label (optional)
Human-readable identifier for this location. Useful for multi-user scenarios and result interpretation.
Provide at least one locator
Each entry in locations must include either lat and lon, or a
locationName. If both are provided, we will use the coordinates and skip
geocoding for best performance.
Search scenarios
Single user search
The simplest case - find venues near one person.
Two-person meetup
Find the perfect spot between two people. InBe automatically calculates the midpoint.
Group meeting with weighting
When some people are more flexible about travel distance, use weights to bias the search centre.
In this example, the second user's location has higher weight (40), so the search centre will be closer to them.
Defining a meeting point yourself
When you want to define a meeting point yourself, set the location weight you want to meet to 100.
Path-based search
For travel apps, provide multiple waypoints to find venues along a route.
Weighting explained
Weights control how much influence each location has on the search centre:
- Equal weights (default): Search centre is the geometric midpoint
- Higher weight: Pulls the search centre closer to that location
- Lower weight: Reduces that location's influence
Best practice
- Always provide at least one location - we require this
- Consider weights carefully - they affect user experience significantly
- Validate coordinates - ensure lat/lon are within valid ranges
Coordinate precision
InBe accepts coordinates with up to 18 decimal places, providing metre-level precision:
Next steps
Learn about Weights
Master location weighting for optimal group meetup placement.
Using locationName
Let your users type a place name. Learn best practices and performance tips.