{"uid":"cap_19jEHg2OpfxP9X-8qnthA","slug":"writerslogic-dom-recipe-match-e014cdb7","name":"WritersLogic DOM Recipe Match","description":"Pay-per-call agents settled in USDC on Base via x402. Every response carries a signed provenance envelope.","url":"https://agents.writerslogic.com/api/v1/dom-recipe-match?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"html":{"type":"string","maxLength":100000,"minLength":1,"description":"Current page HTML."},"saved":{"type":"array","items":{"type":"object","properties":{"tag":{"type":"string"},"href":{"type":"string"},"name":{"type":"string","description":"Best-effort accessible name (aria-label, aria-labelledby, label, text, placeholder, title, alt, value), at most 80 characters."},"role":{"type":"string"},"type":{"type":"string"},"repeats":{"type":"integer","description":"Elements with the same tag, type, role, name and href collapsed into this one (the first)."},"disabled":{"type":"boolean"},"required":{"type":"boolean"},"selector":{"type":"string","description":"CSS selector that matches exactly this element in the supplied HTML."},"nameSource":{"type":"string"},"selectorKind":{"enum":["id","data-testid","name","aria-label","path"],"type":"string"}},"additionalProperties":false},"maxItems":300,"minItems":1,"description":"elements from an earlier dom-skeleton response."},"recipe":{"type":"object","required":["steps"],"properties":{"steps":{"type":"array","items":{"type":"object","required":["selector"],"properties":{"action":{"type":"string","maxLength":100,"description":"Free-form label, echoed back."},"selector":{"type":"string","maxLength":500,"minLength":1,"description":"A selector from the saved skeleton."}},"additionalProperties":false},"maxItems":100,"minItems":1}},"additionalProperties":false}}},"responseSchema":{"type":"json"},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_AzcGHMMpnJzgv9-dT4Q06","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Compares a saved DOM skeleton and an automation recipe (CSS-selector steps) against current page HTML to report whether each step's target element is matched, changed, moved, ambiguous, or missing.","exampleAgentPrompt":"Check whether my automation recipe's selectors still work on the current checkout page — here's the saved skeleton from last week and here's the latest page HTML; tell me which steps are matched, changed, moved, or missing.","exampleUseCases":[{"title":"Automation recipe health check after redesign","prompt":"The site just updated its design — can you check my saved login automation recipe against the new page HTML and tell me which steps are still matched, which selectors have moved, and which are completely missing?"},{"title":"Detecting broken form selectors before a scrape run","prompt":"Before I run my form-filling script, compare these saved skeleton elements and recipe steps against the current HTML of the signup page and flag any selectors that are changed or no longer found."},{"title":"Monitoring recipe validity over time","prompt":"I re-fetched the product listing page HTML — can you compare it against my saved DOM skeleton and recipe to see if any step targets have shifted to new selectors or disappeared entirely?"}],"resultDescription":"A per-step report classifying each recipe step as: matched (selector, tag, type, role, and name all the same), changed (selector exists but element attributes differ), moved (same element now has a different selector, with newSelector provided), ambiguous (multiple current elements look identical), missing (selector not found in current HTML), or unknown (selector was not in the saved skeleton). No scripts are executed and no judgment is made about whether the action still makes sense.","failureModes":["Selector not present in saved skeleton → step classified as unknown","HTML too large (>100000 chars) → rejected with validation error","saved array empty or >300 items → rejected","recipe steps array empty or >100 items → rejected","Ambiguous match when multiple elements share identical tag/type/role/name → ambiguous status returned","Step selector missing or empty string → validation error"],"whenToPreferThis":"Use this endpoint when you need to audit an existing DOM-based automation recipe against updated page HTML without executing it — especially after a site redesign or periodic monitoring. It is specifically designed to compare a previously captured DOM skeleton with current HTML and classify each selector's status, making it ideal for pre-flight checks before running browser automation. Prefer it over generic HTML diffing tools when you need actionable per-step selector status rather than raw HTML diffs.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-19T12:37:07.733Z","isFirstParty":false,"canonicalSlug":"writerslogic-dom-recipe-match-e014cdb7"}