{"uid":"cap_q8_1n7hBUmDpUKrYjpbwD","slug":"fresh402-smart-diff-d88c11f7","name":"Fresh402 Smart Diff","description":"Fresh402 2.0.0: durable payment results, private recovery, public web extraction, structural comparison and backward-compatible freshness. On-demand requests; no browser rendering or LLM inference.","url":"https://fresh402.kirilllabs.workers.dev/v2/smart-diff?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"watch_id":{"type":"string","pattern":"^w_[a-f0-9]{32}$","description":"Required ID returned by free fresh402_register or POST /v1/register. Example IDs are illustrative; replace them with a returned watch ID before paying."},"compare_to":{"enum":["previous","baseline"],"type":"string","default":"previous"},"previous_hash":{"type":"string","pattern":"^[a-fA-F0-9]{64}$"}}},"responseSchema":{"type":"json","example":{"url":"https://example.com/","hash":"1111111111111111111111111111111111111111111111111111111111111111","counts":{"added":0,"removed":0,"modified":1},"changed":true,"changes":{"added":[],"removed":[],"modified":[{"path":"/price","after":20,"before":10}]},"watch_id":"w_0123456789abcdef0123456789abcdef","algorithm":"deterministic-v1","final_url":"https://example.com/","compare_to":"previous","content_kind":"json","significance":{"level":"medium","score":45,"reasons":["content_changed","numeric_or_price_change"],"rules_version":1},"previous_hash":"0000000000000000000000000000000000000000000000000000000000000000","changes_truncated":false,"comparison_source":"smart_snapshot","comparison_quality":"structural","semantic_model_used":false}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.015","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.015/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.015","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.015","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_aJ0O4MFvXxZZ9Mgq_VJem","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.015","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Performs a structural comparison of a watched URL's current content against a previous or baseline snapshot, returning a detailed diff with change significance scoring.","exampleAgentPrompt":"Check watch ID w_0123456789abcdef0123456789abcdef and show me what structurally changed compared to the previous snapshot — especially any price or numeric field changes.","exampleUseCases":[{"title":"Price change alert on product page","prompt":"For my watch ID w_0123456789abcdef0123456789abcdef, compare the current state to the previous snapshot and tell me if any prices or numeric values changed, and how significant the change is."},{"title":"Baseline regression check for API endpoint","prompt":"I want to diff watch w_abcdef0123456789abcdef0123456789 against its baseline snapshot to see if any JSON fields were added, removed, or modified since I set up the baseline."},{"title":"News page content drift monitoring","prompt":"Run a smart diff on watch w_fedcba9876543210fedcba9876543210 comparing to the previous version and give me a breakdown of what content sections were added or removed and the significance score."}],"resultDescription":"Returns a JSON object containing the current and previous content hashes, counts of added/removed/modified fields, a detailed changes object listing each modified path with before/after values, a significance assessment (level, score, and reasons), the content kind (e.g. JSON or HTML), the comparison quality, and whether any changes were truncated.","failureModes":["Invalid or malformed watch_id (not matching ^w_[a-f0-9]{32}$ pattern) returns a validation error","watch_id not found or not yet registered returns a 404-style error","previous_hash provided does not match any stored snapshot, leading to comparison failure","Payment not completed or x402 payment header missing results in 402 Payment Required","Target URL is unreachable at diff time, causing a fetch error","compare_to set to 'baseline' but no baseline was ever stored for the watch"],"whenToPreferThis":"Use this endpoint when you need a structured, field-level diff of a watched URL's content changes — especially when you care about significance scoring, which fields changed, and before/after values. Prefer it over simple hash-check endpoints when you want actionable change details rather than just a boolean freshness flag. Best suited for monitoring JSON APIs, pricing pages, or structured HTML where path-level comparison adds value.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-11T12:37:54.953Z","isFirstParty":false,"canonicalSlug":"fresh402-smart-diff-d88c11f7"}