readfetch_diff
Stateless change detection on readable page text (same HTTP-first extraction as readfetch_text): fetch the URL, compare to a hash or prior body you store client-side, return changed/unchanged plus optional line diff. First call with no prior fields returns a baseline hash (see hint). previous_hash alone detects change without a line diff; add previous_content when you need added/removed/diff. A no-change answer is still billable when text was delivered. Prefer readfetch_text when you need the full article once; readfetch_probe (free) for a short preview and content_sha256 before spending on text.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Public http(s) page to re-fetch and compare; must match the extraction used when you saved the hash (same `format`). | |
| format | No | Extraction flavour for this fetch and for the hash (default text). Must match how you built `previous_content` if you send it. | text |
| timeout_s | No | Total budget for the whole call in seconds, both fetches included. 60 s is the ceiling on this route. | |
| previous_hash | No | `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 | No | 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. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | ||
| diff | No | ||
| hash | No | ||
| hint | No | ||
| added | No | ||
| billed | No | ||
| status | No | ||
| changed | No | ||
| removed | No | ||
| status_code | No |