The directory, ready to use.

A public, read-only JSON API for the same records used by WC Finder. No account, API key or installation required.

Download the manifest for the current record count, snapshot and file sizes.

Endpoints

All paths below are relative to /wc-finder/api/v1/.

GET index.json
Current snapshot identifier, record count, source update metadata, page links, download sizes and SHA-256 checksums.
GET toilets.json
Every bundled record in a toilets array, plus original directory metadata, apiVersion and snapshot. This is a large download.
GET toilets.json.gz
The same JSON as a gzip file. Download and decompress explicitly; this endpoint does not return parsed JSON.
GET snapshots/{snapshot}/pages/{page}.json
Up to 1,000 records per page. Start with the manifest's links.firstPage and follow next until it is null. Resolve each relative link against the URL of the document containing it.

Read pages in JavaScript

const base = 'https://saschb2b.github.io/wc-finder/api/v1/';
async function json(url) {
  const response = await fetch(url);
  if (!response.ok) throw new Error(`HTTP ${response.status}`);
  return response.json();
}
const manifestURL = new URL('index.json', base);
const manifest = await json(manifestURL);
let url = new URL(manifest.links.firstPage, manifestURL);
while (url) {
  const page = await json(url);
  if (page.snapshot !== manifest.snapshot) throw new Error('Snapshot changed');
  // Use page.toilets here; filter by coordinates, tags or equipment locally.
  console.log(page.toilets);
  url = page.next ? new URL(page.next, url) : null;
}

Download everything

curl --fail --location \
  https://saschb2b.github.io/wc-finder/api/v1/toilets.json.gz \
  --output toilets.json.gz
gzip --decompress toilets.json.gz

Data and updates

Hosting and reuse

The API consists of static HTTPS resources on GitHub Pages. GET and HEAD work without authentication; browser fetches from other origins are allowed. There are no write operations or server-side queries. Parameters such as ?bbox=, ?limit= or ?page= are ignored. Missing resources return GitHub's HTML 404 page.

Cache downloads and use pages or the gzip export for larger imports. Hosting limits and HTTP cache headers are controlled by GitHub Pages; this API has no availability guarantee or per-client rate-limit controls.

Source-specific data terms apply. Preserve sources, care.sourceUrls and available attribution. The project's MIT licence covers app code and does not replace the original data terms; older records may lack per-record licence metadata. See the source and licence guide.

Found incorrect data? Report it on GitHub.