BYTETOOLS

3geonames API

Free reverse geocoding API with no key: turn coordinates into the nearest named place, timezone, elevation, OSM tags and a three-word location code. Tested example included.

No API key requiredHTTPSFree tier

Endpoint tested and returned HTTP 200 on 2026-08-21

What is the 3geonames API?

3geonames is a free, key-free API that reverse-geocodes any coordinate. It returns the nearest named feature, the nearest major city, timezone, elevation, administrative hierarchy and OpenStreetMap tags, plus a three-word code identifying the location.

Most reverse geocoders answer with an address and stop. 3geonames answers with context: the nearest named feature, the nearest sizeable city and how far away it is, the timezone, the elevation, the administrative levels stacked above the point, and whatever OpenStreetMap knows about the area including its Wikipedia and Wikidata identifiers. For enriching a coordinate rather than addressing it, that breadth is the point.

The three-word code — the `threegeonames` field, such as PARIS-STURGIS-KULDEEP — is a free and open alternative to the proprietary word-triple schemes. Two things temper it: the words are drawn from place names and personal names rather than a curated dictionary, so they are less pronounceable than the commercial equivalents, and this service does not send CORS headers, which means browser code must go through your own server. Note also that numeric values arrive as strings throughout.

Quick facts

Base URL
https://api.3geonames.org
Authentication
No key or account. Free public service; the operator asks for a link back when results are published.
Rate limit
No published quota. It is a small independent service, so cache results and avoid tight loops.
Pricing
Free.
CORS
Not enabled — call it from your server
Official docs
Read the docs

How to use the 3geonames API

Every request below was executed against the live API on 2026-08-21, and the response shown is the real body it returned — not an illustration.

1. Reverse-geocode a coordinate to place, timezone and elevation

GET https://api.3geonames.org/48.8584,2.2945.json

curl
curl 'https://api.3geonames.org/48.8584,2.2945.json'
JavaScript (fetch)
const res = await fetch("https://api.3geonames.org/48.8584,2.2945.json");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);
Python (requests)
import requests

res = requests.get("https://api.3geonames.org/48.8584,2.2945.json", timeout=20)
res.raise_for_status()
print(res.json())
Response — HTTP 200 (truncated)
{
  "threegeonames": "PARIS-STURGIS-KULDEEP",
  "geonumber": "3156701698537",
  "nearest": {
    "inlatt": "48.8584",
    "distance": "0.645",
    "timezone": "Europe/Paris",
    "elevation": "63",
    "region": "Paris",
    "name": "Cité de l'architecture et du patrimoine",
    "state": "FR",
    "latt": "48.8627",
    "longt": "2.28858",
    "city": "Paris",
    "prov": "Île-de-France",
    "inlongt": "2.2945",
    "altgeocode": "PATRIMOINE-WIEVX"
  },
  "osmtags": {
    "ref_INSEE": "7510728",
    "wikidata": "Q3413275",
    "wikipedia": "fr:Quartier du Gros-Caillou",
    "short_name": "Gros-Caillou",
    "name": "Quartier du Gros-Caillou",
    "addr_postcode": "75007",
    "state": "FR",
    "admin_level": "10",
    "boundary": "administrative",
    "id": "266138",
    "type": "boundary"
  },
  "geocode": "CERGY-WIEVX",
  "major": {
    "inlatt": "48.8584",
    "distance": "25.550",
    "timezone": "Europe/Paris",
    "elevation": "54",
    "region": "Département du Val-d’Oise",
    "name": "Cergy-Pontoise",
    "state": "FR",
    "latt": "49.03894",
    "longt": "2.07805",
    "city": "Cergy-Pontoise",
    "prov": "Île-de-France",
    "inlongt": "2.2945"
  },
  "adminareas": {
    "admin10": {
      "wikipedia": "fr:Quartier du Gros-Caillou",
      "wikidata": "Q3413275",
      "ref_INSEE": "7510728",
      "short_name": "Gros-Caillou",
      "osmid": "266138",
      "name": "Quartier du Gros-Caillou",
      "addr_postcode": "75007",
      "admin_level": "10",
      "level": "10",
      "boundary": "administrative",
      "type": "boundary"
    },
    "admin7": {

Parameters

ParameterTypeRequiredDescription
(coordinates)pathRequired`/{lat},{lon}.json` reverse-geocodes the point. Append `.json` or you get XML. 48.8584,2.2945
(randomland)pathOptional`/randomland.json` returns a random populated land coordinate, useful for testing. randomland.json
(radius)queryOptional`radius=` in kilometres widens the search when a point has nothing named nearby. 50

Response fields

threegeonamesstring
The three-word code for the location, hyphen separated.
geonumberstring
A compact all-numeric identifier for the same point.
nearestobject
The closest named feature: `name`, `city`, `region`, `prov`, `state`, `latt`, `longt`, `distance` in km, `timezone` and `elevation`.
majorobject
The nearest substantial city, with the same shape. Its `distance` tells you how remote the point is.
osmtagsobject
OpenStreetMap tags for the enclosing feature, often including `wikipedia`, `wikidata`, `addr_postcode` and `admin_level`.
adminareasobject
The administrative hierarchy above the point, keyed by OSM admin level.
(types)note
Latitude, longitude, distance and elevation all arrive as strings, not numbers. Cast before doing arithmetic.

What you can build with the 3geonames API

  • Enrich a coordinate with timezone, elevation and place context in one call
  • Give a location a short shareable word code without a licence
  • Find the nearest significant city to a remote point
  • Attach Wikipedia and Wikidata identifiers to a mapped location
  • Generate random land coordinates for seeding test data

Common errors and how to fix them

CORS error in the browser

The service does not send Access-Control-Allow-Origin.

Fix: Call it from your server and pass the result to the client. There is no key to protect, so a thin proxy is enough.

XML instead of JSON

The `.json` suffix was omitted from the path.

Fix: The format is chosen by the file extension, not by an Accept header. `/48.8584,2.2945.json` returns JSON; the bare path returns XML.

Arithmetic on distance or elevation gives nonsense

Every numeric field is serialised as a string.

Fix: Cast explicitly. `"63" + 10` is a string concatenation in JavaScript, and this is exactly where that bites.

nearest is far away or empty

The point is in open country, desert or ocean with no named feature close by.

Fix: Widen the search with `radius`, or fall back to the `major` object, which reports the nearest sizeable city and the distance to it.

3geonames API — frequently asked questions

Is 3geonames free?

Yes, free with no key or registration. The operator asks for a link back when you publish results, which is a light obligation for an unmetered service.

How does the three-word code compare with what3words?

It is free and requires no licence, where what3words is proprietary and key-gated. The trade-off is quality: 3geonames draws its words from place and personal names, so the triples are less memorable and harder to dictate aloud.

Can I call it directly from browser JavaScript?

No. It sends no CORS headers, so a fetch from a page is blocked. Proxy it through your own backend — there is no API key involved, so the proxy is trivial.

What does the major object add over nearest?

`nearest` is whatever named feature is closest, which in remote areas might be an unpopulated landmark. `major` is the nearest substantial city with the distance attached, which is usually the more meaningful way to describe where a point actually is.

Tools that pair with this API

3geonames is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 2026-08-21; always check the official documentation before relying on this API in production, as terms and limits can change.