The what3words API provides a simple and powerful interface to interact with the what3words addressing system. It allows you to convert between what3words addresses and geographic coordinates, validate and autocorrect user input, and retrieve information about supported languages and the what3words grid.

Key features include:

  • Convert to what3words address: Convert latitude and longitude coordinates into a what3words address.
  • Convert to coordinates: Convert a what3words address into latitude and longitude coordinates.
  • AutoSuggest: Suggest valid what3words addresses based on partial or incorrect input, with options to prioritize results by location or restrict results to specific areas.
  • AutoSuggest with Coordinates: Similar to AutoSuggest, but returns coordinates in the response. This endpoint requires special permissions, please contact support@what3words.com for more information.
  • Grid Section: Retrieve a section of the what3words grid for a specified bounding box, useful for map visualizations.
  • Available Languages: Get a list of all supported languages, including language codes (including script-specific variants) and native names.

For more details, visit the what3words Public API Documentation.

Additional resources:

Endpoints#

Authentication#

Every request needs an API key, sent as the key query parameter or the X-Api-Key header. Get your free API key.

SchemeWhereNameDescription
ApiKeyAuthquerykeyAPI key for authentication. Provide it as query parameter key; X-Api-Key header is also supported.
ApiKeyHeaderheaderX-Api-KeyAPI key for authentication. Provide it as query parameter key; X-Api-Key header is also supported.

Errors#

Errors return an HTTP status and a JSON body with a stable code and a readable message. Use the code to decide how to handle the error. See the error handling guide for an example.

Error codes

CodeStatusReturned by
MissingWords400 /convert-to-coordinates
BadWords400 /convert-to-coordinates
BadFormat400 /convert-to-3wa, /convert-to-coordinates, /grid-section
BadCoordinates400 /convert-to-3wa
BadBoundingBox400 /grid-section
BadBoundingBoxTooBig400 /grid-section
BadFocus400 /autosuggest, /autosuggest-with-coordinates
BadClipToCountry400 /autosuggest, /autosuggest-with-coordinates
BadClipToBoundingBox400 /autosuggest, /autosuggest-with-coordinates
BadClipToCircle400 /autosuggest, /autosuggest-with-coordinates
BadClipToPolygon400 /autosuggest, /autosuggest-with-coordinates
MissingLanguage400 /autosuggest, /autosuggest-with-coordinates
BadLanguage400 /convert-to-3wa, /autosuggest, /autosuggest-with-coordinates
InvalidKey401 /convert-to-3wa, /convert-to-coordinates, /autosuggest, /autosuggest-with-coordinates, /grid-section, /available-languages
InvalidKeyNoPermissions401 /autosuggest-with-coordinates
BadInputType400 /autosuggest, /autosuggest-with-coordinates
MissingInput400 /autosuggest, /autosuggest-with-coordinates
MissingKey401 /convert-to-3wa, /convert-to-coordinates, /autosuggest, /autosuggest-with-coordinates, /grid-section, /available-languages
DuplicateParameter400 /convert-to-3wa, /convert-to-coordinates, /autosuggest, /autosuggest-with-coordinates, /grid-section
BadNResults400 /autosuggest, /autosuggest-with-coordinates
BadNFocusResults400 /autosuggest, /autosuggest-with-coordinates
BadInput400 /autosuggest, /autosuggest-with-coordinates

Convert to what3words address#

GEThttps://api.what3words.com/v3/convert-to-3wa

This function will convert a latitude and longitude to a what3words address, in the language of your choice. It also returns country, the bounds of the grid square, a nearby place (such as a local town) and a link to our map site.

Parameters

ParameterDescription
keystring · queryoptional

A valid API key. Provide it as query parameter key; X-Api-Key header is also supported.

coordinatesstring · queryrequired

Coordinates as a comma separated string of latitude and longitude

Example coordinates=51.521251,-0.203586.

languagestring · queryoptional

A supported what3words language code from /available-languages. You can pass base language codes (for example fr) or script-specific codes where available (for example mn_la, zh_tr, oo_la). Defaults to en (English) if not specified.

Default en. Example language=fr.

formatstring · queryoptional

Return data format type; can be either json (the default) or geojson

One of json, geojson. Default json.

localestring · queryoptional

Optional locale/script-specific code. Can be passed on its own. If provided with language, both values must be identical strings (for example language=mn_la&locale=mn_la).

Example locale=mn_la.

Example request

cURL, JavaScript, Python
cURL
curl --request GET \
  --url 'https://api.what3words.com/v3/convert-to-3wa?coordinates=51.520847,-0.195521&key=YOUR_API_KEY'
JavaScript
const params = new URLSearchParams({
  coordinates: '51.520847,-0.195521',
  key: 'YOUR_API_KEY',
});
const response = await fetch(`https://api.what3words.com/v3/convert-to-3wa?${params}`);
const data = await response.json();
console.log(data);
Python
import requests

response = requests.get(
    "https://api.what3words.com/v3/convert-to-3wa",
    params={"coordinates": "51.520847,-0.195521", "key": "YOUR_API_KEY"},
)
print(response.json())

Example result

Status 200 OK

JSON, GeoJSON
JSON
{
  "country": "GB",
  "square": {
    "southwest": {
      "lng": -0.195543,
      "lat": 51.520833
    },
    "northeast": {
      "lng": -0.195499,
      "lat": 51.52086
    }
  },
  "nearestPlace": "Bayswater, London",
  "coordinates": {
    "lng": -0.195521,
    "lat": 51.520847
  },
  "words": "filled.count.soap",
  "language": "en",
  "map": "https://w3w.co/filled.count.soap"
}
GeoJSON
{
  "features": [
    {
      "bbox": [
        -0.195543,
        51.520833,
        -0.195499,
        51.52086
      ],
      "geometry": {
        "coordinates": [
          -0.195521,
          51.520847
        ],
        "type": "Point"
      },
      "type": "Feature",
      "properties": {
        "country": "GB",
        "nearestPlace": "Bayswater, London",
        "words": "filled.count.soap",
        "language": "en",
        "map": "https://w3w.co/filled.count.soap"
      }
    }
  ],
  "type": "FeatureCollection"
}

Response fields

FieldDescription
countrystringThe country in which the what3words address is located, as an ISO 3166-1 alpha-2 country code
squareobject (Square)
square.southwestobject (Coordinates)
square.southwest.latnumberLatitude
square.southwest.lngnumberLongitude
square.northeastobject (Coordinates)
square.northeast.latnumberLatitude
square.northeast.lngnumberLongitude
nearestPlacestringThe nearest place to the what3words address
coordinatesobject (Coordinates)
coordinates.latnumberLatitude
coordinates.lngnumberLongitude
wordsstringThe what3words address
languagestringThe language of the what3words address
localestringThe locale of the what3words address, if returned
mapstringURL to view the what3words address on the what3words map

Responses

200 Successful conversion to what3words address

application/json Schema ConvertTo3waResponse

400 Bad request

application/json Schema ErrorResponse

5 examples
BadLanguage
{
  "error": {
    "code": "BadLanguage",
    "message": "language must be a supported what3words language code, such as 'en', 'fr' or 'mn_la'"
  }
}
BadCoordinates
{
  "error": {
    "code": "BadCoordinates",
    "message": "failed to parse one of the coordinates as a valid decimal number"
  }
}
BadFormat
{
  "error": {
    "code": "BadFormat",
    "message": "Format must be one of json,geojson"
  }
}
BadLanguageLocaleMismatch
{
  "error": {
    "code": "BadLanguage",
    "message": "language and locale must not be different"
  }
}
DuplicateParameter
{
  "error": {
    "code": "DuplicateParameter",
    "message": "Duplicate parameter 'coordinates'. Please only pass in one of each parameter."
  }
}

401 Unauthorized - Invalid API key

application/json Schema ErrorResponse

2 examples
InvalidKey
{
  "error": {
    "code": "InvalidKey",
    "message": "Authentication failed; invalid API key"
  }
}
MissingKey
{
  "error": {
    "code": "MissingKey",
    "message": "Authentication failed; missing required API key parameter or header"
  }
}

Convert to coordinates#

GEThttps://api.what3words.com/v3/convert-to-coordinates

This function converts a what3words address to a latitude and longitude. It also returns country, the bounds of the grid square, a nearest place (such as a local town) and a link to our map site.

Parameters

ParameterDescription
keystring · queryoptional

A valid API key. Provide it as query parameter key; X-Api-Key header is also supported.

wordsstring · queryrequired

A what3words address. Input parsing is case-insensitive, accepts an optional leading ///, and accepts supported dot-like delimiters (. 。 。 ・ ・ ︒ ។ ։ ။ ۔ ። ।).

Example words=filled.count.soap.

formatstring · queryoptional

Return data format type; can be either json (the default) or geojson

One of json, geojson. Default json.

Example request

cURL, JavaScript, Python
cURL
curl --request GET \
  --url 'https://api.what3words.com/v3/convert-to-coordinates?words=filled.count.soap&key=YOUR_API_KEY'
JavaScript
const params = new URLSearchParams({
  words: 'filled.count.soap',
  key: 'YOUR_API_KEY',
});
const response = await fetch(`https://api.what3words.com/v3/convert-to-coordinates?${params}`);
const data = await response.json();
console.log(data);
Python
import requests

response = requests.get(
    "https://api.what3words.com/v3/convert-to-coordinates",
    params={"words": "filled.count.soap", "key": "YOUR_API_KEY"},
)
print(response.json())

Example result

Status 200 OK

JSON, GeoJSON
JSON
{
  "country": "GB",
  "square": {
    "southwest": {
      "lng": -0.195543,
      "lat": 51.520833
    },
    "northeast": {
      "lng": -0.195499,
      "lat": 51.52086
    }
  },
  "nearestPlace": "Bayswater, London",
  "coordinates": {
    "lng": -0.195521,
    "lat": 51.520847
  },
  "words": "filled.count.soap",
  "language": "en",
  "map": "https://w3w.co/filled.count.soap"
}
GeoJSON
{
  "features": [
    {
      "bbox": [
        -0.195543,
        51.520833,
        -0.195499,
        51.52086
      ],
      "geometry": {
        "coordinates": [
          -0.195521,
          51.520847
        ],
        "type": "Point"
      },
      "type": "Feature",
      "properties": {
        "country": "GB",
        "nearestPlace": "Bayswater, London",
        "words": "filled.count.soap",
        "language": "en",
        "map": "https://w3w.co/filled.count.soap"
      }
    }
  ],
  "type": "FeatureCollection"
}

Response fields

FieldDescription
countrystringThe country in which the what3words address is located, as an ISO 3166-1 alpha-2 country code
squareobject (Square)
square.southwestobject (Coordinates)
square.southwest.latnumberLatitude
square.southwest.lngnumberLongitude
square.northeastobject (Coordinates)
square.northeast.latnumberLatitude
square.northeast.lngnumberLongitude
nearestPlacestringThe nearest place to the what3words address
coordinatesobject (Coordinates)
coordinates.latnumberLatitude
coordinates.lngnumberLongitude
wordsstringThe what3words address
languagestringThe language of the what3words address
localestringThe locale of the what3words address, if returned
mapstringURL to view the what3words address on the what3words map

Responses

200 Successful conversion to coordinates

application/json Schema ConvertToCoordinatesResponse

400 Bad request

application/json Schema ErrorResponse

4 examples
MissingWords
{
  "error": {
    "code": "MissingWords",
    "message": "words must be specified"
  }
}
BadWords
{
  "error": {
    "code": "BadWords",
    "message": "words must be a valid 3 word address, such as filled.count.soap or ///filled.count.soap"
  }
}
BadFormat
{
  "error": {
    "code": "BadFormat",
    "message": "Format must be one of json,geojson"
  }
}
DuplicateParameter
{
  "error": {
    "code": "DuplicateParameter",
    "message": "Duplicate parameter 'words'. Please only pass in one of each parameter."
  }
}

401 Unauthorized - Invalid API key

application/json Schema ErrorResponse

2 examples
InvalidKey
{
  "error": {
    "code": "InvalidKey",
    "message": "Authentication failed; invalid API key"
  }
}
MissingKey
{
  "error": {
    "code": "MissingKey",
    "message": "Authentication failed; missing required API key parameter or header"
  }
}

AutoSuggest#

GEThttps://api.what3words.com/v3/autosuggest

AutoSuggest can take a slightly incorrect what3words address and suggest a list of valid what3words addresses. It has powerful features that can, for example, optionally limit results to a country or area, and prioritize results that are near the user.

Parameters

ParameterDescription
keystring · queryoptional

A valid API key. Provide it as query parameter key; X-Api-Key header is also supported.

inputstring · queryrequired

The full or partial what3words address to obtain suggestions for. At minimum this must be the first two complete words plus at least one character from the third word. Input parsing is case-insensitive, accepts an optional leading ///, and accepts supported dot-like delimiters (. 。 。 ・ ・ ︒ ។ ։ ။ ۔ ። ।).

Example input=filled.count.s.

focusstring · queryoptional

This is a location, specified as latitude,longitude (often where the user making the query is). If specified, the results will be weighted to give preference to those near the focus. For convenience, longitude is allowed to wrap around the 180 line, so 361 is equivalent to 1.

Example focus=51.521251,-0.203586.

n-focus-resultsinteger · queryoptional

Controls how many top suggestions are strongly biased towards the focus coordinate. Defaults to n-results when omitted. Non-numeric values return BadNFocusResults.

Default 3. Maximum 100. Example n-focus-results=5.

clip-to-countrystring · queryoptional

Restricts results to the specified country or countries, specified as comma-separated ISO 3166-1 alpha-2 country codes (for example GB,US). Parsing is case-insensitive, though uppercase is recommended.

Example clip-to-country=GB,US.

clip-to-circlestring · queryoptional

Restricts results to a circle, specified by latitude,longitude,kilometres. For example, 51.4243877,-0.3474524,10 constrains results to those within 10 km of the point 51.4243877,-0.3474524.

Example clip-to-circle=51.4243877,-0.3474524,10.

clip-to-bounding-boxstring · queryoptional

Restricts results to a bounding box, specified by southwest latitude,southwest longitude,northeast latitude,northeast longitude. Latitudes and longitudes should be specified in order of increasing size. Longitude is allowed to wrap, so that you can specify bounding boxes which cross the ante-meridian, e.g., -4,178.2,22,195.4

Example clip-to-bounding-box=51.515900,-0.212517,51.527649,-0.191746.

clip-to-polygonstring · queryoptional

Restricts results to a polygon, specified by a comma-separated list of lat,lng pairs. The polygon should be closed, i.e. the first element should be repeated as the last element; also the list should contain at least 4 entries. The API is currently limited to accepting up to 25 pairs.

Example clip-to-polygon=51.521,-0.343,52.6,2.3324,54.234,8.343,51.521,-0.343.

languagestring · queryoptional

For text input, adds a preferred language or locale to the set Autosuggest considers. Exact whole-word matches in the input can also add languages or locales. If omitted for text input, English is added as the default backstop. For voice input (input-type != text), this must be provided. Use a supported what3words code from /available-languages, including locale/script-specific codes where available (for example mn_la, zh_tr, oo_la).

Default en.

localestring · queryoptional

Optional locale/script-specific code. Can be passed on its own. If provided with language, both values must be identical strings (for example language=mn_la&locale=mn_la).

Example locale=mn_la.

input-typestring · queryoptional

For power users, used to specify voice input mode. Can be text (default), vocon-hybrid, nmdp-asr, generic-voice, speechmatics, or vin-big-data. Voice modes require language. If input is not in the expected format for a selected voice mode, the API may return BadInput.

One of text, vocon-hybrid, nmdp-asr, generic-voice, speechmatics, vin-big-data. Default text.

n-resultsinteger · queryoptional

The number of AutoSuggest results to return. Non-numeric values return BadNResults. Values greater than 100 are truncated to 100. Values less than or equal to 0 return an empty suggestions list. The default is 3.

Default 3. Maximum 100.

prefer-landboolean · queryoptional

Makes AutoSuggest prefer results on land to those in the sea. This setting is on by default. Use false to disable this setting and receive more suggestions in the sea.

Default true.

formatstring · queryoptional

Return data format type; can be either json (the default) or geojson

One of json, geojson. Default json.

Example request

cURL, JavaScript, Python
cURL
curl --request GET \
  --url 'https://api.what3words.com/v3/autosuggest?input=film.crunchy.spiri&focus=50.842404,4.361177&key=YOUR_API_KEY'
JavaScript
const params = new URLSearchParams({
  input: 'film.crunchy.spiri',
  focus: '50.842404,4.361177',
  key: 'YOUR_API_KEY',
});
const response = await fetch(`https://api.what3words.com/v3/autosuggest?${params}`);
const data = await response.json();
console.log(data);
Python
import requests

response = requests.get(
    "https://api.what3words.com/v3/autosuggest",
    params={"input": "film.crunchy.spiri", "focus": "50.842404,4.361177", "key": "YOUR_API_KEY"},
)
print(response.json())

Example result

Status 200 OK

JSON
{
  "suggestions": [
    {
      "country": "BE",
      "nearestPlace": "Brussels, Brussels Capital",
      "words": "film.crunchy.spirits",
      "rank": 1,
      "distanceToFocusKm": 1,
      "language": "en"
    },
    {
      "country": "ES",
      "nearestPlace": "Caldes de Montbui, Catalonia",
      "words": "film.crunchy.spirit",
      "rank": 2,
      "distanceToFocusKm": 1039,
      "language": "en"
    },
    {
      "country": "NL",
      "nearestPlace": "Weert, Limburg",
      "words": "firm.crunchy.spires",
      "rank": 3,
      "distanceToFocusKm": 105,
      "language": "en"
    }
  ]
}

Response fields

FieldDescription
suggestions[]array of AutosuggestSuggestionList of suggested what3words addresses
suggestions[].wordsstringThe suggested what3words address
suggestions[].countrystringThe country in which the what3words address is located, as an ISO 3166-1 alpha-2 country code
suggestions[].nearestPlacestringThe nearest place to the what3words address
suggestions[].languagestringThe language of the what3words address
suggestions[].localestringThe locale of the what3words address, if applicable
suggestions[].rankintegerThe relative ranking of this suggestion
suggestions[].distanceToFocusKmnumberThe distance in kilometers from the focus point to this suggestion's coordinates

Responses

200 Successful autosuggest results

application/json Schema AutosuggestResponse

400 Bad request

application/json Schema ErrorResponse

14 examples
MissingInput
{
  "error": {
    "code": "MissingInput",
    "message": "input must be specified"
  }
}
BadFocus
{
  "error": {
    "code": "BadFocus",
    "message": "focus must be a lat,lng"
  }
}
BadClipToCountry
{
  "error": {
    "code": "BadClipToCountry",
    "message": "Countries are specified as a comma separated list of uppercase ISO 3166-1 alpha-2 country codes, such as US,CA"
  }
}
BadClipToBoundingBox
{
  "error": {
    "code": "BadClipToBoundingBox",
    "message": "Must be four lat,lng,lat,lng coordinates such as 50,-2,53.12,2.34"
  }
}
BadClipToCircle
{
  "error": {
    "code": "BadClipToCircle",
    "message": "clip-to-circle needs to be lat,lng,km. Example: 51.453,0.344,112"
  }
}
BadClipToPolygon
{
  "error": {
    "code": "BadClipToPolygon",
    "message": "Failed to parse one of the coordinates as a valid decimal number"
  }
}
MissingLanguage
{
  "error": {
    "code": "MissingLanguage",
    "message": "for voice input. language must be specified"
  }
}
BadLanguage
{
  "error": {
    "code": "BadLanguage",
    "message": "language must be a supported what3words language code, such as 'en', 'fr' or 'mn_la'"
  }
}
BadInputType
{
  "error": {
    "code": "BadInputType",
    "message": "prefer-land must be one of true or false"
  }
}
BadLanguageLocaleMismatch
{
  "error": {
    "code": "BadLanguage",
    "message": "language and locale must not be different"
  }
}
BadNResults
{
  "error": {
    "code": "BadNResults",
    "message": "n-results must be a valid integer"
  }
}
BadNFocusResults
{
  "error": {
    "code": "BadNFocusResults",
    "message": "n-focus-results must be a valid integer"
  }
}
BadInput
{
  "error": {
    "code": "BadInput",
    "message": "Invalid autosuggest input"
  }
}
DuplicateParameter
{
  "error": {
    "code": "DuplicateParameter",
    "message": "Duplicate parameter 'input'. Please only pass in one of each parameter."
  }
}

401 Unauthorized - Invalid API key

application/json Schema ErrorResponse

2 examples
InvalidKey
{
  "error": {
    "code": "InvalidKey",
    "message": "Authentication failed; invalid API key"
  }
}
MissingKey
{
  "error": {
    "code": "MissingKey",
    "message": "Authentication failed; missing required API key parameter or header"
  }
}

AutoSuggest with Coordinates#

GEThttps://api.what3words.com/v3/autosuggest-with-coordinates

Similar to the AutoSuggest endpoint, but returns coordinates in the response. This endpoint requires special permissions.

Parameters

ParameterDescription
keystring · queryoptional

A valid API key. Provide it as query parameter key; X-Api-Key header is also supported.

inputstring · queryrequired

The full or partial what3words address to obtain suggestions for. At minimum this must be the first two complete words plus at least one character from the third word. Input parsing is case-insensitive, accepts an optional leading ///, and accepts supported dot-like delimiters (. 。 。 ・ ・ ︒ ។ ։ ။ ۔ ። ।).

Example input=filled.count.s.

focusstring · queryoptional

This is a location, specified as latitude,longitude (often where the user making the query is). If specified, the results will be weighted to give preference to those near the focus. For convenience, longitude is allowed to wrap around the 180 line, so 361 is equivalent to 1.

Example focus=51.521251,-0.203586.

n-focus-resultsinteger · queryoptional

Controls how many top suggestions are strongly biased towards the focus coordinate. Defaults to n-results when omitted. Non-numeric values return BadNFocusResults.

Default 3. Maximum 100. Example n-focus-results=5.

clip-to-countrystring · queryoptional

Restricts results to the specified country or countries, specified as comma-separated ISO 3166-1 alpha-2 country codes (for example GB,US). Parsing is case-insensitive, though uppercase is recommended.

Example clip-to-country=GB,US.

clip-to-circlestring · queryoptional

Restricts results to a circle, specified by latitude,longitude,kilometres. For example, 51.4243877,-0.3474524,10 constrains results to those within 10 km of the point 51.4243877,-0.3474524.

Example clip-to-circle=51.4243877,-0.3474524,10.

clip-to-bounding-boxstring · queryoptional

Restricts results to a bounding box, specified by southwest latitude,southwest longitude,northeast latitude,northeast longitude. Latitudes and longitudes should be specified in order of increasing size. Longitude is allowed to wrap, so that you can specify bounding boxes which cross the ante-meridian, e.g., -4,178.2,22,195.4

Example clip-to-bounding-box=51.515900,-0.212517,51.527649,-0.191746.

clip-to-polygonstring · queryoptional

Restricts results to a polygon, specified by a comma-separated list of lat,lng pairs. The polygon should be closed, i.e. the first element should be repeated as the last element; also the list should contain at least 4 entries. The API is currently limited to accepting up to 25 pairs.

Example clip-to-polygon=51.521,-0.343,52.6,2.3324,54.234,8.343,51.521,-0.343.

languagestring · queryoptional

For text input, adds a preferred language or locale to the set Autosuggest considers. Exact whole-word matches in the input can also add languages or locales. If omitted for text input, English is added as the default backstop. For voice input (input-type != text), this must be provided. Use a supported what3words code from /available-languages, including locale/script-specific codes where available (for example mn_la, zh_tr, oo_la).

Default en.

localestring · queryoptional

Optional locale/script-specific code. Can be passed on its own. If provided with language, both values must be identical strings (for example language=mn_la&locale=mn_la).

Example locale=mn_la.

input-typestring · queryoptional

For power users, used to specify voice input mode. Can be text (default), vocon-hybrid, nmdp-asr, generic-voice, speechmatics, or vin-big-data. Voice modes require language. If input is not in the expected format for a selected voice mode, the API may return BadInput.

One of text, vocon-hybrid, nmdp-asr, generic-voice, speechmatics, vin-big-data. Default text.

n-resultsinteger · queryoptional

The number of AutoSuggest results to return. Non-numeric values return BadNResults. Values greater than 100 are truncated to 100. Values less than or equal to 0 return an empty suggestions list. The default is 3.

Default 3. Maximum 100.

prefer-landboolean · queryoptional

Makes AutoSuggest prefer results on land to those in the sea. This setting is on by default. Use false to disable this setting and receive more suggestions in the sea.

Default true.

formatstring · queryoptional

Return data format type; can be either json (the default) or geojson

One of json, geojson. Default json.

Example request

cURL, JavaScript, Python
cURL
curl --request GET \
  --url 'https://api.what3words.com/v3/autosuggest-with-coordinates?input=film.crunchy.spiri&focus=50.842404,4.361177&key=YOUR_API_KEY'
JavaScript
const params = new URLSearchParams({
  input: 'film.crunchy.spiri',
  focus: '50.842404,4.361177',
  key: 'YOUR_API_KEY',
});
const response = await fetch(`https://api.what3words.com/v3/autosuggest-with-coordinates?${params}`);
const data = await response.json();
console.log(data);
Python
import requests

response = requests.get(
    "https://api.what3words.com/v3/autosuggest-with-coordinates",
    params={"input": "film.crunchy.spiri", "focus": "50.842404,4.361177", "key": "YOUR_API_KEY"},
)
print(response.json())

Example result

Status 200 OK

JSON
{
  "suggestions": [
    {
      "country": "BE",
      "square": {
        "southwest": {
          "lng": 4.347436,
          "lat": 50.848237
        },
        "northeast": {
          "lng": 4.347479,
          "lat": 50.848264
        }
      },
      "nearestPlace": "Brussels, Brussels Capital",
      "words": "film.crunchy.spirits",
      "coordinates": {
        "lng": 4.347457,
        "lat": 50.848251
      },
      "rank": 1,
      "distanceToFocusKm": 1,
      "language": "en",
      "map": "https://w3w.co/film.crunchy.spirits"
    },
    {
      "country": "ES",
      "square": {
        "southwest": {
          "lng": 2.164394,
          "lat": 41.625835
        },
        "northeast": {
          "lng": 2.16443,
          "lat": 41.625862
        }
      },
      "nearestPlace": "Caldes de Montbui, Catalonia",
      "words": "film.crunchy.spirit",
      "coordinates": {
        "lng": 2.164412,
        "lat": 41.625849
      },
      "rank": 2,
      "distanceToFocusKm": 1039,
      "language": "en",
      "map": "https://w3w.co/film.crunchy.spirit"
    },
    {
      "country": "NL",
      "square": {
        "southwest": {
          "lng": 5.681058,
          "lat": 51.289807
        },
        "northeast": {
          "lng": 5.681101,
          "lat": 51.289834
        }
      },
      "nearestPlace": "Weert, Limburg",
      "words": "firm.crunchy.spires",
      "coordinates": {
        "lng": 5.68108,
        "lat": 51.289821
      },
      "rank": 3,
      "distanceToFocusKm": 105,
      "language": "en",
      "map": "https://w3w.co/firm.crunchy.spires"
    }
  ]
}

Response fields

FieldDescription
suggestions[]array of AutosuggestWithCoordinatesSuggestionList of suggested what3words addresses including coordinates
suggestions[].wordsstringThe suggested what3words address
suggestions[].countrystringThe country in which the what3words address is located, as an ISO 3166-1 alpha-2 country code
suggestions[].squareobject (Square)
suggestions[].square.southwestobject (Coordinates)
suggestions[].square.southwest.latnumberLatitude
suggestions[].square.southwest.lngnumberLongitude
suggestions[].square.northeastobject (Coordinates)
suggestions[].square.northeast.latnumberLatitude
suggestions[].square.northeast.lngnumberLongitude
suggestions[].nearestPlacestringThe nearest place to the what3words address
suggestions[].coordinatesobject (Coordinates)
suggestions[].coordinates.latnumberLatitude
suggestions[].coordinates.lngnumberLongitude
suggestions[].languagestringThe language of the what3words address
suggestions[].localestringThe locale of the what3words address, if returned
suggestions[].rankintegerThe relative ranking of this suggestion
suggestions[].distanceToFocusKmnumberThe distance in kilometers from the focus point to this suggestion's coordinates
suggestions[].mapstringURL to view the what3words address on the what3words map

Responses

200 Successful autosuggest results

application/json Schema AutosuggestWithCoordinatesResponse

400 Bad request

application/json Schema ErrorResponse

14 examples
MissingInput
{
  "error": {
    "code": "MissingInput",
    "message": "input must be specified"
  }
}
BadFocus
{
  "error": {
    "code": "BadFocus",
    "message": "focus must be a lat,lng"
  }
}
BadClipToCountry
{
  "error": {
    "code": "BadClipToCountry",
    "message": "Countries are specified as a comma separated list of uppercase ISO 3166-1 alpha-2 country codes, such as US,CA"
  }
}
BadClipToBoundingBox
{
  "error": {
    "code": "BadClipToBoundingBox",
    "message": "Must be four lat,lng,lat,lng coordinates such as 50,-2,53.12,2.34"
  }
}
BadClipToCircle
{
  "error": {
    "code": "BadClipToCircle",
    "message": "clip-to-circle needs to be lat,lng,km. Example: 51.453,0.344,112"
  }
}
BadClipToPolygon
{
  "error": {
    "code": "BadClipToPolygon",
    "message": "Failed to parse one of the coordinates as a valid decimal number"
  }
}
MissingLanguage
{
  "error": {
    "code": "MissingLanguage",
    "message": "for voice input. language must be specified"
  }
}
BadLanguage
{
  "error": {
    "code": "BadLanguage",
    "message": "language must be a supported what3words language code, such as 'en', 'fr' or 'mn_la'"
  }
}
BadInputType
{
  "error": {
    "code": "BadInputType",
    "message": "prefer-land must be one of true or false"
  }
}
BadLanguageLocaleMismatch
{
  "error": {
    "code": "BadLanguage",
    "message": "language and locale must not be different"
  }
}
BadNResults
{
  "error": {
    "code": "BadNResults",
    "message": "n-results must be a valid integer"
  }
}
BadNFocusResults
{
  "error": {
    "code": "BadNFocusResults",
    "message": "n-focus-results must be a valid integer"
  }
}
BadInput
{
  "error": {
    "code": "BadInput",
    "message": "Invalid autosuggest input"
  }
}
DuplicateParameter
{
  "error": {
    "code": "DuplicateParameter",
    "message": "Duplicate parameter 'input'. Please only pass in one of each parameter."
  }
}

401 Unauthorized - Invalid API key

application/json Schema ErrorResponse

3 examples
InvalidKey
{
  "error": {
    "code": "InvalidKey",
    "message": "Authentication failed; invalid API key"
  }
}
InvalidKeyNoPermissions
{
  "error": {
    "code": "InvalidKey",
    "message": "Auth failed; /v3/autosuggest-with-coordinates. Contact support@what3words.com or your account manager to enable your account"
  }
}
MissingKey
{
  "error": {
    "code": "MissingKey",
    "message": "Authentication failed; missing required API key parameter or header"
  }
}

Grid section#

GEThttps://api.what3words.com/v3/grid-section

Returns a section of the 3m x 3m what3words grid for a bounding box. The bounding box is specified by lat,lng,lat,lng as south,west,north,east. You can request the grid in GeoJSON format, making it very simple to display on a map.

Parameters

ParameterDescription
keystring · queryoptional

A valid API key. Provide it as query parameter key; X-Api-Key header is also supported.

bounding-boxstring · queryrequired

Bounding box, as a lat,lng,lat,lng, for which the grid should be returned. The requested box must not exceed 4km from corner to corner, or a BadBoundingBoxTooBig error will be returned. Latitudes must be >= -90 and <= 90, but longitudes are allowed to wrap around 180. To specify a bounding-box that crosses the anti-meridian, use longitude greater than 180. e.g.: bounding-box=50.0,179.995,50.01,180.0005

Example bounding-box=52.207988,0.116126,52.208867,0.117540.

formatstring · queryoptional

Return data format type; can be either json (the default) or geojson

One of json, geojson. Default json.

Example request

cURL, JavaScript, Python
cURL
curl --request GET \
  --url 'https://api.what3words.com/v3/grid-section?bounding-box=52.207988,0.116126,52.208867,0.117540&key=YOUR_API_KEY'
JavaScript
const params = new URLSearchParams({
  'bounding-box': '52.207988,0.116126,52.208867,0.117540',
  key: 'YOUR_API_KEY',
});
const response = await fetch(`https://api.what3words.com/v3/grid-section?${params}`);
const data = await response.json();
console.log(data);
Python
import requests

response = requests.get(
    "https://api.what3words.com/v3/grid-section",
    params={"bounding-box": "52.207988,0.116126,52.208867,0.117540", "key": "YOUR_API_KEY"},
)
print(response.json())

Example result

Status 200 OK

JSON, GeoJSON
JSON
{
  "lines": [
    {
      "start": {
        "lng": 0.116126,
        "lat": 52.20801
      },
      "end": {
        "lng": 0.11754,
        "lat": 52.20801
      }
    },
    {
      "start": {
        "lng": 0.116126,
        "lat": 52.208037
      },
      "end": {
        "lng": 0.11754,
        "lat": 52.208037
      }
    }
  ]
}
GeoJSON
{
  "features": [
    {
      "geometry": {
        "coordinates": [
          [
            [
              0.116126,
              52.20801
            ],
            [
              0.11754,
              52.20801
            ]
          ],
          [
            [
              0.116126,
              52.208037
            ],
            [
              0.11754,
              52.208037
            ]
          ]
        ],
        "type": "MultiLineString"
      },
      "type": "Feature",
      "properties": {}
    }
  ],
  "type": "FeatureCollection"
}

Shortened to the first two lines of the grid; the full response has a line for every grid row and column in the bounding box.

Response fields

FieldDescription
lines[]array of objectArray of line objects that make up the grid
lines[].startobject (Coordinates)
lines[].start.latnumberLatitude
lines[].start.lngnumberLongitude
lines[].endobject (Coordinates)
lines[].end.latnumberLatitude
lines[].end.lngnumberLongitude

Responses

200 Successful grid section retrieval

application/jsonapplication/geo+json Schema GridSectionResponse

400 Bad request

application/json

4 examples
BadBoundingBox
{
  "error": {
    "code": "BadBoundingBox",
    "message": "bounding-box must be specified as south_lat,west_lng,north_lat,east_lng"
  }
}
BadBoundingBoxTooBig
{
  "error": {
    "code": "BadBoundingBoxTooBig",
    "message": "Bounding box too large (exceeds 4km from corner to corner)"
  }
}
BadFormat
{
  "error": {
    "code": "BadFormat",
    "message": "Format must be one of json,geojson"
  }
}
DuplicateParameter
{
  "error": {
    "code": "DuplicateParameter",
    "message": "Duplicate parameter 'bounding-box'. Please only pass in one of each parameter."
  }
}

401 Unauthorized - Invalid API key

application/json Schema ErrorResponse

2 examples
InvalidKey
{
  "error": {
    "code": "InvalidKey",
    "message": "Authentication failed; invalid API key"
  }
}
MissingKey
{
  "error": {
    "code": "MissingKey",
    "message": "Authentication failed; missing required API key parameter or header"
  }
}

Available languages#

GEThttps://api.what3words.com/v3/available-languages

Retrieves all available what3words address languages and locale/script variants, including language code, English name and native name. Use top-level code values as base language codes, and use nested locales[].code values where explicit locale/script selection is needed (for example en, mn, mn_la, zh_tr, oo_cy).

Parameters

ParameterDescription
keystring · queryoptional

A valid API key. Provide it as query parameter key; X-Api-Key header is also supported.

Example request

cURL, JavaScript, Python
cURL
curl --request GET \
  --url 'https://api.what3words.com/v3/available-languages?key=YOUR_API_KEY'
JavaScript
const params = new URLSearchParams({
  key: 'YOUR_API_KEY',
});
const response = await fetch(`https://api.what3words.com/v3/available-languages?${params}`);
const data = await response.json();
console.log(data);
Python
import requests

response = requests.get(
    "https://api.what3words.com/v3/available-languages",
    params={"key": "YOUR_API_KEY"},
)
print(response.json())

Example result

Status 200 OK

JSON
{
  "languages": [
    {
      "nativeName": "Deutsch",
      "code": "de",
      "name": "German"
    },
    {
      "nativeName": "English",
      "code": "en",
      "name": "English"
    },
    {
      "nativeName": "Français",
      "code": "fr",
      "name": "French"
    },
    {
      "nativeName": "Монгол хэл",
      "code": "mn",
      "name": "Mongolian",
      "locales": [
        {
          "nativeName": "Монгол хэл (Латинаар)",
          "name": "Mongolian (Latin)",
          "code": "mn_la"
        },
        {
          "nativeName": "Монгол хэл (Криллээр)",
          "name": "Mongolian (Cyrillic)",
          "code": "mn_cy"
        }
      ]
    },
    {
      "nativeName": "中文",
      "code": "zh",
      "name": "Chinese",
      "locales": [
        {
          "nativeName": "中文(繁體)",
          "name": "Chinese (Traditional)",
          "code": "zh_tr"
        },
        {
          "nativeName": "中文(简体)",
          "name": "Chinese (Simplified)",
          "code": "zh_si"
        }
      ]
    }
  ]
}

Shortened to five languages; the full response lists all 58 languages.

Response fields

FieldDescription
languages[]array of LanguageList of available languages
languages[].codestringThe what3words language code for the language or language family (for example en, mn, oo).
languages[].namestringThe English name of the language
languages[].nativeNamestringThe name of the language in that language
languages[].locales[]array of LocaleList of available locales for this language, if applicable
languages[].locales[].codestringThe locale code
languages[].locales[].namestringThe name of the locale
languages[].locales[].nativeNamestringThe native name of the locale

Responses

200 Successful retrieval of available languages

application/json Schema AvailableLanguagesResponse

401 Unauthorized - Invalid API key

application/json Schema ErrorResponse

2 examples
InvalidKey
{
  "error": {
    "code": "InvalidKey",
    "message": "Authentication failed; invalid API key"
  }
}
MissingKey
{
  "error": {
    "code": "MissingKey",
    "message": "Authentication failed; missing required API key parameter or header"
  }
}

Schemas#

The objects the endpoints return.

Coordinates

FieldDescription
latnumberLatitude
lngnumberLongitude

Square

FieldDescription
southwestobject (Coordinates)
southwest.latnumberLatitude
southwest.lngnumberLongitude
northeastobject (Coordinates)
northeast.latnumberLatitude
northeast.lngnumberLongitude

ConvertTo3waResponse

FieldDescription
countrystringThe country in which the what3words address is located, as an ISO 3166-1 alpha-2 country code
squareobject (Square)
square.southwestobject (Coordinates)
square.southwest.latnumberLatitude
square.southwest.lngnumberLongitude
square.northeastobject (Coordinates)
square.northeast.latnumberLatitude
square.northeast.lngnumberLongitude
nearestPlacestringThe nearest place to the what3words address
coordinatesobject (Coordinates)
coordinates.latnumberLatitude
coordinates.lngnumberLongitude
wordsstringThe what3words address
languagestringThe language of the what3words address
localestringThe locale of the what3words address, if returned
mapstringURL to view the what3words address on the what3words map

ConvertToCoordinatesResponse

FieldDescription
countrystringThe country in which the what3words address is located, as an ISO 3166-1 alpha-2 country code
squareobject (Square)
square.southwestobject (Coordinates)
square.southwest.latnumberLatitude
square.southwest.lngnumberLongitude
square.northeastobject (Coordinates)
square.northeast.latnumberLatitude
square.northeast.lngnumberLongitude
nearestPlacestringThe nearest place to the what3words address
coordinatesobject (Coordinates)
coordinates.latnumberLatitude
coordinates.lngnumberLongitude
wordsstringThe what3words address
languagestringThe language of the what3words address
localestringThe locale of the what3words address, if returned
mapstringURL to view the what3words address on the what3words map

AutosuggestResponse

FieldDescription
suggestions[]array of AutosuggestSuggestionList of suggested what3words addresses
suggestions[].wordsstringThe suggested what3words address
suggestions[].countrystringThe country in which the what3words address is located, as an ISO 3166-1 alpha-2 country code
suggestions[].nearestPlacestringThe nearest place to the what3words address
suggestions[].languagestringThe language of the what3words address
suggestions[].localestringThe locale of the what3words address, if applicable
suggestions[].rankintegerThe relative ranking of this suggestion
suggestions[].distanceToFocusKmnumberThe distance in kilometers from the focus point to this suggestion's coordinates

GridSectionResponse

FieldDescription
lines[]array of objectArray of line objects that make up the grid
lines[].startobject (Coordinates)
lines[].start.latnumberLatitude
lines[].start.lngnumberLongitude
lines[].endobject (Coordinates)
lines[].end.latnumberLatitude
lines[].end.lngnumberLongitude

GridSectionGeoJsonResponse

GeoJSON representation of the grid section

Locale

FieldDescription
codestringThe locale code
namestringThe name of the locale
nativeNamestringThe native name of the locale

Language

FieldDescription
codestringThe what3words language code for the language or language family (for example en, mn, oo).
namestringThe English name of the language
nativeNamestringThe name of the language in that language
locales[]array of LocaleList of available locales for this language, if applicable
locales[].codestringThe locale code
locales[].namestringThe name of the locale
locales[].nativeNamestringThe native name of the locale

AvailableLanguagesResponse

FieldDescription
languages[]array of LanguageList of available languages
languages[].codestringThe what3words language code for the language or language family (for example en, mn, oo).
languages[].namestringThe English name of the language
languages[].nativeNamestringThe name of the language in that language
languages[].locales[]array of LocaleList of available locales for this language, if applicable
languages[].locales[].codestringThe locale code
languages[].locales[].namestringThe name of the locale
languages[].locales[].nativeNamestringThe native name of the locale

Error

FieldDescription
codestringError code that can be used programmatically
messagestringA helpful message explaining what went wrong

ErrorResponse

FieldDescription
errorobject (Error)
error.codestringError code that can be used programmatically
error.messagestringA helpful message explaining what went wrong

AutosuggestSuggestion

FieldDescription
wordsstringThe suggested what3words address
countrystringThe country in which the what3words address is located, as an ISO 3166-1 alpha-2 country code
nearestPlacestringThe nearest place to the what3words address
languagestringThe language of the what3words address
localestringThe locale of the what3words address, if applicable
rankintegerThe relative ranking of this suggestion
distanceToFocusKmnumberThe distance in kilometers from the focus point to this suggestion's coordinates

AutosuggestWithCoordinatesSuggestion

FieldDescription
wordsstringThe suggested what3words address
countrystringThe country in which the what3words address is located, as an ISO 3166-1 alpha-2 country code
squareobject (Square)
square.southwestobject (Coordinates)
square.southwest.latnumberLatitude
square.southwest.lngnumberLongitude
square.northeastobject (Coordinates)
square.northeast.latnumberLatitude
square.northeast.lngnumberLongitude
nearestPlacestringThe nearest place to the what3words address
coordinatesobject (Coordinates)
coordinates.latnumberLatitude
coordinates.lngnumberLongitude
languagestringThe language of the what3words address
localestringThe locale of the what3words address, if returned
rankintegerThe relative ranking of this suggestion
distanceToFocusKmnumberThe distance in kilometers from the focus point to this suggestion's coordinates
mapstringURL to view the what3words address on the what3words map

AutosuggestWithCoordinatesResponse

FieldDescription
suggestions[]array of AutosuggestWithCoordinatesSuggestionList of suggested what3words addresses including coordinates
suggestions[].wordsstringThe suggested what3words address
suggestions[].countrystringThe country in which the what3words address is located, as an ISO 3166-1 alpha-2 country code
suggestions[].squareobject (Square)
suggestions[].square.southwestobject (Coordinates)
suggestions[].square.southwest.latnumberLatitude
suggestions[].square.southwest.lngnumberLongitude
suggestions[].square.northeastobject (Coordinates)
suggestions[].square.northeast.latnumberLatitude
suggestions[].square.northeast.lngnumberLongitude
suggestions[].nearestPlacestringThe nearest place to the what3words address
suggestions[].coordinatesobject (Coordinates)
suggestions[].coordinates.latnumberLatitude
suggestions[].coordinates.lngnumberLongitude
suggestions[].languagestringThe language of the what3words address
suggestions[].localestringThe locale of the what3words address, if returned
suggestions[].rankintegerThe relative ranking of this suggestion
suggestions[].distanceToFocusKmnumberThe distance in kilometers from the focus point to this suggestion's coordinates
suggestions[].mapstringURL to view the what3words address on the what3words map
esc
↑ ↓ to choose↵ to openesc to close