The toilet data endpoint
Our live map reads toilets from one JSON endpoint, /api/toilets. You can call it too, with no key or sign-up, but it has no service guarantee and may change. For data in bulk, go to the sources instead.

Before you use it
- There are no API keys, accounts or access tiers, and no promise of uptime or of a stable format.
- Each request that is not already cached asks OpenStreetMap’s public Overpass servers, which volunteers and companies run for free. Please keep requests few, and cache what you get.
- For bulk data, take it from the source: the Toilet Map dataset (opens in a new tab) for the UK and OpenStreetMap (opens in a new tab) for everywhere else.
Request
GET https://toiletnearest.com/api/toilets
| Parameter | Required? | Meaning |
|---|---|---|
lat | Required | Latitude in decimal degrees. |
lng | Required | Longitude in decimal degrees. |
radius | Optional | Search radius in metres, as a whole number. Default 2000; anything above 50000 is treated as 50000. |
quick | Optional | quick=1 skips OpenStreetMap and the published datasets and returns only our UK copy and, in New Zealand, the New Zealand records from the lists kept in our code. It answers faster. |
curl "https://toiletnearest.com/api/toilets?lat=51.5072&lng=-0.1276&radius=1000"Response
A JSON object. Its shape, with values left out:
{
"elements": [
{
"type": "node",
"id": …,
"lat": …,
"lon": …,
"tags": { "amenity": "toilets", "fee": "no", "wheelchair": "yes", … }
},
…
],
"_cached": false,
"_osm_count": …,
"_local_count": …,
"_published_count": …,
"_seed_count": …
}| Field | Meaning |
|---|---|
elements | The toilets, in OpenStreetMap’s JSON element format: type, id, lat, lon and tags. Ways and relations are placed at their centre. |
elements[].tags | OpenStreetMap tags as recorded, such as name, fee, wheelchair, opening_hours and changing_table. Records from other sources are converted to the same tag names. A missing tag means not recorded. |
elements[]._local | true for a record from our copy of the Great British Public Toilet Map (UK). |
elements[]._published | true for a record from a council or government dataset. tags._source, tags._source_terms and tags._source_layer give the publisher, its terms and the layer. |
elements[]._seed | true for a record from one of the two lists kept in our code. Some of their details were filled in without a source we can cite; treat them as unverified. |
_osm_count, _local_count, _published_count, _seed_count | How many elements came from each source. |
_cached | true when the answer came from our five-minute cache. |
_quick | true on a quick=1 answer, which carries only _local_count and _seed_count. |
Only OpenStreetMap records carry OpenStreetMap ids. The ids of records from other sources are numbers we make up, and can match an unrelated OpenStreetMap id, so use the flags above to tell them apart.
Where the records come from
- OpenStreetMap, live, through two public Overpass servers: objects tagged
amenity=toilets(or the misspellingamenity=toilet), up to 2,000 per request. - Our copy of the Toilet Map, in the UK. A record within 15 metres of an OpenStreetMap toilet is left out as a likely duplicate.
- Council and government datasets, queried live when the point is inside their coverage: Wellington City Council, Australian Government (National Public Toilet Map via NSW Spatial Portal), City of New York — NYC Parks / NYC Open Data, North Ayrshire Council, City of York Council, City of Austin (ArcGIS Hub) and Région de Bruxelles-Capitale / Brussels Hoofdstedelijk Gewest.
- Two lists kept in our code, added where OpenStreetMap returns few toilets, and always in New Zealand. These are the
_seedrecords.
The methodology explains each source and its gaps.
Errors, empty answers and caching
- Without
latorlng, the reply is HTTP 400 with{"error":"Missing lat/lng","elements":[]}. - If no Overpass server answers within six seconds, the OpenStreetMap part is simply empty and no error is returned. An empty or short list does not prove there are no toilets.
- Answers are cached on our server for five minutes for each small area, so requests for nearby points can get the same answer, and are sent with
Cache-Control: public, max-age=300.
Licences and credit
Every record keeps the licence of its source. If you show the data, credit each source you use:
- OpenStreetMap: “© OpenStreetMap contributors”, under the Open Database Licence (opens in a new tab) (how to credit (opens in a new tab)).
- The Toilet Map: “Contains data from the Toilet Map © 2025 – CC BY 4.0” (its dataset page (opens in a new tab)).
- Council and government datasets: check each publisher’s terms before reusing their records: Wellington City Council (opens in a new tab), Australian Government (National Public Toilet Map via NSW Spatial Portal) (opens in a new tab), City of New York — NYC Parks / NYC Open Data (opens in a new tab), North Ayrshire Council (opens in a new tab), City of York Council (opens in a new tab), City of Austin (ArcGIS Hub) (opens in a new tab), Région de Bruxelles-Capitale / Brussels Hoofdstedelijk Gewest (opens in a new tab).
Other paths under /api serve our own pages and are not supported for outside use. The old /api/v1/toilets path has been retired and now answers 410 Gone. See also the terms.