get_geo_locations#
Type: Query | Auth Required: No (Public)
Geocoding lookup — converts a free-text address into coordinate results. Accepts optional sort_country_code to prioritize results for a given country. No authentication required. Returns up to 10 ranked results with street, city, state, country, postal code, and decimal coordinates.
from dlubal.api.geo_zone_tool import GeoZoneTool, Language
gzt = GeoZoneTool(token="YOUR_TOKEN")
result = gzt.get_geo_locations(
address="Altdorf, Uri, Switzerland",
sort_country_code="CH",
language=Language.EN,
)
for loc in result.locations:
print(f"{loc.display_name}: {loc.latitude}, {loc.longitude}")
using Dlubal.API.GeoZoneTool;
var gzt = new GeoZoneToolClient("YOUR_TOKEN");
var result = await gzt.GetGeoLocationsAsync(
address: "Altdorf, Uri, Switzerland",
sortCountryCode: "CH",
language: Language.En
);
foreach (var loc in result.Locations)
{
Console.WriteLine($"{loc.DisplayName}: {loc.Latitude}, {loc.Longitude}");
}
query {
getGeoLocations(
address: "Altdorf, Uri, Switzerland"
sortCountryCode: "CH"
language: EN
) {
latitude longitude altitude
displayName street zip city state country countryCode
}
}
Input#
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
str |
Yes |
Free-text address or place name |
|
str |
No |
ISO country code — results prioritized for this country |
|
Language |
No |
Response language (default EN) |
Response#
Returns GeoLocations containing a list of GeoLocation objects.