fresh402_check
Use a persistent watch to decide whether a public document needs rereading. Returns changed/unchanged, hash, observation/cache status and optional compact text diff; it does not schedule monitoring. Supply exactly one url or real watch_id. URL plus content rules can create a watch; watch_id reuses saved rules, so omit rule overrides. Reuse returned watch_id/hash across sessions. A first URL observation without prior state reports changed:null. max_age_seconds>0 permits cached evidence at the same per-call price;0 revalidates the source, possibly with conditional304. Optional html_attributes on a new URL watch detects selected same-text attribute/link changes. Use Smart Diff for structured changes, or direct HTTP if you already maintain this state. Public HTTPS only; no JavaScript. Paid price $0.005 USDC on Base mainnet (eip155:8453). Requires an x402-capable MCP payment client and funded native-USDC payer; ordinary MCP returns a payment challenge. Native MPP is optional only when root mpp_payments.enabled: official mppx, org.paymentauth/credential and a private recovery token. Prepaid uses X-Fresh402-API-Key plus params._meta["fresh402/prepaid"] {idempotency_key,tariff_version,max_credits}; inspect the authenticated quote. Never mix billing methods or automatically pay. Persist original proof/input/recovery material before authorizing; recover originals after uncertainty. Optional Circle Gateway requires root circle_gateway.enabled and its GatewayWalletBatched client; preserve pending originals, never mix providers. Protocol details: https://fresh402.com/docs#payments. Optional free trial: inspect /v3/agent-trial (unfunded EOA ownership signature, no CAPTCHA); Web tools also support the separate human trial at /v2/trial. Eligibility and shared capacity apply;429 may precede quota exhaustion. Send only X-Fresh402-Trial-Key plus a persisted Idempotency-Key per logical REST/MCP call; reuse the same tool/input/key for retained recovery. Exhaustion never authorizes a charge.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Supply exactly one of url or watch_id. URL must be absolute public HTTPS on port 443, at most 4096 characters, with no credentials/private targets, e.g. 'https://example.com/docs'. Fresh402's own service URLs, including its discovery /openapi.json, cannot be targets; choose an external public document. With url, optional content rules identify the watch; an existing watch is reused or a new one is created by this paid Check. Separate registration is not required. No JavaScript rendering. | |
| selector | No | Optional HTML CSS scope, 1-256 characters, e.g. 'main'; accepted only with url. Omit for the page after built-in noise removal. No match returns 422; not supported for JSON/plain text. With watch_id, omit this field: the saved selector is reused. | |
| watch_id | No | Supply exactly one of watch_id or url. An existing ID returned by fresh402_register (free), POST /v1/register, or a URL-based Check: 'w_' followed by 32 lowercase hexadecimal characters. Reuses that watch's stored URL and rules. When supplied, omit selector, ignore_selectors and ignore_json_paths entirely, even empty arrays. Do not invent an ID. | |
| include_diff | No | Optional boolean; runtime default: true. Request a compact deterministic text diff when content changed and compatible prior text is retained. False omits the diff; true cannot recover unavailable old content and does not enable Smart Diff's structural analysis. | |
| previous_hash | No | Optional previous Fresh402 content hash: exactly 64 hexadecimal characters, case-insensitive. Overrides comparison with the watch's current stored hash. Omit to use that stored hash; a new URL watch without a prior hash returns changed:null. Hash comparison does not require retained old text, but a text diff does; a hash cannot reconstruct missing content. | |
| html_attributes | No | Optional HTML-only watch rule: up to4 of href,title,alt,aria-label; default[] retains existing text-only normalization. Distinct names are sorted; nonempty rules create a separate version1 watch/baseline. Records bounded meaningful attributes within the saved selector or filtered page, including same-text link destination changes. Cannot be supplied with watch_id, even[]. Unsafe hrefs are hashed, never fetched. Limits:200 elements,2048 characters/value,32768 evidence bytes; excess fails, never clips silently. | |
| max_age_seconds | No | Optional integer cache age in seconds, 0-86400; runtime default: 0. A positive value permits reuse of a sufficiently recent watch result without fetching. Zero contacts the source (conditional HTTP may return 304). Cached Checks still require payment; this does not schedule background polling. | |
| ignore_selectors | No | Optional HTML-only exclusion array, up to 20 supported CSS selectors of 1-256 characters each, e.g. ['.timestamp']. Accepted only with url; default []. With watch_id, omit the field entirely (including []): saved exclusions are reused. | |
| ignore_json_paths | No | Optional JSON-only exclusions, up to 20 paths of 1-256 characters starting with '/'; '~0'/'~1' escapes and '*' segments are supported. Example: ['/updated_at']. Accepted only with url; default []. With watch_id, omit entirely (including []): saved paths are reused. |