Back

API

Every endpoint returns JSON. No key is required. Please keep polling reasonable — the authoritative observation is provided by a third party.

POST/api/dns-test/start

Mints a session token and returns the unique hostnames that must be resolved from the client you are testing.

  • —The lookups have to happen on the device under test. Resolving them server-side would measure the server, not the client.
{
  "ok": true,
  "sessionId": "k3m9xq2p7abz",
  "probeHostnames": ["1.k3m9xq2p7abz.bash.ws", "..."],
  "provider": "bashws",
  "providerLabel": "bash.ws authoritative DNS"
}
GET/api/dns-results/{sessionId}

Reads the authoritative nameserver query log for a session. Poll this after triggering the probe lookups.

  • —Returns pending: true until at least one resolver has been observed.
  • —Resolver rows are enriched with city where the geolocation registry has one.
{
  "ok": true,
  "pending": false,
  "resolvers": [
    {
      "ip": "76.76.2.11",
      "asn": "AS400805",
      "org": "Control D",
      "country": "United States",
      "countryCode": "us",
      "city": "Dallas",
      "hostname": null
    }
  ]
}
POST/api/scans

Saves a completed result and returns a share token.

  • —The submitted IP address is truncated before storage.
  • —Rows expire 30 days after creation.
{ "ok": true, "id": "k3m9xq2p7a", "expiresAt": "2026-10-18T12:00:00.000Z" }
GET/api/scans/{id}

Returns a saved result as JSON. This is the stable, documented read endpoint.

  • —payload.version is 1. Any breaking change to the shape will increment it.
  • —Expired or unknown ids return 404.
{
  "ok": true,
  "id": "k3m9xq2p7a",
  "version": 1,
  "connection": { "ipRedacted": "203.0.113.x", "isp": "...", "asn": "AS7922" },
  "verdict": { "headline": "...", "resolvers": [ ... ], "networkCount": 1 },
  "expectation": { "outcome": "pass", "summary": "..." },
  "behaviour": [ { "id": "nxdomain", "outcome": "pass" } ]
}

Running a full check

  1. 01POST /api/dns-test/start to get a session token and probe hostnames.
  2. 02Resolve every probe hostname from the device you are testing.
  3. 03Poll GET /api/dns-results/{sessionId} until pending is false or you time out.
  4. 04Optionally POST the result to /api/scans to get a shareable link.