Prove what a web page said, and when
Prove what a web page said in four steps: fetch the page as Markdown, hash the exact text with SHA-256, send the hash to attest for an Ed25519-signed timestamp, and keep the text and the signed statement together in memory. Anyone can later re-hash the text and check the signature offline. It costs about $0.02 per page.
What this proves: the text existed no later than the signed time. It doesn't, on its own, prove which URL the text came from. Both points are explained below.
When an agent needs this
Agents act on what they read. A procurement agent orders from the supplier whose page listed the lowest price. A compliance agent approves a vendor because its policy page said the right things. A research agent cites a statistic. Weeks later someone asks: what did the page actually say when the agent read it? By then the page may have changed, and the agent's own log is just its word.
A signed timestamp from a third party turns "the agent says it read this" into something a reviewer can check. The agent can't change the text afterwards without breaking the hash, and it can't move the time without breaking the signature.
Step 1: fetch a fresh copy as JSON
const page = await (await payFetch("https://agentic402.dev/v1/fetch", {
method: "POST", headers: { "Content-Type": "application/json" },
body: JSON.stringify({ url, format: "json", max_age: 0 }),
})).json(); // $0.005
// page.url, page.title, page.fetched_at, page.word_count, page.markdown
Use max_age: 0. Without it, fetch may return a shared cached copy up to a day old, and you want the page as it is now. The JSON format gives you fetched_at, the time fetch produced this copy, alongside the text.
Step 2: hash exactly the bytes you will keep
import { createHash } from "node:crypto";
const record = JSON.stringify({ url: page.url, fetched_at: page.fetched_at, markdown: page.markdown });
const sha256 = createHash("sha256").update(record, "utf8").digest("hex");
This is where most proofs go wrong. Decide which bytes you are proving, write them down once, and keep those exact bytes. The code above hashes a small JSON record containing the URL, the fetch time and the Markdown, so the proof covers all three. Store the record string itself, not the object: re-serialising the object later could change spacing or key order and give a different hash.
Don't hash the whole fetch response. It's the same information, but you'd have to keep the response byte for byte, and it's easy to lose that by parsing it.
Step 3: get a signed timestamp
const proof = await (await payFetch("https://agentic402.dev/v1/attest", {
method: "POST", headers: { "Content-Type": "application/json" },
body: JSON.stringify({ sha256 }),
})).json(); // $0.005
// proof.statement.issued_at, proof.statement_json, proof.signature
Bad input, such as a hash that isn't 64 hex characters, is rejected before payment. The statement comes back at once. Its issued_at is our clock at the moment of signing, and statement_json is the exact string that was signed. Only the hash is sent to attest; the page text stays with you.
Step 4: keep everything together
const key = `proofs/${proof.statement.id}`;
await payFetch(`https://agentic402.dev/v1/memory/${key}`, {
method: "PUT", headers: { Authorization: `Bearer ${TOKEN}`, "Content-Type": "application/json" },
body: JSON.stringify({ record, statement_json: proof.statement_json, signature: proof.signature }),
}); // $0.005
One write holds the record and its proof, so the two can never be separated by accident. Add our public key once, under a key such as proofs/public-key, from GET /v1/attest/key, so the bundle can be checked without contacting us. If you also want the page text in your general reading cache, the recipe for keeping fetched pages stores it under its URL hash, for one more write.
Total for one page: fetch $0.005, attest $0.005 and one memory write $0.005, so $0.015. With a separate cache copy, or the one-off public key write, about $0.02.
Choosing what goes in the record
The record is whatever you decide to prove, so think about the question someone will ask later. Hashing the Markdown alone proves the text existed, but says nothing about where it was supposed to come from. Adding the URL and fetched_at, as in step 2, ties the text to a claimed source and time in one signed package. Adding the page title helps a person recognise the record at a glance.
You can add your own fields too: the task the agent was doing, the question it was answering, a note on which section mattered. Anything inside the record is covered by the same statement. Keep the record small and boring, though. Fields that change every time, such as a random request ID, are fine to include, but a field that someone might later want removed, such as personal data, can't be removed without breaking the hash.
Making the link to the URL stronger
Because fetch's output isn't signed, the URL in the record is the agent's claim. Three habits make that claim easier to believe. First, stamp straight after fetching, in the same run, so fetched_at and issued_at are seconds apart. Second, keep the agent's own logs of the fetch call, including the payment receipt; the matching USDC transfer on Base carries its own block time. Third, for records that really matter, have a second, independent party fetch and stamp the same URL at about the same time: two parties with separate wallets producing matching text is far harder to fake than one.
For the strongest provenance, use a capture service that signs the URL and the response itself, as in the comparison below, and use this recipe for what it does best: proving when your agent had the text it acted on.
How a reviewer checks it
The reviewer gets the stored bundle and our public key. They don't need an account, a wallet or our servers.
import { createHash, createPublicKey, verify } from "node:crypto";
const key = createPublicKey({ key: jwk, format: "jwk" }); // from GET /v1/attest/key
const signed = verify(null, Buffer.from(b.statement_json), key, Buffer.from(b.signature, "base64url"));
const stmt = JSON.parse(b.statement_json);
const matches = stmt.sha256 === createHash("sha256").update(b.record, "utf8").digest("hex");
const { url, fetched_at, markdown } = JSON.parse(b.record);
// signed && matches: this url/fetched_at/markdown record existed by stmt.issued_at
Both checks have to pass. The signature check proves agentic402 signed the statement; the hash check proves the statement is about this record. A reviewer who prefers not to run code can use the free POST /v1/attest/verify endpoint for the signature and any SHA-256 tool for the hash.
What the proof covers, honestly
The signature proves one thing strongly: the record, with its URL, its fetch time and its text, existed no later than issued_at. Nobody, including the agent, can have written it afterwards.
It proves less about where the text came from. attest signs a hash; it never sees the page. The URL and fetched_at inside the record were written by fetch, but fetch's output isn't itself signed, so a dishonest agent could hash a record it made up and get a valid statement for it. The proof is strongest when the gap is small, which is why the steps above run back to back: fetch at 10:00:01, statement at 10:00:02 leaves little room for invention, and the record's own fetched_at can be compared with issued_at.
It also shows the page through our conversion. The Markdown is fetch's cleaned version of the page, not the original HTML, so it can't prove anything about scripts, images or layout that the cleanup removed. And it rests on trusting agentic402's key and clock; the attest page spells out what that means and what doesn't exist yet, such as a public log of all statements.
Other ways to prove what a page said
Archives and evidence services do related jobs, with different strengths:
| Method | What it gives you | Limits noted by the source |
|---|---|---|
| Arcaeon Verified Snapshot (Apify) | "Capture exactly what a page says now, with a cryptographic timestamped proof it wasn't altered" | "$5.00 / 1,000 results". An "Ed25519 signature binding the URL, the capture time, the HTTP status, the final URL after redirects, and a SHA-256 of the raw content bytes" (its v2 records, from 4 September 2026; earlier records don't sign the status or final URL) |
| This recipe | Your exact text plus an Ed25519-signed time, checkable offline. You choose what to hash | The source URL is asserted by the record, not signed by a capture service |
If provenance is the main question (did this text come from that URL?) a service that captures and signs the page itself, including the address and the response, gives a stronger answer than hashing a copy you made. If the question is when your agent had this text, and you want the proof in the same flow that already fetched it, this recipe is the cheaper fit. For legal disputes, ask a lawyer what your court accepts, and consider keeping more than one kind of evidence for the same page.
An example: the price on the day of the order
A purchasing agent compares three suppliers' price pages on 3 December and orders from the cheapest, whose page lists a part at $41. It runs this recipe on each page before deciding, and puts the three record hashes and its choice into a final record, which it also stamps. Four statements, three fetches and a handful of memory writes come to well under ten cents.
In January the supplier invoices at $46 and says the page always said $46. The buyer exports the bundle: the record for the supplier's page, its statement, the decision record and its statement, and our public key. Anyone can check that the record saying $41 existed by 3 December, and that the order decision citing it was fixed the same day. The supplier can still argue the page was misread or the conversion lost something, and the Markdown is there for both sides to read. What nobody can argue is that the buyer wrote it later.
Keeping proofs for longer than 30 days
memory deletes a space 30 days after its last write. That's fine for working copies, but a proof is often needed months later. For anything you may need beyond a month, export the bundle (record, statement_json, signature and public key) to storage you control as well: a file in your repository, an object store, an email to yourself. The bundle is small and plain JSON, and it verifies anywhere, without agentic402 being online.
If you'd rather keep proofs in memory, write to the space at least once a month, for example by adding new proofs or rewriting a small heartbeat key. Reads don't extend a space's life.
Proving a decision, not just a page
The same steps prove what an agent decided as well as what it read. After the agent reads the pages and makes its choice, add the decision to the record before hashing: the URLs read, each one's hash, and the decision with its reasons. One statement then covers the inputs and the output together, and shows the decision was fixed by issued_at, before anyone knew how it would turn out.
For a run that reads many pages, stamp a manifest instead of each page: a list of every page's record hash, one per line. One $0.005 statement then covers the whole set, and any single page can still be checked against the manifest.
Five ways to end up with a proof that doesn't check out
Proving a stale copy. Leaving out max_age: 0 can give you fetch's shared copy from earlier in the day, and the record then describes that copy, not the page at the moment you acted.
Hashing a re-built record. Building the record, hashing it, then building it again from the object to store it. The second build may differ by a space. Hash and store the same string.
Splitting the bundle. Keeping the Markdown in one place and the statement in another invites the two to drift apart. One memory value, or one file, per proof.
Losing the key. Without our public key saved alongside, the proof depends on our key endpoint still answering, and on the key not having changed.
Letting it expire. A memory space nobody writes to is gone after 30 days. Export proofs you'll need later.
Questions about proving page contents
- Can I prove what a page said in the past, before I fetched it?
- No. A statement can only be made about text you have now. For past versions, use a public archive.
- Why hash the Markdown and not the HTML?
- fetch returns Markdown, so that is the text you have. The Markdown is also what your agent read and acted on, which is usually what you need to prove.
- Is a signed timestamp legally binding?
- We can't tell you that. It depends on the court and the case. What the statement gives you is a checkable signature from an independent service. Ask a lawyer how much weight that carries where you are.
- What if the site blocks fetch in robots.txt?
- fetch refuses the URL with
403and you aren't charged. You'd need a copy obtained some other way; attest will stamp the hash of any bytes you have.
Cite this page: agentic402, "Prove what a web page said, and when", https://agentic402.dev/recipes/prove-what-a-page-said/, published 3 December 2026. Third-party descriptions are quoted from Apify pages as read that day.