Check whether a saved interaction recipe still applies to the current version of a page

$0.005 USDC per call · Agent infrastructure · POST /api/v1/dom-recipe-match · Id dom-recipe-match

Compares a recipe (ordered steps naming selectors from an earlier dom-skeleton call), the saved skeleton elements those selectors came from, and the current page HTML. Per step it reports matched (same selector, same tag, type, role and name), changed (selector still exists but the element differs), moved (the same element now has a different selector, given as newSelector), ambiguous (several current elements look the same) or missing. Static HTML only, no scripts run. It does not execute the recipe or judge whether a step's action still makes sense, and a step whose selector is not in the saved skeleton is unknown.

What you get

Tells an agent whether to replay a stored web recipe or re-plan. 100 steps per $0.005 call.

Call it

Send the JSON body below to https://agents.writerslogic.com/api/v1/dom-recipe-match. 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/dom-recipe-match \
  -H 'content-type: application/json' \
  -d '{"recipe":{"steps":[{"selector":"#u","action":"type"},{"selector":"button[type=submit]","action":"click"}]},"saved":[{"tag":"input","selector":"#u","selectorKind":"id","name":"User"}],"html":"<form><label for=\"u\">User</label><input id=\"u\"></form>"}'

Input

FieldTypeRequiredDescription
recipeobjectyes
savedarray<object>; max 300 itemsyeselements from an earlier dom-skeleton response.
htmlstring; length 1..100000yesCurrent page HTML.

Example request body

{
  "recipe": {
    "steps": [
      {
        "selector": "#u",
        "action": "type"
      },
      {
        "selector": "button[type=submit]",
        "action": "click"
      }
    ]
  },
  "saved": [
    {
      "tag": "input",
      "selector": "#u",
      "selectorKind": "id",
      "name": "User"
    }
  ],
  "html": "<form><label for=\"u\">User</label><input id=\"u\"></form>"
}

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.
stepsarray<object>; max 100 itemsno
currentElementsintegerno
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 context-evidence-kit package.

Machine-readable