yatmo_get_nearest_by_category
The single nearest point of interest of a given category, with distance and travel time. Use it for laser-focused answers (“where is the nearest train station?”).
Returns at most one POI; null when no POI of that category is available near the coordinate.
Inputs
| Name | In | Type | Description |
|---|---|---|---|
| latitude required | argument | double | Latitude in decimal degrees. |
| longitude required | argument | double | Longitude in decimal degrees. |
| category required | argument | string |
Category token. See the category vocabulary: school, nursery, supermarket, public_transport, train_station, motorway.
|
| language required | argument | string | Two-letter language code. |
| country required | argument | string | Market code from your licence. |
Example
Nearest school from the Grand-Place in Brussels, replayed on 21 September 2026:
{
"name": "yatmo_get_nearest_by_category",
"arguments": {
"latitude": 50.846714, "longitude": 4.352514,
"category": "school",
"language": "fr", "country": "BE"
}
}
Response
| Name | In | Type | Description |
|---|---|---|---|
| category | string | The category token you requested (canonicalised lower-case). | |
| nearest | object? |
{name, distanceMeters, travelTimeMinutes, travelMode, latitude, longitude}. travelMode names the mode the distance and time were measured with (see below). null when no place of this category is available, and the text then says so.
|
{
"text": "Nearest school: Cefa - Centre Scolaire Eperonniers-Mercelis (363 m).",
"facts": {
"category": "school",
"nearest": {
"name": "Cefa - Centre Scolaire Eperonniers-Mercelis",
"distanceMeters": 363,
"travelTimeMinutes": 3,
"travelMode": "cycling",
"latitude": 50.844355,
"longitude": 4.349471
}
},
"warnings": [],
"metadata": {
"country": "BE",
"language": "FR",
"generatedAtUtc": "2026-09-21T12:45:41Z"
}
}
How distances and times are computed
distanceMetersis a network distance, measured along streets, paths or transport links, never a straight line from the property.- It is the shortest of the available modes. Yatmo measures each place by car, on foot, by bike and by public transport; the tool keeps the entry with the shortest distance. That is often walking, but not always.
travelModesays which mode that was:walking,cycling,drivingortransit, the same in every language.travelTimeMinutes, where present, belongs to that same mode, rounded to the minute.- A missing value stays unknown. When no mode has travel information, the
distance is
null; it is never replaced by another mode or by zero.
An assistant should therefore quote the mode with the figure. The nearest school from the
Grand-Place comes back at 363 m with travelMode: "cycling": that is “363 metres,
3 minutes by bike”, not “a 3 minute walk”. To get a time in a mode you choose, call REST
/route with that mode.
School vs nursery
Asking for school returns an actual school: preschool, primary, secondary or high school. Crèches and daycare are never returned by school; they live under nursery.
Same coordinate, category: "nursery":
{
"facts": {
"category": "nursery",
"nearest": {
"name": "César De Paepe",
"distanceMeters": 551,
"travelTimeMinutes": 7,
"travelMode": "transit",
"latitude": 50.843003,
"longitude": 4.350692
}
}
}
Related: location summary (returns both nearest school and nearest nursery), nearby POIs, accessibility profile.