v1

latestOpenAPI 3.1.02026-07-243613262.4 KB
Closest coordinates

Find the closest locations

This endpoint can be used to retrieve the closest locations from a point ordered by distance or the locations around a point (inside a geographical circle with a given radius (in meters)). You can also choose the number of results. By default, the endpoint only returns the closest location.

The coordinates of the point (or center of the circle) must be passed as path parameter as coordinates pair longitude,latitude.

The query parameter locationTypes allows to filter the types returned. A list of values can be passed among port,airport,zipcode,railTerminal, roadTerminal. If this parameter is not passed in the query, all the types will be searched.

The query parameter sizes allows to filter the sizes of the locations returned for ports and airports.

For each location found, geometry (coordinates) is returned as well as a properties field that contains different information according to the type of the location.

For ports : name, locode, country, countryName, size and distance (in meters) from the point passed in the query.

For airports : name, locode, size, iataCode, countryName, countryCode (as a two letters code), subdivisionName, city.

For zipcodes : name, countryCode, countryName, postalCode and distance (in meters) from the point passed in the query.

For rail terminals and road terminals : name, locode, countryCode, countryName and distance (in meters) from the point passed in the query.

get/geocoding/v2/closest/{coordinates}

Path parameters

coordinatesstring required
Example:9.965629577636719,53.53296196255539

coordinates pair of the point as longitude,latitude. Longitude should be between -180 and 180 degrees, and latitude between -90 and 90 degrees.

Query parameters

radiusnumber
Example:10000

the radius of the geographical circle used to search closest locations (in meters). If not passed, the closest locations are retrieved.

locationTypesstring
Example:port,airport,railTerminal

A list of strings used to filter the location types. Permitted values are port, airport, zipcode, railTerminal, roadTerminal. If not passed, all the types will be taken into account.

sizesstring
Example:large,medium

A list of strings used to filter the location by size. Permitted values are large, medium, small and tiny. Note that this parameter is available for ports and airports search only. If not passed, all the sizes will be taken into account.

limitinteger
Example:10

The maximum number of results (between 0 and 50). If not passed, the default limit is 1.

countryCodesstring
Example:DE,FR

A list of country codes (2 characters ISO) used to filter the location by country.

excludeCountryCodesstring
Example:US,CA

A list of country codes (2 characters ISO) used to exclude location of some countries.

Response

OK