Hi,
You can't use https://www.openstreetmap.org for this purpose.
But you can do it with Overpass API, for example through [OverPass Turbo website](http://overpass-turbo.eu/)
Here is the request for your need: [http://overpass-turbo.eu/s/Q9I](http://overpass-turbo.eu/s/Q9I). It has been generated throug the [OverPass Turbo Wizard](https://wiki.openstreetmap.org/wiki/Overpass_turbo/Wizard), using the expression `amenity=toilets in "New York"`. It builds automatically a request using Overpass QL language like this:
```
[out:json][timeout:25];
// fetch area “New York” to search in
{{geocodeArea:New York}}->.searchArea;
// gather results
(
// query part for: “amenity=toilets”
node["amenity"="toilets"](area.searchArea);
way["amenity"="toilets"](area.searchArea);
relation["amenity"="toilets"](area.searchArea);
);
// print results
out body;
>;
out skel qt;
```York"`.