InBetween
Search

Mode

The mode object chooses between a midpoint search (POINT) and a route search (PATH), and sets the search distance.

"mode": {
  "mode": "POINT",
  "maxDistance": 500
}

Prop

Type

mode is required

If mode is missing or misspelt (for example "point"), no location filter is applied and results can come from anywhere. The same happens with PATH and fewer than two locations.

POINT mode

InBe works out the weighted midpoint of all your locations, then searches within maxDistance metres of it. Use it for meetups, "near me" searches and anything centred on one spot.

Two people, 750 m around the midpoint
{
  "locations": [
    { "lat": 51.5072, "lon": -0.1276 },
    { "lat": 51.5154, "lon": -0.1419 }
  ],
  "mode": { "mode": "POINT", "maxDistance": 750 }
}

The response includes centerPoint (the midpoint) and each venue's distanceMeters from it.

PATH mode

InBe joins your locations, in order, into a route made of straight lines, then searches within maxDistance metres either side of it. Use it for walks, tours and "somewhere on the way". You need at least two locations, and weights are ignored.

Coffee within 150 m of a walking route
{
  "locations": [
    { "lat": 51.5007, "lon": -0.1246 },
    { "lat": 51.5045, "lon": -0.0865 },
    { "lat": 51.5081, "lon": -0.0759 }
  ],
  "mode": { "mode": "PATH", "maxDistance": 150 },
  "preferences": { "establishmentFilters": ["serves_coffee"] }
}

The route is a series of straight lines between your points, not a road or walking route. For a route that follows streets, get a polyline from a navigation provider and send a selection of points along it as locations.

In PATH mode, centerPoint is null and venues have no distanceMeters.

Choosing maxDistance

maxDistance is a straight-line distance. Walking routes are usually 20-40% longer.

Use casePOINT radiusPATH corridor
Dense city centre300-800 m50-150 m
Suburbs or a small town1,000-3,000 m200-500 m
Rural or by car5,000 m and up1,000 m and up
Walk timeAbout
5 min400 m
10 min800 m
15 min1,200 m

If you get too few results, increase maxDistance before you remove preferences. If you get too many, tighten it or add filters.

Next steps

On this page