Skip to content
GuidesPlaygroundDashboard

Geocode

Forward geocode an address
client.Geocode.Forward(ctx, query) (*GeocodeResult, error)
GET/api/v1/geocode
Reverse geocode a coordinate
client.Geocode.Reverse(ctx, query) (*ReverseGeocodeResult, error)
GET/api/v1/geocode/reverse
Autocomplete a partial address
client.Geocode.Autocomplete(ctx, query) (*AutocompleteResult, error)
GET/api/v1/geocode/autocomplete
Batch geocode multiple addresses
client.Geocode.Batch(ctx, body) (*GeocodeBatchResponse, error)
POST/api/v1/geocode/batch
ModelsExpand Collapse
type AutocompleteResult struct{…}

GeoJSON FeatureCollection of autocomplete suggestions

Features []GeocodingFeature
Coordinates GeoJsonGeometryCoordinatesUnion

GeoJSON coordinates array (nesting depth varies by geometry type)

One of the following:
type GeoJsonGeometryCoordinatesArray []float64
type GeoJsonGeometryCoordinatesArray [][]float64
type GeoJsonGeometryCoordinatesArray [][][]float64
type GeoJsonGeometryCoordinatesArray [][][][]float64
Type GeoJsonGeometryType
One of the following:
const GeoJsonGeometryTypePoint GeoJsonGeometryType = "Point"
const GeoJsonGeometryTypeLineString GeoJsonGeometryType = "LineString"
const GeoJsonGeometryTypePolygon GeoJsonGeometryType = "Polygon"
const GeoJsonGeometryTypeMultiPoint GeoJsonGeometryType = "MultiPoint"
const GeoJsonGeometryTypeMultiLineString GeoJsonGeometryType = "MultiLineString"
const GeoJsonGeometryTypeMultiPolygon GeoJsonGeometryType = "MultiPolygon"
Properties GeocodingFeatureProperties
CountryCode stringoptional

ISO 3166-1 alpha-2 country code

DisplayName stringoptional

Formatted address or place name

DistanceM float64optional

Distance in meters

OsmID int64optional

OpenStreetMap ID

OsmType stringoptional

OSM element type

Score float64optional

Match confidence score

Source stringoptional

Result source (address, place, interpolation)

Type GeocodingFeatureType
Type AutocompleteResultType
type GeocodeResult struct{…}

GeoJSON FeatureCollection of geocoding results

Features []GeocodingFeature
Coordinates GeoJsonGeometryCoordinatesUnion

GeoJSON coordinates array (nesting depth varies by geometry type)

One of the following:
type GeoJsonGeometryCoordinatesArray []float64
type GeoJsonGeometryCoordinatesArray [][]float64
type GeoJsonGeometryCoordinatesArray [][][]float64
type GeoJsonGeometryCoordinatesArray [][][][]float64
Type GeoJsonGeometryType
One of the following:
const GeoJsonGeometryTypePoint GeoJsonGeometryType = "Point"
const GeoJsonGeometryTypeLineString GeoJsonGeometryType = "LineString"
const GeoJsonGeometryTypePolygon GeoJsonGeometryType = "Polygon"
const GeoJsonGeometryTypeMultiPoint GeoJsonGeometryType = "MultiPoint"
const GeoJsonGeometryTypeMultiLineString GeoJsonGeometryType = "MultiLineString"
const GeoJsonGeometryTypeMultiPolygon GeoJsonGeometryType = "MultiPolygon"
Properties GeocodingFeatureProperties
CountryCode stringoptional

ISO 3166-1 alpha-2 country code

DisplayName stringoptional

Formatted address or place name

DistanceM float64optional

Distance in meters

OsmID int64optional

OpenStreetMap ID

OsmType stringoptional

OSM element type

Score float64optional

Match confidence score

Source stringoptional

Result source (address, place, interpolation)

Type GeocodingFeatureType
Type GeocodeResultType
type GeocodingFeature struct{…}
Coordinates GeoJsonGeometryCoordinatesUnion

GeoJSON coordinates array (nesting depth varies by geometry type)

One of the following:
type GeoJsonGeometryCoordinatesArray []float64
type GeoJsonGeometryCoordinatesArray [][]float64
type GeoJsonGeometryCoordinatesArray [][][]float64
type GeoJsonGeometryCoordinatesArray [][][][]float64
Type GeoJsonGeometryType
One of the following:
const GeoJsonGeometryTypePoint GeoJsonGeometryType = "Point"
const GeoJsonGeometryTypeLineString GeoJsonGeometryType = "LineString"
const GeoJsonGeometryTypePolygon GeoJsonGeometryType = "Polygon"
const GeoJsonGeometryTypeMultiPoint GeoJsonGeometryType = "MultiPoint"
const GeoJsonGeometryTypeMultiLineString GeoJsonGeometryType = "MultiLineString"
const GeoJsonGeometryTypeMultiPolygon GeoJsonGeometryType = "MultiPolygon"
Properties GeocodingFeatureProperties
CountryCode stringoptional

ISO 3166-1 alpha-2 country code

DisplayName stringoptional

Formatted address or place name

DistanceM float64optional

Distance in meters

OsmID int64optional

OpenStreetMap ID

OsmType stringoptional

OSM element type

Score float64optional

Match confidence score

Source stringoptional

Result source (address, place, interpolation)

Type GeocodingFeatureType
type ReverseGeocodeResult struct{…}

GeoJSON FeatureCollection of reverse geocoding results

Features []GeocodingFeature
Coordinates GeoJsonGeometryCoordinatesUnion

GeoJSON coordinates array (nesting depth varies by geometry type)

One of the following:
type GeoJsonGeometryCoordinatesArray []float64
type GeoJsonGeometryCoordinatesArray [][]float64
type GeoJsonGeometryCoordinatesArray [][][]float64
type GeoJsonGeometryCoordinatesArray [][][][]float64
Type GeoJsonGeometryType
One of the following:
const GeoJsonGeometryTypePoint GeoJsonGeometryType = "Point"
const GeoJsonGeometryTypeLineString GeoJsonGeometryType = "LineString"
const GeoJsonGeometryTypePolygon GeoJsonGeometryType = "Polygon"
const GeoJsonGeometryTypeMultiPoint GeoJsonGeometryType = "MultiPoint"
const GeoJsonGeometryTypeMultiLineString GeoJsonGeometryType = "MultiLineString"
const GeoJsonGeometryTypeMultiPolygon GeoJsonGeometryType = "MultiPolygon"
Properties GeocodingFeatureProperties
CountryCode stringoptional

ISO 3166-1 alpha-2 country code

DisplayName stringoptional

Formatted address or place name

DistanceM float64optional

Distance in meters

OsmID int64optional

OpenStreetMap ID

OsmType stringoptional

OSM element type

Score float64optional

Match confidence score

Source stringoptional

Result source (address, place, interpolation)

Type GeocodingFeatureType
Type ReverseGeocodeResultType