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.
| Parameter | Meaning |
|---|---|
query | Text mode: a name or a code, 2 to 64 characters. |
lat, lng | Position mode: WGS 84 decimal degrees. Send both. An empty value counts as not sent. |
rad | Position mode: the radius in km, 1 to 500, default 100. |
limit | 1 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 withdistanceKm.
Fields
| Field | Notes |
|---|---|
type | airport or city. |
id | arp_… or cit_…. |
name | |
iataCode | |
iataCountryCode | |
cityId | May be null. |
cityName | May be null. |
latitude, longitude | May be null. |
timeZone | IANA name. |
distanceKm | null 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.