{"uid":"cap_4Q2IaLoHWIK6vI-qzhpZO","slug":"readfetch-stateless-change-detection-diff-4be2d468","name":"ReadFetch Stateless Change Detection (Diff)","description":"Stateless change detection: send the hash you hold, get changed/unchanged and a bounded diff. A no-change answer is billable.","url":"https://readfetch.com/v1/diff?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Public http(s) page to re-fetch and compare; must match the extraction used when you saved the hash (same `format`)."},"format":{"enum":["text","markdown"],"type":"string","default":"text","description":"Extraction flavour for this fetch and for the hash (default text). Must match how you built `previous_content` if you send it."},"timeout_s":{"type":"number","default":30,"maximum":60,"minimum":1,"description":"Total budget for the whole call in seconds, both fetches included. 60 s is the ceiling on this route."},"previous_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"`sha256:…` or bare hex from readfetch_diff, readfetch_probe `content_sha256`, or a prior text read. Omit on the first poll to establish a baseline hash in the response."},"previous_content":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Full prior extracted text (what you stored from readfetch_text/readfetch_diff). Required for `added`/`removed`/`diff` output; hash-only compares do not emit a line diff."}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.003","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.003/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_xqNDmVX-8_5A-kK1TZlgz","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.003","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Detects whether a web page has changed since a previous fetch by comparing a stored hash, and returns a bounded text diff if it has.","exampleAgentPrompt":"Check if https://example.com/pricing has changed since my last visit — I have the hash sha256:abc123def456 from before — and if it has, show me what text was added or removed as a plain text diff.","exampleUseCases":[{"title":"Price page change alert","prompt":"Has https://competitor.com/pricing changed since yesterday? I have the hash sha256:9f8e7d6c5b4a from my last check — if anything changed, show me what's different in plain text."},{"title":"Terms of service update tracker","prompt":"Check if https://stripe.com/tos has been updated — my previous hash is sha256:1a2b3c4d5e6f — and give me a diff of any additions or removals so I can flag it for our legal team."},{"title":"News article update detection","prompt":"I scraped https://bbc.com/news/article-12345 earlier and have the hash sha256:deadbeef1234. Has the article been edited since then? If so, what changed? Use residential egress since the site blocks datacenters."}],"resultDescription":"Returns a changed/unchanged status flag, a new sha256 hash of the current page content, and (if changed) a bounded diff showing added and removed text segments. If previous_content was provided, the diff includes line-level additions and deletions. An unchanged response is still billable.","failureModes":["URL unreachable or returns non-200 status — endpoint may return an error or empty diff","Timeout exceeded (max 120s) if the target page is slow to respond","Residential egress unavailable or blocked by target — may fall back or error","Hash mismatch due to dynamic page content (ads, timestamps) causing false positives","Invalid sha256 hash format in previous_hash field causes validation error","Page content too large for bounded diff — diff may be truncated"],"whenToPreferThis":"Choose this endpoint when you need stateless change detection — you hold the hash from a previous call and want to know if a page changed without the service maintaining session state for you. Ideal for polling workflows where you store the hash on your side and periodically check for updates. Prefer over full-scrape endpoints when bandwidth and cost matter, since an unchanged response is cheap and a changed response gives you only the delta. Use the residential egress option for sites that block datacenter IPs.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-31T18:39:21.556Z","isFirstParty":false,"canonicalSlug":"readfetch-stateless-change-detection-diff-4be2d468"}