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}")

Input#

Parameter

Type

Required

Description

address

str

Yes

Free-text address or place name

sort_country_code

str

No

ISO country code — results prioritized for this country

language

Language

No

Response language (default EN)

Response#

Returns GeoLocations containing a list of GeoLocation objects.

Address search