what4words.joseluissaorin.com api documentation
plain json · no key · cors open

THE API

Three GET endpoints, JSON in and out, open CORS, cached at the edge. There is no API key because there is nothing to gate. Machine-readable spec: /openapi.json. Notes for LLM agents: /llms.txt.

GET /api/encode

coordinates → four words.

paramtypedescription
latnumberlatitude, −90…90 (required)
lonnumberlongitude, −180…180 (required; lng also accepted)
curl "https://what4words.joseluissaorin.com/api/encode?lat=40.7128&lon=-74.0060"

{
  "phrase": "corner gulp security valley",
  "words": ["corner","gulp","security","valley"],
  "latitude": 40.7128, "longitude": -74.006,
  "accuracyDegrees": 0.0001, "accuracyMeters": 11,
  "url": "https://what4words.joseluissaorin.com/corner.gulp.security.valley",
  "maps": { "google_maps": { "...": "..." }, "...": "..." }
}

GET /api/decode

words → coordinates. 4 words = ±11 m · 3 words = neighbourhood · 2 words = city. word order does not matter. separators: spaces, dots, dashes, commas, plus signs.

paramtypedescription
phrasestring2–4 words (required; words also accepted)
curl "https://what4words.joseluissaorin.com/api/decode?phrase=valley.corner.security.gulp"

{
  "phrase": "corner gulp security valley",
  "latitude": 40.7128, "longitude": -74.006,
  "accuracyDegrees": 0.0001, "accuracyMeters": 11,
  "url": "https://what4words.joseluissaorin.com/corner.gulp.security.valley",
  "maps": { "...": "..." }
}

GET /api/links

just the map links, from either a phrase or coordinates. 19 services: Google Maps, Street View, Apple Maps, OpenStreetMap, Waze, Bing, HERE WeGo, Yandex, OsmAnd, Organic Maps, Magic Earth, MapQuest, Citymapper, Moovit, 2GIS, Kakao, Naver, geo: URI, GPX download.

curl "https://what4words.joseluissaorin.com/api/links?phrase=corner.gulp.security.valley"
curl "https://what4words.joseluissaorin.com/api/links?lat=40.7128&lon=-74.0060"

MORE TRICKS

GET /{word}.{word}.{word}.{word}human page for a phrase. send Accept: application/json and you get the decode JSON instead — same URL for people and robots.
GET /{lat},{lon}redirects to the phrase page for those coordinates.
GET /api/gpx?lat=&lon=GPX waypoint file, for GPS devices and outdoor apps.
GET /openapi.jsonOpenAPI 3.1 spec.
GET /llms.txtplain-text orientation for AI agents.

ERRORS & LIMITS

errors come as {"error": "…"} with status 400 (bad input) or 404 (unknown words). there is no rate limit beyond Cloudflare's own good sense; be reasonable. responses are cached — identical requests cost nobody anything.

CREDIT WHERE DUE

the encoding is the FixPhrase algorithm by Netsyms Technologies (© 2021, BSD-3-Clause) — a 7,610-word list where each word of a phrase comes from its own alphabetical band, which is why order never matters. this site is an independent implementation and is not affiliated with Netsyms. full license text at /license. phrases produced here are compatible with fixphrase.com and vice versa.