BeMyPlan API

Places

Suggest airports and cities by name, code or position.

Endpoint

GET /data/v1/places/suggestions returns airports and cities that match a search. Send either query or lat and lng. Sending both, or neither, answers 400 place_query_invalid.

ParameterMeaning
queryText mode: a name or a code, 2 to 64 characters.
lat, lngPosition mode: WGS 84 decimal degrees. Send both. An empty value counts as not sent.
radPosition mode: the radius in km, 1 to 500, default 100.
limit1 to 50, default 20. Suggestions are not paginated.

How results are ordered

  • Text mode: an exact IATA code comes first, then names that start with the text, then similar names.
  • Position mode: airports and cities within rad, nearest first, each with distanceKm.

Fields

FieldNotes
typeairport or city.
idarp_… or cit_….
name
iataCode
iataCountryCode
cityIdMay be null.
cityNameMay be null.
latitude, longitudeMay be null.
timeZoneIANA name.
distanceKmnull in text mode.

Examples

By text:

curl "https://api.sandbox.bemyplan.com/data/v1/places/suggestions?query=ams" \
  -H "Authorization: Bearer bmp_test_…"

By position, within 50 km of Schiphol:

curl "https://api.sandbox.bemyplan.com/data/v1/places/suggestions?lat=52.31&lng=4.76&rad=50" \
  -H "Authorization: Bearer bmp_test_…"

Fields and parameters in full: the API reference.

On this page