Geocoding

Reverse Geocoding

Retrieve place names and address details from geographic coordinates, returning an array of matching locations.

Reverse geocoding

GET https://mapapi.gebeta.app/v2/search/reverse-geocoding?lon={longitude}&lat={latitude}

The reverse geocoding query type allows you to look up a pair of coordinates and returns the geographic features at that location.

Required parameters

Required parametersTypeDescription
latnumberThe latitude decimal value from the geographic coordinate. Range: -90 to 90.
lonnumberThe longitude decimal value from the geographic coordinate. Range: -180 to 180.
apiKeystringA valid Gebeta API access token. Can also be supplied in the HTTP request as an Authorization: Bearer <apiKey> header.

Optional parameters

Optional parametersTypeDescription
sizeintegerSpecify the maximum number of results to return. Default: 1. Allowed range: 1 to 5.
categorystringFilter results to include only a subset of feature categories. Comma-separated list of category terms.

Example requests

# A basic reverse geocoding request
curl "https://mapapi.gebeta.app/v2/search/reverse-geocoding?lat=9.0192&lon=38.7578&apiKey=YOUR_API_KEY"
 
# Retrieve places near a specific location filtered by size
curl "https://mapapi.gebeta.app/v2/search/reverse-geocoding?lat=9.0192&lon=38.7578&size=3&apiKey=YOUR_API_KEY"

Response

{
  "data": {
    "query": "9.019200,38.757800",
    "results": [
      {
        "id": "way:123456",
        "name": "Bole Road",
        "display_name": "Bole Road, Addis Ababa, Ethiopia",
        "category": "highway",
        "location": {
          "lat": 9.019185,
          "lng": 38.757812
        },
        "address": {
          "city": "Addis Ababa",
          "country": "Ethiopia",
          "country_code": "ETH"
        }
      }
    ]
  }
}

On this page