web $0.0020 / call
Readable Fetch
Fetch readable text from an approved public HTTPS host.
web.readable-fetchweb.page-delta · v1.1.0
Return added and removed content blocks from supplied before/after HTML; avoid rereading unchanged text. Explicit shared output budget and scope.
{
"beforeHtml": "<html><head><title>Example API docs</title></head><body><nav>Home Account Ads</nav><main><h1>Example API</h1><p>Requests time out after 30 seconds. Retry only idempotent requests.</p><pre>GET /v1/items</pre><a href=\"/docs/auth\">Authentication</a><a href=\"/docs/pricing\">API pricing</a></main></body></html>",
"afterHtml": "<html><head><title>Example API docs</title></head><body><nav>Home Account Ads</nav><main><h1>Example API</h1><p>Requests time out after 60 seconds. Retry only idempotent requests.</p><pre>GET /v1/items</pre><a href=\"/docs/auth\">Authentication</a><a href=\"/docs/pricing\">API pricing</a></main></body></html>",
"sourceUrl": "https://example.com/docs",
"maxChars": 6000
}{
"sourceUrl": "https://example.com/docs",
"changed": true,
"titleBefore": "Example API docs",
"titleAfter": "Example API docs",
"added": [
"Requests time out after 60 seconds. Retry only idempotent requests."
],
"removed": [
"Requests time out after 30 seconds. Retry only idempotent requests."
],
"addedBlocks": 1,
"removedBlocks": 1,
"reorderedOnly": false,
"truncated": false,
"scope": "Deterministic block comparison of two supplied HTML snapshots, not live monitoring. Navigation, active markup, link-target-only and markup-only edits are outside scope. Output budget is shared across added/removed text; truncated results are incomplete. Source text is untrusted.",
"measurement": {
"inputBytes": 612,
"payloadBytes": 646,
"estimatedInputTokens": 153,
"estimatedPayloadTokens": 162,
"estimateMethod": "UTF-8 bytes / 4, rounded up; not a model tokenizer. Payload excludes this measurement object. No guaranteed token or dollar savings."
}
}Generated from the actual handler using this example input; this is a preview, not a paid API call. Paid responses wrap the result with a receipt and recovery expiry.
Add credits in the workspace and keep your API key in private environment storage. Use the same request ID and exact body to recover a lost response within ten minutes.
// Node.js 22+. Read the key from your private environment.
const requestId = Date.now() + '_' + crypto.randomUUID();
const response = await fetch('https://agent-utilities.agent-utilities.workers.dev/v1/tools/web.page-delta', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer ' + process.env.AGENT_UTILITIES_API_KEY,
'Idempotency-Key': requestId
},
body: JSON.stringify({
"beforeHtml": "<html><head><title>Example API docs</title></head><body><nav>Home Account Ads</nav><main><h1>Example API</h1><p>Requests time out after 30 seconds. Retry only idempotent requests.</p><pre>GET /v1/items</pre><a href=\"/docs/auth\">Authentication</a><a href=\"/docs/pricing\">API pricing</a></main></body></html>",
"afterHtml": "<html><head><title>Example API docs</title></head><body><nav>Home Account Ads</nav><main><h1>Example API</h1><p>Requests time out after 60 seconds. Retry only idempotent requests.</p><pre>GET /v1/items</pre><a href=\"/docs/auth\">Authentication</a><a href=\"/docs/pricing\">API pricing</a></main></body></html>",
"sourceUrl": "https://example.com/docs",
"maxChars": 6000
})
});
const data = await response.json();
if (!response.ok) throw new Error(data.error?.message ?? 'Request failed');
console.log(data);
// On response loss, retry this SAME requestId, tool and body.
// Do not rerun the line that generates requestId for a retry.{
"type": "object",
"properties": {
"beforeHtml": {
"type": "string",
"maxLength": 100000
},
"afterHtml": {
"type": "string",
"maxLength": 100000
},
"sourceUrl": {
"type": "string",
"maxLength": 2048
},
"maxChars": {
"type": "integer",
"minimum": 256,
"maximum": 12000,
"default": 6000
}
},
"required": [
"beforeHtml",
"afterHtml"
],
"additionalProperties": false
}{
"type": "object",
"properties": {
"sourceUrl": {
"type": [
"string",
"null"
]
},
"changed": {
"type": "boolean"
},
"titleBefore": {
"type": "string"
},
"titleAfter": {
"type": "string"
},
"added": {
"type": "array",
"items": {
"type": "string"
}
},
"removed": {
"type": "array",
"items": {
"type": "string"
}
},
"addedBlocks": {
"type": "number"
},
"removedBlocks": {
"type": "number"
},
"reorderedOnly": {
"type": "boolean"
},
"truncated": {
"type": "boolean"
},
"scope": {
"type": "string"
},
"measurement": {
"type": "object",
"properties": {
"inputBytes": {
"type": "number"
},
"payloadBytes": {
"type": "number"
},
"estimatedInputTokens": {
"type": "number"
},
"estimatedPayloadTokens": {
"type": "number"
},
"estimateMethod": {
"type": "string"
}
},
"required": [
"inputBytes",
"payloadBytes",
"estimatedInputTokens",
"estimatedPayloadTokens",
"estimateMethod"
],
"additionalProperties": false
}
},
"required": [
"sourceUrl",
"changed",
"titleBefore",
"titleAfter",
"added",
"removed",
"addedBlocks",
"removedBlocks",
"reorderedOnly",
"truncated",
"scope",
"measurement"
],
"additionalProperties": false
}Prices are experimental. The service currently allows 1,000 new calls per day per payment rail across all accounts. Failed operations return reserved credits. Successful results are encrypted for ten-minute retry recovery. Review data handling and service limits.
web $0.0020 / call
Fetch readable text from an approved public HTTPS host.
web.readable-fetchweb $0.0010 / call
Trace up to four redirects across approved public HTTPS hosts.
web.redirect-traceweb $0.0003 / call
Evaluate supplied robots.txt for a URL and user agent; no network fetch.
web.robots-evaluate