NEW Geloky now works inside Claude, ChatGPT and Cursor. See how Geloky inside Claude & ChatGPT →

API docs

Geloky API

Geocode addresses, find the address of a point and measure distances and routes with simple HTTPS requests. The same service also runs as an MCP server, so AI assistants can use it too.

Base URLhttps://geloky.com/api/geo
RequestsHTTPS GET, answers in JSON
AuthenticationYour API key in the key parameter
Price$0.001 per request, per address in a batch, per leg of a route. Requests that end in an error are free.
Speed limitNone per minute; send as many requests as you need

New here? Your first top-up comes with $10 extra.

Your first request
curl -G https://geloky.com/api/geo/geocode \
  --data-urlencode "address=350 5th Ave, New York, NY 10118" \
  -d key=YOUR_API_KEY
import requests
resp = requests.get("https://geloky.com/api/geo/geocode", params={
    "address": "350 5th Ave, New York, NY 10118",
    "key": "YOUR_API_KEY",
})
print(resp.json())
const params = new URLSearchParams({
  address: "350 5th Ave, New York, NY 10118",
  key: "YOUR_API_KEY",
});
const res = await fetch("https://geloky.com/api/geo/geocode?" + params);
console.log(await res.json());
$query = http_build_query([
    'address' => '350 5th Ave, New York, NY 10118',
    'key' => 'YOUR_API_KEY',
]);
$data = json_decode(file_get_contents('https://geloky.com/api/geo/geocode?' . $query), true);
print_r($data);
Response
[
  {
    "address": "350 5th Ave, New York, New York, 10118",
    "latitude": 40.74837686528841,
    "longitude": -73.98485413472395
  }
]
{
  "results": [
    {
      "formatted_address": "350 5th Ave, New York, New York, 10118",
      "geometry": {
        "location": {
          "lat": 40.74837686528841,
          "lng": -73.98485413472395
        }
      }
    }
  ],
  "status": "OK"
}

Authentication

Every request carries your API key in the key parameter. The key is on the API tab of your dashboard, where you can also replace it at any time.

AI assistants connected over MCP send the same key as a header instead: Authorization: Bearer YOUR_API_KEY.

The key travels with every request
GET https://geloky.com/api/geo/geocode
    ?address=350%205th%20Ave%2C%20New%20York
    &key=YOUR_API_KEY

Errors and billing

When a request cannot be served you get an object with code set to ERROR and a message, instead of results. Errors are never charged.

MessageWhat it means
Wrong keyThe key is missing, mistyped or was replaced.
You don't have enough funds. Please top up your API Wallet.The wallet cannot pay for the request.
points may contain at most 25 locationsAn input problem; the message names the parameter.
Routing is temporarily unavailable, please retry later. Nothing was charged.A routing provider is down. Retry in a minute.

Set an email reminder for a low balance on the API tab of your dashboard, so requests never stop by surprise.

Error response
{
  "code": "ERROR",
  "message": "You don't have enough funds. Please top up your API Wallet."
}

Check your balance

GET/api/geo/balance

What is left in your API wallet and how many requests it has paid for. It's free and works with an empty wallet too, so you can check a key before your first top-up.

Free
ParameterWhat it does
key
required
Your API key, from the API tab of your dashboard. A key that isn't valid gets Wrong key.

What comes back

FieldWhat it holds
balance_usdWhat is left in the wallet, in US dollars.
requests_totalThe requests this wallet has paid for so far.
price_per_request_usdThe price of one request: 0.001.
top_up_urlWhere to top up: the API tab of your dashboard.
Request
curl -G https://geloky.com/api/geo/balance \
  -d key=YOUR_API_KEY
Response
{
  "balance_usd": 24.999,
  "requests_total": 1,
  "price_per_request_usd": 0.001,
  "top_up_url": "https://geloky.com/dashboard/tab/api"
}

Geocoding

Addresses and coordinates

Turn addresses into latitude and longitude, or points back into addresses, one at a time or in batches. Every endpoint answers in the Geloky format by default, or in the shape of the Google Geocoding API with format=google.

Geocode an address

GET/api/geo/geocode

Finds the latitude and longitude of one address, place or postal code.

$0.001 per request
ParameterWhat it does
address
required
The address to look up. Street, city, postal code and country give the best match; leave out business names and unit numbers.
key
required
Your API key, from the API tab of your dashboard.
format
optional · default geloky
geloky for a plain list, google for the same shape as the Google Geocoding API.
fields
optional
Extra columns, comma separated: timezone, county, census (tract and block group), district, or all. County, census and district are for the US only. +$0.001 per lookup, whatever you ask for. See Extra columns.
curl -G https://geloky.com/api/geo/geocode \
  --data-urlencode "address=350 5th Ave, New York, NY 10118" \
  -d key=YOUR_API_KEY
import requests
resp = requests.get("https://geloky.com/api/geo/geocode", params={
    "address": "350 5th Ave, New York, NY 10118",
    "key": "YOUR_API_KEY",
})
print(resp.json())
const params = new URLSearchParams({
  address: "350 5th Ave, New York, NY 10118",
  key: "YOUR_API_KEY",
});
const res = await fetch("https://geloky.com/api/geo/geocode?" + params);
console.log(await res.json());
$query = http_build_query([
    'address' => '350 5th Ave, New York, NY 10118',
    'key' => 'YOUR_API_KEY',
]);
$data = json_decode(file_get_contents('https://geloky.com/api/geo/geocode?' . $query), true);
print_r($data);
Response
[
  {
    "address": "350 5th Ave, New York, New York, 10118",
    "latitude": 40.74837686528841,
    "longitude": -73.98485413472395
  }
]
{
  "results": [
    {
      "formatted_address": "350 5th Ave, New York, New York, 10118",
      "geometry": {
        "location": {
          "lat": 40.74837686528841,
          "lng": -73.98485413472395
        }
      }
    }
  ],
  "status": "OK"
}

Reverse geocode a point

GET/api/geo/reverse-geocode

Finds the nearest readable address for one latitude and longitude.

$0.001 per request
ParameterWhat it does
latlng
required
Latitude and longitude, separated by a comma, like 40.74838,-73.98485.
key
required
Your API key, from the API tab of your dashboard.
format
optional · default geloky
geloky for a plain list, google for the same shape as the Google Geocoding API.
fields
optional
Extra columns, comma separated: timezone, county, census (tract and block group), district, or all. County, census and district are for the US only. +$0.001 per lookup, whatever you ask for. See Extra columns.

What comes back

FieldWhat it holds
addressThe nearest numbered address. Where there is none: a named place, a street or an area. In India it opens with a well-known place nearby, when there is one.
latitude
longitude
Where that address is: usually a few metres from your point. For an area it is your own point.
typeHow exact the address is: address for a numbered building, place for a named place such as a stadium, a shop or a sea, street, or area for a postcode, village or district.
distanceMetres from your point to the address, or null for an area.
plus_codeYour point as a plus code. Google Maps opens it at the spot, to within about 14 metres.

In Google format the plus code is at plus_code.global_code.

curl -G https://geloky.com/api/geo/reverse-geocode \
  --data-urlencode "latlng=40.74838,-73.98485" \
  -d key=YOUR_API_KEY
import requests
resp = requests.get("https://geloky.com/api/geo/reverse-geocode", params={
    "latlng": "40.74838,-73.98485",
    "key": "YOUR_API_KEY",
})
print(resp.json())
const params = new URLSearchParams({
  latlng: "40.74838,-73.98485",
  key: "YOUR_API_KEY",
});
const res = await fetch("https://geloky.com/api/geo/reverse-geocode?" + params);
console.log(await res.json());
$query = http_build_query([
    'latlng' => '40.74838,-73.98485',
    'key' => 'YOUR_API_KEY',
]);
$data = json_decode(file_get_contents('https://geloky.com/api/geo/reverse-geocode?' . $query), true);
print_r($data);
Response
[
  {
    "address": "350 5th Ave, New York, NY, 10118, USA",
    "latitude": 40.748376823379,
    "longitude": -73.984854050905,
    "type": "address",
    "distance": 0,
    "plus_code": "87G8P2X8+93"
  }
]
{
  "results": [
    {
      "formatted_address": "350 5th Ave, New York, NY, 10118, USA",
      "geometry": {
        "location": {
          "lat": 40.748376823379,
          "lng": -73.984854050905
        }
      },
      "plus_code": {
        "global_code": "87G8P2X8+93"
      },
      "type": "address",
      "distance": 0
    }
  ],
  "status": "OK"
}
A point in India: 28.5605149, 77.2667717
[
  {
    "address": "Near NIIT - New Friends Colony, South Delhi, Mathura Road, Okhla, South East Delhi, Delhi, 110065, IND",
    "latitude": 28.560642820313,
    "longitude": 77.267006013676,
    "type": "street",
    "distance": 27,
    "plus_code": "7JWVH768+6P"
  }
]

Geocode many addresses

GET/api/geo/geocode-batch

Geocodes a list of addresses in one request. Results come back in the order you sent them.

$0.001 per address
ParameterWhat it does
addresses
required
A JSON array of addresses, like ["350 5th Ave, New York", "1 Centre St, New York"].
key
required
Your API key, from the API tab of your dashboard.
format
optional · default geloky
geloky for a plain list, google for the same shape as the Google Geocoding API.
fields
optional
Extra columns, comma separated: timezone, county, census (tract and block group), district, or all. County, census and district are for the US only. +$0.001 per lookup, whatever you ask for. See Extra columns.

For thousands of rows, uploading the spreadsheet is usually simpler: batch geocoding.

curl -G https://geloky.com/api/geo/geocode-batch \
  --data-urlencode 'addresses=["350 5th Ave, New York, NY 10118","1 Centre St, New York, NY 10007"]' \
  -d key=YOUR_API_KEY
import json
import requests
resp = requests.get("https://geloky.com/api/geo/geocode-batch", params={
    "addresses": json.dumps([
        "350 5th Ave, New York, NY 10118",
        "1 Centre St, New York, NY 10007",
    ]),
    "key": "YOUR_API_KEY",
})
print(resp.json())
const params = new URLSearchParams({
  addresses: JSON.stringify([
    "350 5th Ave, New York, NY 10118",
    "1 Centre St, New York, NY 10007",
  ]),
  key: "YOUR_API_KEY",
});
const res = await fetch("https://geloky.com/api/geo/geocode-batch?" + params);
console.log(await res.json());
$query = http_build_query([
    'addresses' => json_encode([
        '350 5th Ave, New York, NY 10118',
        '1 Centre St, New York, NY 10007',
    ]),
    'key' => 'YOUR_API_KEY',
]);
$data = json_decode(file_get_contents('https://geloky.com/api/geo/geocode-batch?' . $query), true);
print_r($data);
Response
[
  {
    "address": "350 5th Ave, New York, New York, 10118",
    "latitude": 40.74837686528841,
    "longitude": -73.98485413472395
  },
  {
    "address": "1 Centre St, New York, New York, 10007",
    "latitude": 40.712968,
    "longitude": -74.004124
  }
]
{
  "results": [
    {
      "formatted_address": "350 5th Ave, New York, New York, 10118",
      "geometry": {
        "location": {
          "lat": 40.74837686528841,
          "lng": -73.98485413472395
        }
      }
    },
    {
      "formatted_address": "1 Centre St, New York, New York, 10007",
      "geometry": {
        "location": {
          "lat": 40.712968,
          "lng": -74.004124
        }
      }
    }
  ],
  "status": "OK"
}

Reverse geocode many points

GET/api/geo/reverse-geocode-batch

Finds the address of every point in a list, in the order you sent them.

$0.001 per point
ParameterWhat it does
coordinates
required
A JSON array of "latitude,longitude" strings.
key
required
Your API key, from the API tab of your dashboard.
format
optional · default geloky
geloky for a plain list, google for the same shape as the Google Geocoding API.
fields
optional
Extra columns, comma separated: timezone, county, census (tract and block group), district, or all. County, census and district are for the US only. +$0.001 per lookup, whatever you ask for. See Extra columns.

Every item has the same fields as a single reverse lookup.

curl -G https://geloky.com/api/geo/reverse-geocode-batch \
  --data-urlencode 'coordinates=["40.74838,-73.98485","40.71297,-74.00412"]' \
  -d key=YOUR_API_KEY
import json
import requests
resp = requests.get("https://geloky.com/api/geo/reverse-geocode-batch", params={
    "coordinates": json.dumps([
        "40.74838,-73.98485",
        "40.71297,-74.00412",
    ]),
    "key": "YOUR_API_KEY",
})
print(resp.json())
const params = new URLSearchParams({
  coordinates: JSON.stringify([
    "40.74838,-73.98485",
    "40.71297,-74.00412",
  ]),
  key: "YOUR_API_KEY",
});
const res = await fetch("https://geloky.com/api/geo/reverse-geocode-batch?" + params);
console.log(await res.json());
$query = http_build_query([
    'coordinates' => json_encode([
        '40.74838,-73.98485',
        '40.71297,-74.00412',
    ]),
    'key' => 'YOUR_API_KEY',
]);
$data = json_decode(file_get_contents('https://geloky.com/api/geo/reverse-geocode-batch?' . $query), true);
print_r($data);
Response
[
  {
    "address": "350 5th Ave, New York, NY, 10118, USA",
    "latitude": 40.748376823379,
    "longitude": -73.984854050905,
    "type": "address",
    "distance": 0,
    "plus_code": "87G8P2X8+93"
  },
  {
    "address": "1 Centre St, New York, NY, 10007, USA",
    "latitude": 40.712980297726,
    "longitude": -74.003758092413,
    "type": "address",
    "distance": 31,
    "plus_code": "87G7PX7W+59"
  }
]
{
  "results": [
    {
      "formatted_address": "350 5th Ave, New York, NY, 10118, USA",
      "geometry": {
        "location": {
          "lat": 40.748376823379,
          "lng": -73.984854050905
        }
      },
      "plus_code": {
        "global_code": "87G8P2X8+93"
      },
      "type": "address",
      "distance": 0
    },
    {
      "formatted_address": "1 Centre St, New York, NY, 10007, USA",
      "geometry": {
        "location": {
          "lat": 40.712980297726,
          "lng": -74.003758092413
        }
      },
      "plus_code": {
        "global_code": "87G7PX7W+59"
      },
      "type": "address",
      "distance": 31
    }
  ],
  "status": "OK"
}

Extra columns

Add fields to any geocoding call, single or batch, and every answer also gets its time zone and, in the US, its county, census tract, block group and congressional district. They are worked out on Geloky’s own server, from the US Census Bureau’s TIGER/Line boundaries and timezone-boundary-builder (© OpenStreetMap contributors).

+$0.001 per lookup
FieldWhat it holds
timezone, utc_offset, dstThe time zone’s name, its offset from UTC in standard time, and yes or no for daylight saving time. Any country.
county, county_fipsThe county’s name and its 5-digit code. US only.
tract, block_groupThe 11-digit 2020 census tract and the 12-digit block group. US only.
districtThe congressional district of the 120th Congress, such as NY-12. US only.
match_levelbuilding, street, place, road, postcode, city or region; point for a reverse lookup. County, tract and district are filled for building, street, place and point only.

Fields you didn’t ask for are left out; an empty one means there is nothing to say, such as a county outside the US. The Google format leaves the extra columns out. AI assistants ask for the same with extra_columns: true on the geocoding tools.

Geocode with every extra column
curl -G https://geloky.com/api/geo/geocode \
  --data-urlencode "address=350 5th Ave, New York, NY" \
  -d fields=all -d key=YOUR_API_KEY
[
  {
    "address": "350 5th Ave, New York, New York, 10118",
    "latitude": 40.748377,
    "longitude": -73.984854,
    "timezone": "America/New_York",
    "utc_offset": "-05:00",
    "dst": "yes",
    "county": "New York County",
    "county_fips": "36061",
    "tract": "36061007600",
    "block_group": "360610076001",
    "district": "NY-12",
    "match_level": "building"
  }
]

Distances

Distances and routes

Travel distance and time between two points or two addresses, or a whole route through up to 25 stops. Distances are in miles unless you ask for kilometers; times are always in minutes.

Distance between two places

GET/api/geo/distance

Road distance and travel time from an origin to a destination. Each end is a point or an address: Geloky finds an address first, as the geocode endpoint does, and the answer adds origin_address and destination_address, the addresses it found. When an address is not found, the answer is an error and nothing is charged.

$0.001 per request, + $0.001 per address
ParameterWhat it does
origin
required
Starting point, as latitude,longitude, or an address like 350 5th Ave, New York, NY 10118.
destination
required
End point or address, in either form.
vehicle
optional · default auto
auto, truck or walk.
priority
optional · default fast
fast for the quickest route, short for the shortest.
units
optional · default ml
ml for miles or km for kilometers.
order
optional · default lat_lon
Use lon_lat if your points list longitude first.
key
required
Your API key, from the API tab of your dashboard.
format
optional · default geloky
geloky for a plain list, google for the same shape as the Google Geocoding API.
# Between two points
curl -G https://geloky.com/api/geo/distance \
  --data-urlencode "origin=40.74470,-73.94850" \
  --data-urlencode "destination=40.74838,-73.98485" \
  -d key=YOUR_API_KEY

# Between two addresses
curl -G https://geloky.com/api/geo/distance \
  --data-urlencode "origin=63 Flushing Ave, Brooklyn, NY 11205" \
  --data-urlencode "destination=350 5th Ave, New York, NY 10118" \
  -d key=YOUR_API_KEY
import requests

# Between two points
resp = requests.get("https://geloky.com/api/geo/distance", params={
    "origin": "40.74470,-73.94850",
    "destination": "40.74838,-73.98485",
    "key": "YOUR_API_KEY",
})
print(resp.json())

# Between two addresses
resp = requests.get("https://geloky.com/api/geo/distance", params={
    "origin": "63 Flushing Ave, Brooklyn, NY 11205",
    "destination": "350 5th Ave, New York, NY 10118",
    "key": "YOUR_API_KEY",
})
print(resp.json())
// Between two points
const points = new URLSearchParams({
  origin: "40.74470,-73.94850",
  destination: "40.74838,-73.98485",
  key: "YOUR_API_KEY",
});
let res = await fetch("https://geloky.com/api/geo/distance?" + points);
console.log(await res.json());

// Between two addresses
const addresses = new URLSearchParams({
  origin: "63 Flushing Ave, Brooklyn, NY 11205",
  destination: "350 5th Ave, New York, NY 10118",
  key: "YOUR_API_KEY",
});
res = await fetch("https://geloky.com/api/geo/distance?" + addresses);
console.log(await res.json());
// Between two points
$query = http_build_query([
    'origin' => '40.74470,-73.94850',
    'destination' => '40.74838,-73.98485',
    'key' => 'YOUR_API_KEY',
]);
$data = json_decode(file_get_contents('https://geloky.com/api/geo/distance?' . $query), true);
print_r($data);

// Between two addresses
$query = http_build_query([
    'origin' => '63 Flushing Ave, Brooklyn, NY 11205',
    'destination' => '350 5th Ave, New York, NY 10118',
    'key' => 'YOUR_API_KEY',
]);
$data = json_decode(file_get_contents('https://geloky.com/api/geo/distance?' . $query), true);
print_r($data);
Response
// Between two points
[
  {
    "origin": "40.74470,-73.94850",
    "destination": "40.74838,-73.98485",
    "length": 2.391,
    "time": 14.78
  }
]

// Between two addresses, with the addresses found
[
  {
    "origin": "40.698236152855,-73.975163732644",
    "destination": "40.748376823379,-73.984854050905",
    "length": 6.517,
    "time": 30.01,
    "origin_address": "63 Flushing Ave, Brooklyn, New York, 11205",
    "destination_address": "350 5th Ave, New York, New York, 10118"
  }
]
// Between two points
{
  "destination": "40.74838,-73.98485",
  "origin": "40.74470,-73.94850",
  "rows": [
    {
      "elements": {
        "distance": {
          "text": "2.391 ml",
          "value": 2.391
        },
        "duration": {
          "text": "14.78 mins",
          "value": 14.78
        },
        "status": "OK"
      }
    }
  ],
  "status": "OK"
}

// Between two addresses: the places by their addresses
{
  "destination": "350 5th Ave, New York, New York, 10118",
  "origin": "63 Flushing Ave, Brooklyn, New York, 11205",
  "rows": [
    {
      "elements": {
        "distance": {
          "text": "6.517 ml",
          "value": 6.517
        },
        "duration": {
          "text": "30.01 mins",
          "value": 30.01
        },
        "status": "OK"
      }
    }
  ],
  "status": "OK"
}

Route through several stops

GET/api/geo/route

Plans one road route through 2 to 25 stops in the order given, each a point or an address, with every leg, the total and, if you want it, the shape to draw on a map. New York to Philadelphia to Washington has two legs and costs $0.002 from three points, or $0.005 from three addresses. An address the route comes back to is charged once.

$0.001 per leg, + $0.001 per address
ParameterWhat it does
points
required
2 to 25 stops separated by |, each as latitude,longitude or an address. If an address holds a |, send the stops as a JSON array of strings.
vehicle
optional · default auto
auto, truck, walk, or direct for straight lines without travel time.
geometry
optional · default none
geojson or polyline to include the route shape.
units
optional · default ml
ml or km.
priority
optional · default fast
fast or short.
order
optional · default lat_lon
Use lon_lat if your points list longitude first.
key
required
Your API key, from the API tab of your dashboard.

What comes back

FieldWhat it holds
legsOne object per pair of neighbouring stops, in route order: origin, destination, length and time; for a stop given as an address, also origin_address or destination_address, the address found.
totalLength and time of the whole route, the sum of the legs.
geometryThe route shape in the format you asked for, or null.
sourcerouting for a road route, direct for straight lines.
# Through three points, with the route shape
curl -G https://geloky.com/api/geo/route \
  --data-urlencode "points=40.7128,-74.0060|39.9526,-75.1652|38.9072,-77.0369" \
  -d geometry=geojson \
  -d key=YOUR_API_KEY

# Through three addresses
curl -G https://geloky.com/api/geo/route \
  --data-urlencode "points=1 Centre St, New York, NY 10007|1400 John F Kennedy Blvd, Philadelphia, PA 19107|1600 Pennsylvania Ave NW, Washington, DC 20500" \
  -d key=YOUR_API_KEY
import requests

# Through three points, with the route shape
resp = requests.get("https://geloky.com/api/geo/route", params={
    "points": "40.7128,-74.0060|39.9526,-75.1652|38.9072,-77.0369",
    "geometry": "geojson",
    "key": "YOUR_API_KEY",
})
print(resp.json())

# Through three addresses
resp = requests.get("https://geloky.com/api/geo/route", params={
    "points": "|".join([
        "1 Centre St, New York, NY 10007",
        "1400 John F Kennedy Blvd, Philadelphia, PA 19107",
        "1600 Pennsylvania Ave NW, Washington, DC 20500",
    ]),
    "key": "YOUR_API_KEY",
})
print(resp.json())
// Through three points, with the route shape
const points = new URLSearchParams({
  points: "40.7128,-74.0060|39.9526,-75.1652|38.9072,-77.0369",
  geometry: "geojson",
  key: "YOUR_API_KEY",
});
let res = await fetch("https://geloky.com/api/geo/route?" + points);
console.log(await res.json());

// Through three addresses
const addresses = new URLSearchParams({
  points: [
    "1 Centre St, New York, NY 10007",
    "1400 John F Kennedy Blvd, Philadelphia, PA 19107",
    "1600 Pennsylvania Ave NW, Washington, DC 20500",
  ].join("|"),
  key: "YOUR_API_KEY",
});
res = await fetch("https://geloky.com/api/geo/route?" + addresses);
console.log(await res.json());
// Through three points, with the route shape
$query = http_build_query([
    'points' => '40.7128,-74.0060|39.9526,-75.1652|38.9072,-77.0369',
    'geometry' => 'geojson',
    'key' => 'YOUR_API_KEY',
]);
$data = json_decode(file_get_contents('https://geloky.com/api/geo/route?' . $query), true);
print_r($data);

// Through three addresses
$query = http_build_query([
    'points' => implode('|', [
        '1 Centre St, New York, NY 10007',
        '1400 John F Kennedy Blvd, Philadelphia, PA 19107',
        '1600 Pennsylvania Ave NW, Washington, DC 20500',
    ]),
    'key' => 'YOUR_API_KEY',
]);
$data = json_decode(file_get_contents('https://geloky.com/api/geo/route?' . $query), true);
print_r($data);
Response, coordinates shortened
// Through three points, with the route shape
{
  "legs": [
    {
      "origin": "40.7128,-74.0060",
      "destination": "39.9526,-75.1652",
      "length": 94.423,
      "time": 125.55
    },
    {
      "origin": "39.9526,-75.1652",
      "destination": "38.9072,-77.0369",
      "length": 137.355,
      "time": 187.74
    }
  ],
  "total": {
    "length": 231.778,
    "time": 313.29
  },
  "geometry": {
    "type": "LineString",
    "coordinates": [[-74.006257, 40.712508], [-74.006347, 40.712553], ...]
  },
  "source": "routing"
}

// Through three addresses: each leg also names the addresses found
{
  "legs": [
    {
      "origin": "40.7130,-74.0038",
      "destination": "39.9525,-75.1638",
      "length": 94.59,
      "time": 121.56,
      "origin_address": "1 Centre St, New York, New York, 10007",
      "destination_address": "1400 John F Kennedy Blvd, Philadelphia, Pennsylvania, 19107"
    },
    {
      "origin": "39.9525,-75.1638",
      "destination": "38.8977,-77.0365",
      "length": 143.696,
      "time": 180.04,
      "origin_address": "1400 John F Kennedy Blvd, Philadelphia, Pennsylvania, 19107",
      "destination_address": "1600 Pennsylvania Ave NW, Washington, District of Columbia, 20500"
    }
  ],
  "total": {
    "length": 238.286,
    "time": 301.6
  },
  "geometry": null,
  "source": "routing"
}

AI assistants

MCP server

Claude, ChatGPT, Codex, Gemini CLI, Cursor, VS Code and any other MCP client can geocode, reverse geocode and measure distances and routes by themselves. Same key, same prices: every lookup is paid from your API wallet.

Connect an assistant

Endpointhttps://geloky.com/mcp
TransportStreamable HTTP, protocol versions 2024-11-05 to 2026-07-28
KeyAuthorization: Bearer YOUR_API_KEY, or X-Api-Key, or ?key= in the URL
  • Claude and ChatGPT apps. Add a custom connector with the connector URL. No OAuth settings are needed. Keep the URL private, it contains your key.
  • Claude Code. Run the command once; the tools appear in every session.
  • Cursor, VS Code and other editors. Add the server to the editor's MCP settings as shown.
  • Codex. Add the server to ~/.codex/config.toml. The Codex CLI, the IDE extension and the ChatGPT desktop app share it.
  • Gemini CLI. Run the command once. Gemini uses it only in folders you have marked as trusted.
  • Your own agent. Use any MCP SDK with the Streamable HTTP transport and the Authorization header.

Then just ask, for example “Find the coordinates of these 20 store addresses” or “How long is the drive from our warehouse to each customer?”

https://geloky.com/mcp?key=YOUR_API_KEY

Tools and prices

ToolWhat it doesPrice
geocodeCoordinates of one address, place or postal code$0.001
reverse_geocodeStreet address of one point$0.001
batch_geocodeUp to 50 addresses per call, in input order$0.001 per address
batch_reverse_geocodeUp to 50 points per call, in input order$0.001 per point
distanceRoad distance and time between two points or addresses, or a straight line$0.001
+ $0.001 per address
routeA route through 2 to 25 stops, with every leg and the total, from points or addresses$0.001 per leg
+ $0.001 per address
account_balanceWhat is left in the API walletFree

Every result includes cost_usd and balance_usd. Calls that fail are not charged, and a call the wallet cannot pay for in full is refused before it runs.

A tool call over plain HTTP
curl https://geloky.com/mcp \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{"jsonrpc": "2.0", "id": 1, "method": "tools/call",
       "params": {"name": "geocode",
                  "arguments": {"address": "350 5th Avenue, New York"}}}'
The reply, shortened
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "structuredContent": {
      "found": true,
      "address": "350 5th Ave, New York, New York, 10118",
      "latitude": 40.748376823379,
      "longitude": -73.984854050905,
      "cost_usd": 0.001,
      "balance_usd": 24.999
    },
    "isError": false
  }
}

No-code

Zapier and n8n

Geocode new rows, contacts and orders as they arrive, without writing code. Same key, same prices: every lookup is paid from your API wallet.

Use Geloky in Zapier Beta

Zapier is still reviewing Geloky for its app directory. Until then, Geloky joins your Zapier account through an invite link.

  1. Open the invite link and accept it.
  2. In a Zap, add an action step and pick Geloky.
  3. Connect it with your API key, from the API tab of your dashboard.
ActionWhat it doesPrice
Geocode AddressLatitude, longitude and the matched address of an address, a place or a postal code$0.001
Reverse Geocode CoordinatesThe nearest street address to a point$0.001
Calculate DistanceRoad distance and travel time between two addresses or points, by car, truck or on foot$0.001
+ $0.001 per address

When Geloky finds nothing, that run of the Zap stops, so no blanks are written further on. An address Calculate Distance cannot find costs nothing.

A Zap with Geloky
1  Trigger   Google Sheets: New spreadsheet row
2  Action    Geloky: Geocode Address
              Address     Street, City and ZIP of the row
3  Action    Google Sheets: Update spreadsheet row
              Latitude    Latitude from step 2
              Longitude   Longitude from step 2
What Geocode Address returns
Latitude                40.748377
Longitude               -73.984854
Latitude and longitude  40.748377,-73.984854
Matched address         350 5th Ave, New York, New York, 10118
Map link                https://geloky.com/geocoding/lat-lon-point/40.748377/-73.984854

Use Geloky in n8n Self-hosted

The Geloky node is an n8n community node, n8n-nodes-geloky. n8n hasn't verified it yet, so for now it installs on self-hosted n8n. On n8n Cloud, call the REST API from an HTTP Request node.

  1. In n8n, open Settings → Community nodes and press Install a community node.
  2. Enter n8n-nodes-geloky, tick the box about unverified code and press Install.
  3. Add the Geloky node to a workflow and create a Geloky API credential with your API key, from the API tab of your dashboard.
OperationWhat it doesPrice
Geocode AddressLatitude, longitude and the matched address of an address, a place or a postal code$0.001
Reverse GeocodeThe nearest street address to a point, how exact it is and how far away$0.001
Calculate DistanceRoad distance and travel time between two addresses or points, by car, truck or on foot$0.001
+ $0.001 per address

Empty cells are never sent and cost nothing. When Geloky finds nothing, the item gets found: false and the workflow goes on; a wrong key or an empty wallet stops it. n8n's AI Agent can use the node as a tool too.

A workflow with Geloky
1  Google Sheets  Get row(s) in sheet
2  Geloky         Geocode Address
                  Address     {{ $json.Address }}
3  Google Sheets  Update row in sheet
                  row_number  row_number from step 1
                  Latitude    {{ $json.latitude }}
                  Longitude   {{ $json.longitude }}
What Geocode Address returns
{
  "found": true,
  "address": "350 5th Ave, New York, NY 10118",
  "latitude": 40.748377,
  "longitude": -73.984854,
  "coordinates": "40.748377,-73.984854",
  "matched_address": "350 5th Ave, New York, New York, 10118",
  "map_url": "https://geloky.com/geocoding/lat-lon-point/40.748377/-73.984854",
  "cost_usd": 0.001
}

Stuck, or missing something? hello@geloky.com answers within a day.

API pricing