# what3words developer documentation: Conversions > Convert coordinates to what3words addresses, and what3words addresses to coordinates, with the API. Every page in this section, in menu order, as Markdown. Section page: https://developer.what3words.com/docs/conversions.md. All sections: https://developer.what3words.com/llms.txt --- # Convert to 3 word address (API v3) Source: https://developer.what3words.com/public-api/docs#convert-to-3wa `GET https://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 | Parameter | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `key` | query | string | optional | A valid API key. Provide it as query parameter `key`; `X-Api-Key` header is also supported. | | `coordinates` | query | string | required | Coordinates as a comma separated string of latitude and longitude. Example `coordinates=51.521251,-0.203586`. | | `language` | query | string | optional | 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. For Bosnian-Croatian-Montenegrin-Serbian use `oo`. See [Available languages](https://developer.what3words.com/public-api/docs#available-languages) for every code. Default `en`. Example `language=fr`. | | `format` | query | string | optional | Return data format type; can be either `json` (the default) or `geojson`. One of `json`, `geojson`. Default `json`. | | `locale` | query | string | optional | 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`). See [Locales](https://developer.what3words.com/public-api/docs#locales) for more details. Example `locale=mn_la`. | ### Example request **cURL** ```shellscript curl --request GET \ --url 'https://api.what3words.com/v3/convert-to-3wa?coordinates=51.520847,-0.195521&key=YOUR_API_KEY' ``` **JavaScript** ```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** ```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** ```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** ```json { "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 | Type | Description | | --- | --- | --- | | `country` | string | The country in which the what3words address is located, as an ISO 3166-1 alpha-2 country code | | `square` | object (Square) | | | `square.southwest` | object (Coordinates) | | | `square.southwest.lat` | number | Latitude | | `square.southwest.lng` | number | Longitude | | `square.northeast` | object (Coordinates) | | | `square.northeast.lat` | number | Latitude | | `square.northeast.lng` | number | Longitude | | `nearestPlace` | string | The nearest place to the what3words address | | `coordinates` | object (Coordinates) | | | `coordinates.lat` | number | Latitude | | `coordinates.lng` | number | Longitude | | `words` | string | The what3words address | | `language` | string | The language of the what3words address | | `locale` | string | The locale of the what3words address, if returned | | `map` | string | URL to view the what3words address on the what3words map | ### Errors | Status | Code | Message | | --- | --- | --- | | 400 | `BadLanguage` | language must be a supported what3words language code, such as 'en', 'fr' or 'mn_la' | | 400 | `BadCoordinates` | failed to parse one of the coordinates as a valid decimal number | | 400 | `BadFormat` | Format must be one of json,geojson | | 400 | `BadLanguage` | language and locale must not be different | | 400 | `DuplicateParameter` | Duplicate parameter 'coordinates'. Please only pass in one of each parameter. | | 401 | `InvalidKey` | Authentication failed; invalid API key | | 401 | `MissingKey` | Authentication failed; missing required API key parameter or header | --- # Convert to coordinates (API v3) Source: https://developer.what3words.com/public-api/docs#convert-to-coords `GET https://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 | Parameter | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `key` | query | string | optional | A valid API key. Provide it as query parameter `key`; `X-Api-Key` header is also supported. | | `words` | query | string | required | A what3words address. Input parsing is case-insensitive, accepts an optional leading `///`, and accepts supported dot-like delimiters (. 。 。 ・ ・ ︒ ។ ։ ။ ۔ ። ।). Vietnamese addresses must be supplied either with no internal spaces or with 1 to 3 internal spaces in every word (spaces are URL-encoded as `%20`); the two Vietnamese styles cannot be mixed in a single address. Example `words=filled.count.soap`. | | `format` | query | string | optional | Return data format type; can be either `json` (the default) or `geojson`. One of `json`, `geojson`. Default `json`. | ### Example request **cURL** ```shellscript curl --request GET \ --url 'https://api.what3words.com/v3/convert-to-coordinates?words=filled.count.soap&key=YOUR_API_KEY' ``` **JavaScript** ```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** ```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** ```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** ```json { "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 | Type | Description | | --- | --- | --- | | `country` | string | The country in which the what3words address is located, as an ISO 3166-1 alpha-2 country code | | `square` | object (Square) | | | `square.southwest` | object (Coordinates) | | | `square.southwest.lat` | number | Latitude | | `square.southwest.lng` | number | Longitude | | `square.northeast` | object (Coordinates) | | | `square.northeast.lat` | number | Latitude | | `square.northeast.lng` | number | Longitude | | `nearestPlace` | string | The nearest place to the what3words address | | `coordinates` | object (Coordinates) | | | `coordinates.lat` | number | Latitude | | `coordinates.lng` | number | Longitude | | `words` | string | The what3words address | | `language` | string | The language of the what3words address | | `locale` | string | The locale of the what3words address, if returned | | `map` | string | URL to view the what3words address on the what3words map | ### Errors | Status | Code | Message | | --- | --- | --- | | 400 | `MissingWords` | words must be specified | | 400 | `BadWords` | words must be a valid 3 word address, such as filled.count.soap or ///filled.count.soap | | 400 | `BadFormat` | Format must be one of json,geojson | | 400 | `DuplicateParameter` | Duplicate parameter 'words'. Please only pass in one of each parameter. | | 401 | `InvalidKey` | Authentication failed; invalid API key | | 401 | `MissingKey` | Authentication failed; missing required API key parameter or header |