Skip to content
GuidesBlogPlaygroundDashboard

Geocode

Forward geocode an address
GeocodeResult geocode().forward(GeocodeForwardParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
GET/api/v1/geocode
Forward geocode an address
GeocodeResult geocode().forwardPost(GeocodeForwardPostParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
POST/api/v1/geocode
Reverse geocode a coordinate
ReverseGeocodeResult geocode().reverse(GeocodeReverseParamsparams = GeocodeReverseParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
GET/api/v1/geocode/reverse
Reverse geocode a coordinate
ReverseGeocodeResult geocode().reversePost(GeocodeReversePostParamsparams = GeocodeReversePostParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
POST/api/v1/geocode/reverse
Autocomplete a partial address
AutocompleteResult geocode().autocomplete(GeocodeAutocompleteParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
GET/api/v1/geocode/autocomplete
Autocomplete a partial address
AutocompleteResult geocode().autocompletePost(GeocodeAutocompletePostParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
POST/api/v1/geocode/autocomplete
Batch geocode multiple addresses
GeocodeBatchResponse geocode().batch(GeocodeBatchParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
POST/api/v1/geocode/batch
ModelsExpand Collapse
class AutocompleteResult:

GeoJSON FeatureCollection of autocomplete suggestions for partial address input. Optimized for low-latency type-ahead UIs. Content-Type: application/geo+json.

List<GeocodingFeature> features

Autocomplete suggestions ordered by relevance

GeoJSON Geometry object per RFC 7946. Coordinates use [longitude, latitude] order. 3D coordinates [lng, lat, elevation] are used for elevation endpoints.

Coordinates coordinates

Coordinates array. Nesting depth varies by geometry type: Point = [lng, lat], LineString = [[lng, lat], ...], Polygon = [[[lng, lat], ...], ...], etc.

One of the following:
List<double>
List<List<double>>
List<List<List<double>>>
List<List<List<List<double>>>>
Type type

Geometry type

One of the following:
POINT("Point")
LINE_STRING("LineString")
POLYGON("Polygon")
MULTI_POINT("MultiPoint")
MULTI_LINE_STRING("MultiLineString")
MULTI_POLYGON("MultiPolygon")
Properties properties

Geocoding result properties

String displayName

Formatted address or place name

Optional<String> category

POI category (e.g. restaurant, cafe, park). Present for place results.

Optional<String> city

City or town name. Present for address results.

Optional<Double> confidence

Interpolation confidence (0-1). Present only for interpolated results.

maximum1
minimum0
Optional<String> country

Country name. Present for reverse geocode address results.

Optional<String> countryCode

ISO 3166-1 alpha-2 country code

maxLength2
minLength2
Optional<Double> distanceM

Distance from the query point in meters (reverse geocode / nearby only)

Optional<String> fullAddress

Complete formatted address from the database. Present for reverse geocode address results.

Optional<String> houseNumber

House or building number. Present for address and interpolated results.

Optional<Boolean> interpolated

Whether this result was estimated by address interpolation rather than an exact database match.

Optional<String> name

Place name (raw). Present for reverse geocode place results.

Optional<Long> osmId

OpenStreetMap element ID (null for interpolated results)

Optional<OsmType> osmType

OSM element type (node, way, relation)

One of the following:
NODE("node")
WAY("way")
RELATION("relation")
Optional<String> postcode

Postal code. Present for reverse geocode address results.

Optional<Double> score

Relevance score (higher is better). Incorporates text match quality, spatial proximity boost, and popularity signals. Not bounded to 0-1.

minimum0
Optional<Source> source

Result source indicating how the result was found: structured (exact field match), bm25 (full-text search), fuzzy (trigram similarity), address (reverse geocode address), place (reverse geocode POI), interpolation (estimated from neighboring addresses)

One of the following:
STRUCTURED("structured")
BM25("bm25")
FUZZY("fuzzy")
ADDRESS("address")
PLACE("place")
INTERPOLATION("interpolation")
Optional<String> state

State or province name. Present for reverse geocode address results.

Optional<String> street

Street name. Present for address and interpolated results.

Optional<String> subcategory

POI subcategory. Present for place results.

Optional<Tags> tags

Raw OSM tags. Present for place results.

Optional<String> wikipedia

Wikipedia article reference (e.g. en:Eiffel Tower). Present for notable places.

Type type
Type type
class GeocodeResult:

GeoJSON FeatureCollection of forward geocoding results, ordered by relevance. Content-Type: application/geo+json.

List<GeocodingFeature> features

Geocoding results ordered by relevance score

GeoJSON Geometry object per RFC 7946. Coordinates use [longitude, latitude] order. 3D coordinates [lng, lat, elevation] are used for elevation endpoints.

Coordinates coordinates

Coordinates array. Nesting depth varies by geometry type: Point = [lng, lat], LineString = [[lng, lat], ...], Polygon = [[[lng, lat], ...], ...], etc.

One of the following:
List<double>
List<List<double>>
List<List<List<double>>>
List<List<List<List<double>>>>
Type type

Geometry type

One of the following:
POINT("Point")
LINE_STRING("LineString")
POLYGON("Polygon")
MULTI_POINT("MultiPoint")
MULTI_LINE_STRING("MultiLineString")
MULTI_POLYGON("MultiPolygon")
Properties properties

Geocoding result properties

String displayName

Formatted address or place name

Optional<String> category

POI category (e.g. restaurant, cafe, park). Present for place results.

Optional<String> city

City or town name. Present for address results.

Optional<Double> confidence

Interpolation confidence (0-1). Present only for interpolated results.

maximum1
minimum0
Optional<String> country

Country name. Present for reverse geocode address results.

Optional<String> countryCode

ISO 3166-1 alpha-2 country code

maxLength2
minLength2
Optional<Double> distanceM

Distance from the query point in meters (reverse geocode / nearby only)

Optional<String> fullAddress

Complete formatted address from the database. Present for reverse geocode address results.

Optional<String> houseNumber

House or building number. Present for address and interpolated results.

Optional<Boolean> interpolated

Whether this result was estimated by address interpolation rather than an exact database match.

Optional<String> name

Place name (raw). Present for reverse geocode place results.

Optional<Long> osmId

OpenStreetMap element ID (null for interpolated results)

Optional<OsmType> osmType

OSM element type (node, way, relation)

One of the following:
NODE("node")
WAY("way")
RELATION("relation")
Optional<String> postcode

Postal code. Present for reverse geocode address results.

Optional<Double> score

Relevance score (higher is better). Incorporates text match quality, spatial proximity boost, and popularity signals. Not bounded to 0-1.

minimum0
Optional<Source> source

Result source indicating how the result was found: structured (exact field match), bm25 (full-text search), fuzzy (trigram similarity), address (reverse geocode address), place (reverse geocode POI), interpolation (estimated from neighboring addresses)

One of the following:
STRUCTURED("structured")
BM25("bm25")
FUZZY("fuzzy")
ADDRESS("address")
PLACE("place")
INTERPOLATION("interpolation")
Optional<String> state

State or province name. Present for reverse geocode address results.

Optional<String> street

Street name. Present for address and interpolated results.

Optional<String> subcategory

POI subcategory. Present for place results.

Optional<Tags> tags

Raw OSM tags. Present for place results.

Optional<String> wikipedia

Wikipedia article reference (e.g. en:Eiffel Tower). Present for notable places.

Type type
Type type
class GeocodingFeature:

GeoJSON Feature representing a geocoding result. The geometry is always a Point. Properties include the formatted display name, OSM metadata, confidence score, and source type.

GeoJSON Geometry object per RFC 7946. Coordinates use [longitude, latitude] order. 3D coordinates [lng, lat, elevation] are used for elevation endpoints.

Coordinates coordinates

Coordinates array. Nesting depth varies by geometry type: Point = [lng, lat], LineString = [[lng, lat], ...], Polygon = [[[lng, lat], ...], ...], etc.

One of the following:
List<double>
List<List<double>>
List<List<List<double>>>
List<List<List<List<double>>>>
Type type

Geometry type

One of the following:
POINT("Point")
LINE_STRING("LineString")
POLYGON("Polygon")
MULTI_POINT("MultiPoint")
MULTI_LINE_STRING("MultiLineString")
MULTI_POLYGON("MultiPolygon")
Properties properties

Geocoding result properties

String displayName

Formatted address or place name

Optional<String> category

POI category (e.g. restaurant, cafe, park). Present for place results.

Optional<String> city

City or town name. Present for address results.

Optional<Double> confidence

Interpolation confidence (0-1). Present only for interpolated results.

maximum1
minimum0
Optional<String> country

Country name. Present for reverse geocode address results.

Optional<String> countryCode

ISO 3166-1 alpha-2 country code

maxLength2
minLength2
Optional<Double> distanceM

Distance from the query point in meters (reverse geocode / nearby only)

Optional<String> fullAddress

Complete formatted address from the database. Present for reverse geocode address results.

Optional<String> houseNumber

House or building number. Present for address and interpolated results.

Optional<Boolean> interpolated

Whether this result was estimated by address interpolation rather than an exact database match.

Optional<String> name

Place name (raw). Present for reverse geocode place results.

Optional<Long> osmId

OpenStreetMap element ID (null for interpolated results)

Optional<OsmType> osmType

OSM element type (node, way, relation)

One of the following:
NODE("node")
WAY("way")
RELATION("relation")
Optional<String> postcode

Postal code. Present for reverse geocode address results.

Optional<Double> score

Relevance score (higher is better). Incorporates text match quality, spatial proximity boost, and popularity signals. Not bounded to 0-1.

minimum0
Optional<Source> source

Result source indicating how the result was found: structured (exact field match), bm25 (full-text search), fuzzy (trigram similarity), address (reverse geocode address), place (reverse geocode POI), interpolation (estimated from neighboring addresses)

One of the following:
STRUCTURED("structured")
BM25("bm25")
FUZZY("fuzzy")
ADDRESS("address")
PLACE("place")
INTERPOLATION("interpolation")
Optional<String> state

State or province name. Present for reverse geocode address results.

Optional<String> street

Street name. Present for address and interpolated results.

Optional<String> subcategory

POI subcategory. Present for place results.

Optional<Tags> tags

Raw OSM tags. Present for place results.

Optional<String> wikipedia

Wikipedia article reference (e.g. en:Eiffel Tower). Present for notable places.

Type type
class ReverseGeocodeResult:

GeoJSON FeatureCollection of reverse geocoding results, ordered by distance from the query point. Content-Type: application/geo+json.

List<GeocodingFeature> features

Reverse geocoding results ordered by distance

GeoJSON Geometry object per RFC 7946. Coordinates use [longitude, latitude] order. 3D coordinates [lng, lat, elevation] are used for elevation endpoints.

Coordinates coordinates

Coordinates array. Nesting depth varies by geometry type: Point = [lng, lat], LineString = [[lng, lat], ...], Polygon = [[[lng, lat], ...], ...], etc.

One of the following:
List<double>
List<List<double>>
List<List<List<double>>>
List<List<List<List<double>>>>
Type type

Geometry type

One of the following:
POINT("Point")
LINE_STRING("LineString")
POLYGON("Polygon")
MULTI_POINT("MultiPoint")
MULTI_LINE_STRING("MultiLineString")
MULTI_POLYGON("MultiPolygon")
Properties properties

Geocoding result properties

String displayName

Formatted address or place name

Optional<String> category

POI category (e.g. restaurant, cafe, park). Present for place results.

Optional<String> city

City or town name. Present for address results.

Optional<Double> confidence

Interpolation confidence (0-1). Present only for interpolated results.

maximum1
minimum0
Optional<String> country

Country name. Present for reverse geocode address results.

Optional<String> countryCode

ISO 3166-1 alpha-2 country code

maxLength2
minLength2
Optional<Double> distanceM

Distance from the query point in meters (reverse geocode / nearby only)

Optional<String> fullAddress

Complete formatted address from the database. Present for reverse geocode address results.

Optional<String> houseNumber

House or building number. Present for address and interpolated results.

Optional<Boolean> interpolated

Whether this result was estimated by address interpolation rather than an exact database match.

Optional<String> name

Place name (raw). Present for reverse geocode place results.

Optional<Long> osmId

OpenStreetMap element ID (null for interpolated results)

Optional<OsmType> osmType

OSM element type (node, way, relation)

One of the following:
NODE("node")
WAY("way")
RELATION("relation")
Optional<String> postcode

Postal code. Present for reverse geocode address results.

Optional<Double> score

Relevance score (higher is better). Incorporates text match quality, spatial proximity boost, and popularity signals. Not bounded to 0-1.

minimum0
Optional<Source> source

Result source indicating how the result was found: structured (exact field match), bm25 (full-text search), fuzzy (trigram similarity), address (reverse geocode address), place (reverse geocode POI), interpolation (estimated from neighboring addresses)

One of the following:
STRUCTURED("structured")
BM25("bm25")
FUZZY("fuzzy")
ADDRESS("address")
PLACE("place")
INTERPOLATION("interpolation")
Optional<String> state

State or province name. Present for reverse geocode address results.

Optional<String> street

Street name. Present for address and interpolated results.

Optional<String> subcategory

POI subcategory. Present for place results.

Optional<Tags> tags

Raw OSM tags. Present for place results.

Optional<String> wikipedia

Wikipedia article reference (e.g. en:Eiffel Tower). Present for notable places.

Type type
Type type