what3words API

Convert to coordinates

Changed on

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.

get/convert-to-coordinates

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.

wordsstring required
Example:filled.count.soap

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

format'json' | 'geojson'

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

Response

Successful conversion to coordinates

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

      deleted the query request parameter locale

    • 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