Geolocation endpoint
Geocode an address (or place name) into coordinates, country-scoped to the subdomain you call.
GET
https://{country}.yatmo.com/geolocation
LicenseKey header
Proxied to an internal Photon / OpenStreetMap service.
Request
| Name | In | Type | Description |
|---|---|---|---|
| language required | query | string | Search language (used for fuzzy matching). EN / FR / DE / IT supported directly; others fall back to EN. |
| address required | query | string | Free-text address or place name. URL-encode it. |
Examples
curl -H 'LicenseKey: YOUR_KEY' \
'https://be.yatmo.com/geolocation?language=EN&address=Rue%20de%20la%20Loi%2016%2C%20Brussels'
const address = 'Rue de la Loi 16, Brussels';
const url = `https://be.yatmo.com/geolocation?language=EN&address=${encodeURIComponent(address)}`;
const res = await fetch(url, { headers: { LicenseKey: 'YOUR_KEY' } });
const result = await res.json();
const [lng, lat] = result.features[0].geometry.coordinates;
$qs = http_build_query([
'language' => 'EN',
'address' => 'Rue de la Loi 16, Brussels',
]);
$ch = curl_init("https://be.yatmo.com/geolocation?$qs");
curl_setopt($ch, CURLOPT_HTTPHEADER, ['LicenseKey: YOUR_KEY']);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = json_decode(curl_exec($ch), true);
curl_close($ch);
$coords = $result['features'][0]['geometry']['coordinates'] ?? null;
using var http = new HttpClient();
http.DefaultRequestHeaders.Add("LicenseKey", "YOUR_KEY");
var address = Uri.EscapeDataString("Rue de la Loi 16, Brussels");
var json = await http.GetStringAsync($"https://be.yatmo.com/geolocation?language=EN&address={address}");
Response shape
A GeoJSON-style feature collection (Photon format):
{
"features": [
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [4.36770, 50.84367]
},
"properties": {
"name": "Rue de la Loi",
"housenumber": "16",
"street": "Rue de la Loi",
"city": "Brussels",
"postcode": "1000",
"country": "Belgium"
}
}
]
}
Notes
- Coordinates are
[longitude, latitude]inside the GeoJSONcoordinatesarray (per the GeoJSON spec). - Search is country-scoped.
be.yatmo.com/geolocationonly finds places in Belgium. To search globally, you’ll need to call multiple country subdomains. - Empty
featuresarray means “not found”. Status code is still 200. - For reverse geocoding (lat/lng → address), use the
/geolocation/GetClosevariant (same auth, same shape).