Find the nearest public toilets

Use this when the user asks for the nearest public toilet. Send place (text) or lat and lon. When both are missing the answer has status needs_location.

get/api/v1/toilets/nearest

Request

  • Base URL: https://wcway.com
  • URL: https://wcway.com/api/v1/toilets/nearest
  • Auth: none required

Query parameters

placestring

Street, station, landmark or town, for example Darmstadt Hauptbahnhof.

countrystring

ISO 3166-1 alpha-2 code. Narrows the place lookup.

latnumber

Latitude, WGS84. Send with lon.

lonnumber

Longitude, WGS84. Send with lat.

limitinteger
open_nowboolean

Drop toilets that are closed now. Toilets with unknown hours stay in the list and show open_now unknown.

wheelchairboolean

Only wheelchair-accessible toilets.

changing_tableboolean

Only toilets with a changing table.

freeboolean

Only toilets known to be free of charge.

no_purchase_neededboolean

Only toilets that need no purchase: public, permissive or scheme access.

Response

Toilets sorted by distance, or a status that asks for a location.

status'ok' | 'no_results' | 'needs_location' | 'place_not_found' required

needs_location and place_not_found are not errors. Ask the user the question in ask_user.

bboxnumber[]

west, south, east, north of the origin and the results.

ask_userstring
display_notestring required

Example response

{
  "origin": {
    "label": "Luisenplatz, Darmstadt"
  },
  "results": [
    {
      "id": "lt_01J9ZQ"
    }
  ],
  "attribution": {
    "text": "© OpenStreetMap contributors",
    "license": "ODbL-1.0"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.