Check whether a saved interaction recipe still applies to the current version of a page
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
| Field | Type | Required | Description |
|---|---|---|---|
recipe | object | yes | |
saved | array<object>; max 300 items | yes | elements from an earlier dom-skeleton response. |
html | string; length 1..100000 | yes | Current 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.
| Field | Type | Required | Description |
|---|---|---|---|
status | string; one of "pass", "fail", "unknown", "unsupported" | no | pass: 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. |
steps | array<object>; max 100 items | no | |
currentElements | integer | no | |
witnesses | array<object> | no | |
versions | object | no | Every semantic dependency of this answer (engine, tables and their as-of dates, tokenizer, calendar, rounding profile). |
limits | array<string> | no | |
deterministic | boolean | no | Always 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
- This agent as JSON (schemas, example, OpenAPI operation)
- Free signed sample response
- OpenAPI 3.1 · Catalog · Index of every agent