what3words API

Convert to what3words address

Changed on

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.

get/convert-to-3wa

Request

  • Base URL
    https://api.what3words.com/v3
  • Auth
    • API key in query parameter key
    • or API key in header X-Api-Key

Query parameters

keystring

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

coordinatesstring required
Example:51.521251,-0.203586

Coordinates as a comma separated string of latitude and longitude

languagestring
Example:fr

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.

format'json' | 'geojson'

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

localestring
Example:mn_la

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).

Response

Successful conversion to 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

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

Example response

{
  "country": "GB",
  "square": {
    "southwest": {
      "lat": 51.520847,
      "lng": -0.195521
    },
    "northeast": {
      "lat": 51.520847,
      "lng": -0.195521
    }
  },
  "nearestPlace": "Bayswater, London",
  "coordinates": {
    "lat": 51.520847,
    "lng": -0.195521
  },
  "words": "filled.count.soap",
  "language": "en",
  "locale": "mn_la",
  "map": "https://w3w.co/filled.count.soap"
}

Changes

    • warning

      added the new BadInput enum value to the / response property for the response status

    • warning

      added the new BadInput enum value to the / response property for the response status

    • warning

      added the new BadNFocusResults enum value to the / response property for the response status

    • warning

      added the new BadNFocusResults enum value to the / response property for the response status

    • warning

      added the new BadNResults enum value to the / response property for the response status

    • warning

      added the new BadNResults enum value to the / response property for the response status

    • warning

      added the new DuplicateParameter enum value to the / response property for the response status

    • warning

      added the new DuplicateParameter enum value to the / response property for the response status

    • warning

      added the new MissingKey enum value to the / response property for the response status

    • warning

      added the new MissingKey enum value to the / response property for the response status

    • info

      the endpoint scheme security ApiKeyHeader was added to the API

    • info

      the query request parameter key became optional

    • info

      removed the BadLocale enum value from the / response property for the response status

    • info

      removed the BadLocale enum value from the / response property for the response status