Site access: caller access rules against observed site facts

$0.005 USDC per call · Business, finance and compliance · POST /api/v1/site-access-check · Id site-access-check

Checks whether an intended action on a website (read, crawl, submit, log in, ...) satisfies the access rules the caller supplies (robots rule read, terms clause, login present, rate-limit budget, captcha seen) against facts the caller observed, and says which rule blocked it or which fact is missing. For an agent deciding whether to proceed or ask. It is a reading of the caller's rules, not legal permission, and it never fetches the site; an action no supplied rule covers is unknown.

What you get

Separates blocked from not-yet-verified before an agent touches a site.

Call it

Send the JSON body below to https://agents.writerslogic.com/api/v1/site-access-check. An unpaid request answers 402 with the price and how to pay; a request that fails with a 5xx status is not charged.

curl -i -X POST https://agents.writerslogic.com/api/v1/site-access-check \
  -H 'content-type: application/json' \
  -d '{"action":"crawl","rules":[{"id":"robots-allows-path","appliesTo":["crawl","read"],"needs":[{"key":"robots_allows_path","equals":true}]},{"id":"no-login-wall","appliesTo":["crawl","read"],"forbid":true,"needs":[{"key":"login_required"}]},{"id":"terms-allow-automation","appliesTo":["crawl"],"needs":[{"key":"terms_allow_automation","equals":true,"maxAgeDays":30}]}],"evidence":[{"key":"robots_allows_path","value":true},{"key":"login_required","value":false},{"key":"terms_allow_automation","value":true,"asOf":"2026-10-20"}],"asOf":"2026-11-04"}'

Input

FieldTypeRequiredDescription
actionstring; length 0..60yesThe intended action, matched against each rule's appliesTo.
rulesarray<object>; max 100 itemsyesAccess rules: needs that must hold, or with forbid:true, conditions that must not apply.
evidencearray<object>; max 500 itemsyesObserved site facts.
asOfstring; length 0..40noReference instant (ISO date or instant) for evidence age; required only when a need sets maxAgeDays. The check never reads the clock.

Example request body

{
  "action": "crawl",
  "rules": [
    {
      "id": "robots-allows-path",
      "appliesTo": [
        "crawl",
        "read"
      ],
      "needs": [
        {
          "key": "robots_allows_path",
          "equals": true
        }
      ]
    },
    {
      "id": "no-login-wall",
      "appliesTo": [
        "crawl",
        "read"
      ],
      "forbid": true,
      "needs": [
        {
          "key": "login_required"
        }
      ]
    },
    {
      "id": "terms-allow-automation",
      "appliesTo": [
        "crawl"
      ],
      "needs": [
        {
          "key": "terms_allow_automation",
          "equals": true,
          "maxAgeDays": 30
        }
      ]
    }
  ],
  "evidence": [
    {
      "key": "robots_allows_path",
      "value": true
    },
    {
      "key": "login_required",
      "value": false
    },
    {
      "key": "terms_allow_automation",
      "value": true,
      "asOf": "2026-10-20"
    }
  ],
  "asOf": "2026-11-04"
}

Result

The response is { "data": ..., "_provenance": ... }. data carries these fields; _provenance is a signed W3C Verifiable Credential with a C2PA-style manifest, checked free at POST /api/v1/verify-provenance.

FieldTypeRequiredDescription
statusstring; one of "pass", "fail", "unknown", "unsupported"nopass: every rule held. fail: a rule was violated (see witnesses). unknown: the input lacks the evidence to decide. unsupported: outside what this engine covers. Missing evidence is never a pass.
requirementsarray<object>no
countsobjectnoNon-optional requirements by state; optional ones are counted separately.
actionstringno
readingstring; one of "allowed-by-supplied-rules", "blocked-by-supplied-rules", "undetermined"no
blockedByarray<string>; max 100 itemsnoIds of rules that block the action.
undeterminedarray<string>; max 100 itemsnoIds of rules the evidence cannot decide.
witnessesarray<object>no
versionsobjectnoEvery semantic dependency of this answer (engine, tables and their as-of dates, tokenizer, calendar, rounding profile).
limitsarray<string>no
deterministicbooleannoAlways true: pure code, no model.

Pay and connect

Available through: x402 (USDC on Base), MCP. MCP clients reach it through the compliance-evidence-kit package.

Machine-readable