NAV

Introduction

Welcome to the Geloky API! You can use our Geocoding API to geocode or reverse geocode your data. It allows you to convert addresses to latitude and longitude or convert latitude and longitude to addresses in two formats. There are Geloky and Google Maps response formats.

You can view code examples in the dark area to the right.

Authentication

Geloky uses API keys to allow access to the API. It’s easy to get. Just visit your dashboard panel and you will find your API key there. You can easily replace the API key there too.

Geloky expects for the API key to be included in all API requests to the server as a GET parameter.

Geocoding API

Overview

What is geocoding?

Geocoding is the process of converting addresses (like "1600 Amphitheatre Parkway, Mountain View, CA") into geographic coordinates (like latitude 37.423021 and longitude -122.083739).

Reverse geocoding is the process of converting geographic coordinates into a human-readable address.

The Geocoding API provides a direct way to access these services via an HTTP request. You can check data accuracy the Geocoding service returns here and here.

Geocoding API requests and responses

GET https://geloky.com/api/geo/geocode?address=350, 5th Avenue, New York, 10018, United States&key=YOUR_API_KEY&format=geloky

The above command returns JSON structured like this:

[
  {
    "address": "350 5th Ave, New York, New York, 10118",
    "latitude": 40.74837686528841,
    "longitude": -73.98485413472395
  }
]

GET https://geloky.com/api/geo/geocode?address=350, 5th Avenue, New York, 10018, United States&key=YOUR_API_KEY&format=google

The above command returns JSON structured like this:

{
  "results": 
  [
    {
      "formatted_address": "350 5th Ave, New York, New York, 10118",
      "geometry": 
      {
        "location": 
        {
          "lat": 40.74837686528841,
          "lng": -73.98485413472395
        }
      }
    }
  ],
  "status": "OK"
  }

A Geocoding API request takes the following form: GET https://geloky.com/api/geo/geocode?parameters

Query Parameters

Parameter Required Default Description
address Yes The street address that you want to geocode. Specify addresses in accordance with the format used by the national postal service of the country concerned. Additional address elements such as business names and unit, suite or floor numbers should be avoided. Street address elements should be delimited by spaces (shown here as url-escaped to %20): address=24%20Sussex%20Drive%20Ottawa%20ON
key Yes Your application's API key. This key identifies your application for purposes of quota management. You can get a key here
format No geloky Structure format of returned data. It can be geloky or google

Reverse geocoding (address lookup) request and response

GET https://geloky.com/api/geo/reverse-geocode?latlng=40.74837686528841,-73.98485413472395&key=YOUR_API_KEY&format=geloky

The above command returns JSON structured like this:

[
  {
    "address": "Empire State Building, 350, 5th Avenue, Koreatown, Manhattan, New York County, New York, 10018, United States",
    "latitude": 40.74837686528841,
    "longitude": -73.98485413472395
  }
]

GET https://geloky.com/api/geo/reverse-geocode?latlng=40.74837686528841,-73.98485413472395&key=YOUR_API_KEY&format=google

The above command returns JSON structured like this:

{
  "results": 
  [
    {
      "formatted_address": "Empire State Building, 350, 5th Avenue, Koreatown, Manhattan, New York County, New York, 10018, United States",
      "geometry": 
      {
        "location": 
        {
          "lat": 40.74837686528841,
          "lng": -73.98485413472395
        }
      }
    }
  ],
  "status": "OK"
}

The term geocoding generally refers to translating a human-readable address into a location on a map. The process of doing the opposite, translating a location on the map into a human-readable address, is known as reverse geocoding

A Reverse Geocoding API request takes the following form: GET https://geloky.com/api/geo/reverse-geocode?parameters

Query Parameters

Parameter Required Default Description
latlng Yes The latitude and longitude values specifying the location for which you wish to obtain the closest, human-readable address.
key Yes Your application's API key. This key identifies your application for purposes of quota management. You can get a key here
format No geloky Structure format of returned data. It can be geloky or google