OpenAPI reference
On this page
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:
- API Authentication
- Error Codes
- Supported Languages
- Rate Limits
- API Terms of Use
- API Pricing
- Postman Collection
- Blog: Minimum word and address lengths (code points vs characters)
- Blog: Understanding locales in what3words
- Blog: Demystifying the alias parameter
- Blog: LTR and RTL scripts
- Blog: Secondary words across languages
- Blog: Understanding the what3words regex
Endpoints#
- GET/convert-to-3waConvert to what3words addressThis function will convert a latitude and longitude to a what3words address, in the language of your choice.
- GET/convert-to-coordinatesConvert to coordinatesThis function converts a what3words address to a latitude and longitude.
- GET/autosuggestAutoSuggestAutoSuggest can take a slightly incorrect what3words address and suggest a list of valid what3words addresses.
- GET/autosuggest-with-coordinatesAutoSuggest with CoordinatesSimilar to the AutoSuggest endpoint, but returns coordinates in the response.
- GET/grid-sectionGrid sectionReturns a section of the 3m x 3m what3words grid for a bounding box.
- GET/available-languagesAvailable languagesRetrieves all available what3words address languages and locale/script variants, including language code, English name and native name.
Authentication#
Every request needs an API key, sent as the key query parameter or the X-Api-Key header. Get your free API key.
| Scheme | Where | Name | Description |
|---|---|---|---|
| ApiKeyAuth | query | key | API key for authentication. Provide it as query parameter key; X-Api-Key header is also supported. |
| ApiKeyHeader | header | X-Api-Key | API 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
| Code | Status | Returned by |
|---|---|---|
MissingWords | 400 | /convert-to-coordinates |
BadWords | 400 | /convert-to-coordinates |
BadFormat | 400 | /convert-to-3wa, /convert-to-coordinates, /grid-section |
BadCoordinates | 400 | /convert-to-3wa |
BadBoundingBox | 400 | /grid-section |
BadBoundingBoxTooBig | 400 | /grid-section |
BadFocus | 400 | /autosuggest, /autosuggest-with-coordinates |
BadClipToCountry | 400 | /autosuggest, /autosuggest-with-coordinates |
BadClipToBoundingBox | 400 | /autosuggest, /autosuggest-with-coordinates |
BadClipToCircle | 400 | /autosuggest, /autosuggest-with-coordinates |
BadClipToPolygon | 400 | /autosuggest, /autosuggest-with-coordinates |
MissingLanguage | 400 | /autosuggest, /autosuggest-with-coordinates |
BadLanguage | 400 | /convert-to-3wa, /autosuggest, /autosuggest-with-coordinates |
InvalidKey | 401 | /convert-to-3wa, /convert-to-coordinates, /autosuggest, /autosuggest-with-coordinates, /grid-section, /available-languages |
InvalidKeyNoPermissions | 401 | /autosuggest-with-coordinates |
BadInputType | 400 | /autosuggest, /autosuggest-with-coordinates |
MissingInput | 400 | /autosuggest, /autosuggest-with-coordinates |
MissingKey | 401 | /convert-to-3wa, /convert-to-coordinates, /autosuggest, /autosuggest-with-coordinates, /grid-section, /available-languages |
DuplicateParameter | 400 | /convert-to-3wa, /convert-to-coordinates, /autosuggest, /autosuggest-with-coordinates, /grid-section |
BadNResults | 400 | /autosuggest, /autosuggest-with-coordinates |
BadNFocusResults | 400 | /autosuggest, /autosuggest-with-coordinates |
BadInput | 400 | /autosuggest, /autosuggest-with-coordinates |
Convert to what3words address#
https://api.what3words.com/v3/convert-to-3waThis 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
| Parameter | Description |
|---|---|
keystring · queryoptional | A valid API key. Provide it as query parameter |
coordinatesstring · queryrequired | Coordinates as a comma separated string of latitude and longitude Example |
languagestring · queryoptional | A supported what3words language code from Default |
formatstring · queryoptional | Return data format type; can be either One of |
localestring · queryoptional | Optional locale/script-specific code. Can be passed on its own. If provided with Example |
Example request
curl --request GET \
--url 'https://api.what3words.com/v3/convert-to-3wa?coordinates=51.520847,-0.195521&key=YOUR_API_KEY'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);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
{
"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"
}{
"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
| Field | Description |
|---|---|
countrystring | The country in which the what3words address is located, as an ISO 3166-1 alpha-2 country code |
squareobject (Square) | |
square.object (Coordinates) | |
square.number | Latitude |
square.number | Longitude |
square.object (Coordinates) | |
square.number | Latitude |
square.number | Longitude |
nearestPlacestring | The nearest place to the what3words address |
coordinatesobject (Coordinates) | |
coordinates.number | Latitude |
coordinates.number | Longitude |
wordsstring | The what3words address |
languagestring | The language of the what3words address |
localestring | The locale of the what3words address, if returned |
mapstring | URL 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
{
"error": {
"code": "BadLanguage",
"message": "language must be a supported what3words language code, such as 'en', 'fr' or 'mn_la'"
}
}{
"error": {
"code": "BadCoordinates",
"message": "failed to parse one of the coordinates as a valid decimal number"
}
}{
"error": {
"code": "BadFormat",
"message": "Format must be one of json,geojson"
}
}{
"error": {
"code": "BadLanguage",
"message": "language and locale must not be different"
}
}{
"error": {
"code": "DuplicateParameter",
"message": "Duplicate parameter 'coordinates'. Please only pass in one of each parameter."
}
}401 Unauthorized - Invalid API key
application/json Schema ErrorResponse
{
"error": {
"code": "InvalidKey",
"message": "Authentication failed; invalid API key"
}
}{
"error": {
"code": "MissingKey",
"message": "Authentication failed; missing required API key parameter or header"
}
}Convert to coordinates#
https://api.what3words.com/v3/convert-to-coordinatesThis 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
| Parameter | Description |
|---|---|
keystring · queryoptional | A valid API key. Provide it as query parameter |
wordsstring · queryrequired | A what3words address. Input parsing is case-insensitive, accepts an optional leading Example |
formatstring · queryoptional | Return data format type; can be either One of |
Example request
curl --request GET \
--url 'https://api.what3words.com/v3/convert-to-coordinates?words=filled.count.soap&key=YOUR_API_KEY'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);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
{
"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"
}{
"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
| Field | Description |
|---|---|
countrystring | The country in which the what3words address is located, as an ISO 3166-1 alpha-2 country code |
squareobject (Square) | |
square.object (Coordinates) | |
square.number | Latitude |
square.number | Longitude |
square.object (Coordinates) | |
square.number | Latitude |
square.number | Longitude |
nearestPlacestring | The nearest place to the what3words address |
coordinatesobject (Coordinates) | |
coordinates.number | Latitude |
coordinates.number | Longitude |
wordsstring | The what3words address |
languagestring | The language of the what3words address |
localestring | The locale of the what3words address, if returned |
mapstring | URL 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
{
"error": {
"code": "MissingWords",
"message": "words must be specified"
}
}{
"error": {
"code": "BadWords",
"message": "words must be a valid 3 word address, such as filled.count.soap or ///filled.count.soap"
}
}{
"error": {
"code": "BadFormat",
"message": "Format must be one of json,geojson"
}
}{
"error": {
"code": "DuplicateParameter",
"message": "Duplicate parameter 'words'. Please only pass in one of each parameter."
}
}401 Unauthorized - Invalid API key
application/json Schema ErrorResponse
{
"error": {
"code": "InvalidKey",
"message": "Authentication failed; invalid API key"
}
}{
"error": {
"code": "MissingKey",
"message": "Authentication failed; missing required API key parameter or header"
}
}AutoSuggest#
https://api.what3words.com/v3/autosuggestAutoSuggest 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
| Parameter | Description |
|---|---|
keystring · queryoptional | A valid API key. Provide it as query parameter |
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 Example |
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 |
n-focus-resultsinteger · queryoptional | Controls how many top suggestions are strongly biased towards the Default |
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 Example |
clip-to-circlestring · queryoptional | Restricts results to a circle, specified by Example |
clip-to-bounding-boxstring · queryoptional | Restricts results to a bounding box, specified by Example |
clip-to-polygonstring · queryoptional | Restricts results to a polygon, specified by a comma-separated list of Example |
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 ( Default |
localestring · queryoptional | Optional locale/script-specific code. Can be passed on its own. If provided with Example |
input-typestring · queryoptional | For power users, used to specify voice input mode. Can be One of |
n-resultsinteger · queryoptional | The number of AutoSuggest results to return. Non-numeric values return Default |
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 |
formatstring · queryoptional | Return data format type; can be either One of |
Example request
curl --request GET \
--url 'https://api.what3words.com/v3/autosuggest?input=film.crunchy.spiri&focus=50.842404,4.361177&key=YOUR_API_KEY'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);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
{
"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
| Field | Description |
|---|---|
suggestions[]array of AutosuggestSuggestion | List of suggested what3words addresses |
suggestions[].string | The suggested what3words address |
suggestions[].string | The country in which the what3words address is located, as an ISO 3166-1 alpha-2 country code |
suggestions[].string | The nearest place to the what3words address |
suggestions[].string | The language of the what3words address |
suggestions[].string | The locale of the what3words address, if applicable |
suggestions[].integer | The relative ranking of this suggestion |
suggestions[].number | The 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
{
"error": {
"code": "MissingInput",
"message": "input must be specified"
}
}{
"error": {
"code": "BadFocus",
"message": "focus must be a lat,lng"
}
}{
"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"
}
}{
"error": {
"code": "BadClipToBoundingBox",
"message": "Must be four lat,lng,lat,lng coordinates such as 50,-2,53.12,2.34"
}
}{
"error": {
"code": "BadClipToCircle",
"message": "clip-to-circle needs to be lat,lng,km. Example: 51.453,0.344,112"
}
}{
"error": {
"code": "BadClipToPolygon",
"message": "Failed to parse one of the coordinates as a valid decimal number"
}
}{
"error": {
"code": "MissingLanguage",
"message": "for voice input. language must be specified"
}
}{
"error": {
"code": "BadLanguage",
"message": "language must be a supported what3words language code, such as 'en', 'fr' or 'mn_la'"
}
}{
"error": {
"code": "BadInputType",
"message": "prefer-land must be one of true or false"
}
}{
"error": {
"code": "BadLanguage",
"message": "language and locale must not be different"
}
}{
"error": {
"code": "BadNResults",
"message": "n-results must be a valid integer"
}
}{
"error": {
"code": "BadNFocusResults",
"message": "n-focus-results must be a valid integer"
}
}{
"error": {
"code": "BadInput",
"message": "Invalid autosuggest input"
}
}{
"error": {
"code": "DuplicateParameter",
"message": "Duplicate parameter 'input'. Please only pass in one of each parameter."
}
}401 Unauthorized - Invalid API key
application/json Schema ErrorResponse
{
"error": {
"code": "InvalidKey",
"message": "Authentication failed; invalid API key"
}
}{
"error": {
"code": "MissingKey",
"message": "Authentication failed; missing required API key parameter or header"
}
}AutoSuggest with Coordinates#
https://api.what3words.com/v3/autosuggest-with-coordinatesSimilar to the AutoSuggest endpoint, but returns coordinates in the response. This endpoint requires special permissions.
Parameters
| Parameter | Description |
|---|---|
keystring · queryoptional | A valid API key. Provide it as query parameter |
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 Example |
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 |
n-focus-resultsinteger · queryoptional | Controls how many top suggestions are strongly biased towards the Default |
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 Example |
clip-to-circlestring · queryoptional | Restricts results to a circle, specified by Example |
clip-to-bounding-boxstring · queryoptional | Restricts results to a bounding box, specified by Example |
clip-to-polygonstring · queryoptional | Restricts results to a polygon, specified by a comma-separated list of Example |
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 ( Default |
localestring · queryoptional | Optional locale/script-specific code. Can be passed on its own. If provided with Example |
input-typestring · queryoptional | For power users, used to specify voice input mode. Can be One of |
n-resultsinteger · queryoptional | The number of AutoSuggest results to return. Non-numeric values return Default |
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 |
formatstring · queryoptional | Return data format type; can be either One of |
Example request
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'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);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
{
"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
| Field | Description |
|---|---|
suggestions[]array of AutosuggestWithCoordinatesSuggestion | List of suggested what3words addresses including coordinates |
suggestions[].string | The suggested what3words address |
suggestions[].string | The country in which the what3words address is located, as an ISO 3166-1 alpha-2 country code |
suggestions[].object (Square) | |
suggestions[].object (Coordinates) | |
suggestions[].number | Latitude |
suggestions[].number | Longitude |
suggestions[].object (Coordinates) | |
suggestions[].number | Latitude |
suggestions[].number | Longitude |
suggestions[].string | The nearest place to the what3words address |
suggestions[].object (Coordinates) | |
suggestions[].number | Latitude |
suggestions[].number | Longitude |
suggestions[].string | The language of the what3words address |
suggestions[].string | The locale of the what3words address, if returned |
suggestions[].integer | The relative ranking of this suggestion |
suggestions[].number | The distance in kilometers from the focus point to this suggestion's coordinates |
suggestions[].string | URL 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
{
"error": {
"code": "MissingInput",
"message": "input must be specified"
}
}{
"error": {
"code": "BadFocus",
"message": "focus must be a lat,lng"
}
}{
"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"
}
}{
"error": {
"code": "BadClipToBoundingBox",
"message": "Must be four lat,lng,lat,lng coordinates such as 50,-2,53.12,2.34"
}
}{
"error": {
"code": "BadClipToCircle",
"message": "clip-to-circle needs to be lat,lng,km. Example: 51.453,0.344,112"
}
}{
"error": {
"code": "BadClipToPolygon",
"message": "Failed to parse one of the coordinates as a valid decimal number"
}
}{
"error": {
"code": "MissingLanguage",
"message": "for voice input. language must be specified"
}
}{
"error": {
"code": "BadLanguage",
"message": "language must be a supported what3words language code, such as 'en', 'fr' or 'mn_la'"
}
}{
"error": {
"code": "BadInputType",
"message": "prefer-land must be one of true or false"
}
}{
"error": {
"code": "BadLanguage",
"message": "language and locale must not be different"
}
}{
"error": {
"code": "BadNResults",
"message": "n-results must be a valid integer"
}
}{
"error": {
"code": "BadNFocusResults",
"message": "n-focus-results must be a valid integer"
}
}{
"error": {
"code": "BadInput",
"message": "Invalid autosuggest input"
}
}{
"error": {
"code": "DuplicateParameter",
"message": "Duplicate parameter 'input'. Please only pass in one of each parameter."
}
}401 Unauthorized - Invalid API key
application/json Schema ErrorResponse
{
"error": {
"code": "InvalidKey",
"message": "Authentication failed; invalid API key"
}
}{
"error": {
"code": "InvalidKey",
"message": "Auth failed; /v3/autosuggest-with-coordinates. Contact support@what3words.com or your account manager to enable your account"
}
}{
"error": {
"code": "MissingKey",
"message": "Authentication failed; missing required API key parameter or header"
}
}Grid section#
https://api.what3words.com/v3/grid-sectionReturns 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
| Parameter | Description |
|---|---|
keystring · queryoptional | A valid API key. Provide it as query parameter |
bounding-boxstring · queryrequired | Bounding box, as a Example |
formatstring · queryoptional | Return data format type; can be either One of |
Example request
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'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);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
{
"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
}
}
]
}{
"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
| Field | Description |
|---|---|
lines[]array of object | Array of line objects that make up the grid |
lines[].object (Coordinates) | |
lines[].number | Latitude |
lines[].number | Longitude |
lines[].object (Coordinates) | |
lines[].number | Latitude |
lines[].number | Longitude |
Responses
200 Successful grid section retrieval
application/jsonapplication/geo+json Schema GridSectionResponse
400 Bad request
application/json
{
"error": {
"code": "BadBoundingBox",
"message": "bounding-box must be specified as south_lat,west_lng,north_lat,east_lng"
}
}{
"error": {
"code": "BadBoundingBoxTooBig",
"message": "Bounding box too large (exceeds 4km from corner to corner)"
}
}{
"error": {
"code": "BadFormat",
"message": "Format must be one of json,geojson"
}
}{
"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
{
"error": {
"code": "InvalidKey",
"message": "Authentication failed; invalid API key"
}
}{
"error": {
"code": "MissingKey",
"message": "Authentication failed; missing required API key parameter or header"
}
}Available languages#
https://api.what3words.com/v3/available-languagesRetrieves 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
| Parameter | Description |
|---|---|
keystring · queryoptional | A valid API key. Provide it as query parameter |
Example request
curl --request GET \
--url 'https://api.what3words.com/v3/available-languages?key=YOUR_API_KEY'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);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
{
"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
| Field | Description |
|---|---|
languages[]array of Language | List of available languages |
languages[].string | The what3words language code for the language or language family (for example en, mn, oo). |
languages[].string | The English name of the language |
languages[].string | The name of the language in that language |
languages[].array of Locale | List of available locales for this language, if applicable |
languages[].string | The locale code |
languages[].string | The name of the locale |
languages[].string | The 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
{
"error": {
"code": "InvalidKey",
"message": "Authentication failed; invalid API key"
}
}{
"error": {
"code": "MissingKey",
"message": "Authentication failed; missing required API key parameter or header"
}
}Schemas#
The objects the endpoints return.
Coordinates
| Field | Description |
|---|---|
latnumber | Latitude |
lngnumber | Longitude |
Square
| Field | Description |
|---|---|
southwestobject (Coordinates) | |
southwest.number | Latitude |
southwest.number | Longitude |
northeastobject (Coordinates) | |
northeast.number | Latitude |
northeast.number | Longitude |
ConvertTo3waResponse
| Field | Description |
|---|---|
countrystring | The country in which the what3words address is located, as an ISO 3166-1 alpha-2 country code |
squareobject (Square) | |
square.object (Coordinates) | |
square.number | Latitude |
square.number | Longitude |
square.object (Coordinates) | |
square.number | Latitude |
square.number | Longitude |
nearestPlacestring | The nearest place to the what3words address |
coordinatesobject (Coordinates) | |
coordinates.number | Latitude |
coordinates.number | Longitude |
wordsstring | The what3words address |
languagestring | The language of the what3words address |
localestring | The locale of the what3words address, if returned |
mapstring | URL to view the what3words address on the what3words map |
ConvertToCoordinatesResponse
| Field | Description |
|---|---|
countrystring | The country in which the what3words address is located, as an ISO 3166-1 alpha-2 country code |
squareobject (Square) | |
square.object (Coordinates) | |
square.number | Latitude |
square.number | Longitude |
square.object (Coordinates) | |
square.number | Latitude |
square.number | Longitude |
nearestPlacestring | The nearest place to the what3words address |
coordinatesobject (Coordinates) | |
coordinates.number | Latitude |
coordinates.number | Longitude |
wordsstring | The what3words address |
languagestring | The language of the what3words address |
localestring | The locale of the what3words address, if returned |
mapstring | URL to view the what3words address on the what3words map |
AutosuggestResponse
| Field | Description |
|---|---|
suggestions[]array of AutosuggestSuggestion | List of suggested what3words addresses |
suggestions[].string | The suggested what3words address |
suggestions[].string | The country in which the what3words address is located, as an ISO 3166-1 alpha-2 country code |
suggestions[].string | The nearest place to the what3words address |
suggestions[].string | The language of the what3words address |
suggestions[].string | The locale of the what3words address, if applicable |
suggestions[].integer | The relative ranking of this suggestion |
suggestions[].number | The distance in kilometers from the focus point to this suggestion's coordinates |
GridSectionResponse
| Field | Description |
|---|---|
lines[]array of object | Array of line objects that make up the grid |
lines[].object (Coordinates) | |
lines[].number | Latitude |
lines[].number | Longitude |
lines[].object (Coordinates) | |
lines[].number | Latitude |
lines[].number | Longitude |
GridSectionGeoJsonResponse
GeoJSON representation of the grid section
Locale
| Field | Description |
|---|---|
codestring | The locale code |
namestring | The name of the locale |
nativeNamestring | The native name of the locale |
Language
| Field | Description |
|---|---|
codestring | The what3words language code for the language or language family (for example en, mn, oo). |
namestring | The English name of the language |
nativeNamestring | The name of the language in that language |
locales[]array of Locale | List of available locales for this language, if applicable |
locales[].string | The locale code |
locales[].string | The name of the locale |
locales[].string | The native name of the locale |
AvailableLanguagesResponse
| Field | Description |
|---|---|
languages[]array of Language | List of available languages |
languages[].string | The what3words language code for the language or language family (for example en, mn, oo). |
languages[].string | The English name of the language |
languages[].string | The name of the language in that language |
languages[].array of Locale | List of available locales for this language, if applicable |
languages[].string | The locale code |
languages[].string | The name of the locale |
languages[].string | The native name of the locale |
Error
| Field | Description |
|---|---|
codestring | Error code that can be used programmatically |
messagestring | A helpful message explaining what went wrong |
ErrorResponse
| Field | Description |
|---|---|
errorobject (Error) | |
error.string | Error code that can be used programmatically |
error.string | A helpful message explaining what went wrong |
AutosuggestSuggestion
| Field | Description |
|---|---|
wordsstring | The suggested what3words address |
countrystring | The country in which the what3words address is located, as an ISO 3166-1 alpha-2 country code |
nearestPlacestring | The nearest place to the what3words address |
languagestring | The language of the what3words address |
localestring | The locale of the what3words address, if applicable |
rankinteger | The relative ranking of this suggestion |
distanceToFocusKmnumber | The distance in kilometers from the focus point to this suggestion's coordinates |
AutosuggestWithCoordinatesSuggestion
| Field | Description |
|---|---|
wordsstring | The suggested what3words address |
countrystring | The country in which the what3words address is located, as an ISO 3166-1 alpha-2 country code |
squareobject (Square) | |
square.object (Coordinates) | |
square.number | Latitude |
square.number | Longitude |
square.object (Coordinates) | |
square.number | Latitude |
square.number | Longitude |
nearestPlacestring | The nearest place to the what3words address |
coordinatesobject (Coordinates) | |
coordinates.number | Latitude |
coordinates.number | Longitude |
languagestring | The language of the what3words address |
localestring | The locale of the what3words address, if returned |
rankinteger | The relative ranking of this suggestion |
distanceToFocusKmnumber | The distance in kilometers from the focus point to this suggestion's coordinates |
mapstring | URL to view the what3words address on the what3words map |
AutosuggestWithCoordinatesResponse
| Field | Description |
|---|---|
suggestions[]array of AutosuggestWithCoordinatesSuggestion | List of suggested what3words addresses including coordinates |
suggestions[].string | The suggested what3words address |
suggestions[].string | The country in which the what3words address is located, as an ISO 3166-1 alpha-2 country code |
suggestions[].object (Square) | |
suggestions[].object (Coordinates) | |
suggestions[].number | Latitude |
suggestions[].number | Longitude |
suggestions[].object (Coordinates) | |
suggestions[].number | Latitude |
suggestions[].number | Longitude |
suggestions[].string | The nearest place to the what3words address |
suggestions[].object (Coordinates) | |
suggestions[].number | Latitude |
suggestions[].number | Longitude |
suggestions[].string | The language of the what3words address |
suggestions[].string | The locale of the what3words address, if returned |
suggestions[].integer | The relative ranking of this suggestion |
suggestions[].number | The distance in kilometers from the focus point to this suggestion's coordinates |
suggestions[].string | URL to view the what3words address on the what3words map |