Page & Document Semantic Diff for AI Agents
Pricing
from $3.00 / 1,000 diff inlines
Page & Document Semantic Diff for AI Agents
Compare two versions of a page or document and report only meaningful changes. Ignores timestamps, nonces, cookie banners, nav/footer boilerplate and whitespace. Elevates price, SLA, negation and watched-keyword changes. $0.003 inline or $0.006 per URL.
Pricing
from $3.00 / 1,000 diff inlines
Rating
0.0
(0)
Developer
Chris Day
Maintained by CommunityActor stats
0
Bookmarked
1
Total users
0
Monthly active users
2 days ago
Last modified
Categories
Features
Share
Give this Actor two versions of a page or document — inline, from public URLs, or mixed (a cached snapshot plus a live URL) — and it reports only meaningful changes. Timestamps, nonces, CSRF tokens, UUIDs, cookie banners, nav/footer boilerplate, CSS class hashes and whitespace are stripped first, so a pricing or policy page that merely “refreshed” does not wake the agent.
It does not call a language model. Normalisation and diffs are deterministic.
When an AI agent should use this
Use geeky_goth_gamer/page-doc-semantic-diff when:
- You monitor a pricing page, changelog, policy, contract or competitor site and need to know if anything meaningful changed.
- You store a canonical snapshot (SHA-256) and want to check a live URL against it.
- You must treat a price, SLA, numeric limit, or a negation (
not/no/never/unless) as a major change. - You have JSON/API documents and want exact path-level additions, removals and numeric deltas.
Don't use it for:
- Pixel/layout diffs or screenshots (it compares normalised text and structure, not visual design).
- Private, intranet or metadata URLs (they are rejected).
- Interpreting why a change happened; it reports what changed.
Example input:
{"action": "diff","mode": "semantic","beforeText": "<!doctype html><html><body><nav>Home</nav><main><h1>Pricing</h1><p>Pro is $29/month.</p><p>Updated 2026-11-01T00:00:00Z</p></main><div class=\"cookie-banner\">Accept cookies</div></body></html>","afterText": "<!doctype html><html><body><nav>Home | Blog</nav><main><h1>Pricing</h1><p>Pro is $39/month.</p><p>Updated 2026-11-24T12:00:00Z</p></main><div class=\"cookie-consent\">Accept all</div></body></html>"}
Output: One dataset item with changed, changeScore (0–1), significance (none | minor | moderate | major), a short summary, heading-aware sectionsAdded / sectionsRemoved / sectionsModified (with clause diffs and numericDeltas such as $29 -> $39 (+34.48%)), optional structuredChanges, keywordHits, volatileNoiseIgnored, snapshots (sha256, counts, optional text) and a tokenSavingsHint. changed is false when only volatile noise or boilerplate differed.
Cost: $0.003 per inline diff or snapshot; $0.006 per public URL fetched (a two-URL diff charges twice). Invalid input is not billed. Apify also charges the standard $0.00005 Actor-start fee on ordinary runs.
Call it from an agent:
- Apify MCP server: add
https://mcp.apify.com/?tools=geeky_goth_gamer/page-doc-semantic-diffto your MCP client; the tool isgeeky_goth_gamer--page-doc-semantic-diff. Or usecall-actorwith"actor": "geeky_goth_gamer/page-doc-semantic-diff". - Standby HTTP:
POST https://geeky-goth-gamer--page-doc-semantic-diff.apify.actor/diff(alsoPOST /snapshot) withAuthorization: Bearer YOUR_TOKENand the input JSON.GET /healthis a liveness check. - Python:
ApifyClient(token).actor("geeky_goth_gamer/page-doc-semantic-diff").call(run_input=...), then readclient.dataset(run["defaultDatasetId"]).list_items().items. - HTTP run:
POST https://api.apify.com/v2/acts/geeky_goth_gamer~page-doc-semantic-diff/run-sync-get-dataset-items?token=YOUR_TOKENwith the input JSON as the body.
Why this exists
Raw HTML diffs explode on timestamps, cache-busters, cookie banners and chrome, so agents either wake up on every crawl or miss a real price change in the noise. This Actor loads both sides (SSRF-safe), strips boilerplate, normalises volatile tokens, then compares heading-aware sections (or JSON paths, or a strict whitespace-normalised diff) and elevates significance when prices, limits, negations or watched keywords change.
Input
| Field | Default | Notes |
|---|---|---|
action | diff | diff or snapshot. Standby routes set this for you. |
mode | semantic | semantic, structured (JSON) or strict. JSON inputs in semantic mode use a structured path diff automatically. |
beforeText / afterText | (one side) | Inline documents. Do not also pass the matching URL. Max 1,000,000 characters. |
beforeUrl / afterUrl | (one side) | Public http(s) URLs. Mixed beforeText + afterUrl is supported. |
url / text | (snapshot) | Single source for action: snapshot. |
beforeFormat / afterFormat | auto | html, markdown, text, json. |
watchKeywords | (empty) | Phrases that elevate significance to major when they appear in changed content. |
ignorePatterns | (empty) | Custom regexes, length/count capped, nested quantifiers rejected (ReDoS). |
ignoreVolatile | true | Strip ISO timestamps, relative times, UUIDs, hex nonces/hashes, cache-buster query params. |
includeSnapshots | true | Include normalised snapshot text (capped). Hashes and counts are always returned. |
timeoutSeconds | 30 | Download time limit. |
maxFileSizeMb | 5 | Download size cap (max 20). |
Output
The default dataset holds one envelope (status, action, mode, changed, changeScore, significance, summary, billed).
- sectionsAdded / sectionsRemoved / sectionsModified —
heading,path, compact excerpts,clauseDiffs,numericDeltas. - structuredChanges —
path,changeType,before,after,numericDelta(JSON / structured mode). - keywordHits — watched keywords found in changed content.
- volatileNoiseIgnored — counts by category (
timestamps,uuids,hexTokens,relativeTimes,boilerplateBlocks,customPatterns,cacheParams). - beforeSnapshot / afterSnapshot —
sha256,format,charCount,wordCount, optionaltext. - tokenSavingsHint — estimated tokens saved versus sending both raw inputs to a language model.
significance is none when changed is false; it is forced to major when a price/currency value, numeric limit/SLA, negation, or watched keyword changes.
Standby / Server mode
When started through Apify's server interface (APIFY_META_ORIGIN=STANDBY), the Actor listens on APIFY_CONTAINER_PORT / ACTOR_WEB_SERVER_PORT (default 8080) and handles:
GET /health— livenessPOST /diff— compare two sourcesPOST /snapshot— canonical baseline of one source- Any request carrying the
x-apify-container-server-readiness-probeheader is answered immediately with HTTP 200 and bodyok
Standby URL: https://geeky-goth-gamer--page-doc-semantic-diff.apify.actor
Pricing
| Event | Price | When it is charged |
|---|---|---|
diff-inline (primary) | US$0.003 | One successful inline diff or snapshot. |
diff-url | US$0.006 | One successful URL-fetched document (a two-URL diff charges 2). |
apify-actor-start | US$0.00005 (Apify default) | Once when a standard run starts. |
Failed input (the Actor refused the request) is not billed. Failed fetches are not billed. Your maximum cost per run is respected.
Safety
URL fetches are SSRF-safe: only http/https on standard ports, every redirect hop is re-validated, and private, loopback, link-local, CGNAT and cloud-metadata addresses are blocked. Downloads and inline payloads are size- and time-capped. Custom ignorePatterns are length-capped and rejected when they look like nested-quantifier ReDoS bombs.
Limitations
- Visual/CSS-only changes that do not affect extracted text are invisible to this Actor.
- A soft-worded policy change that never touches a number, negation or watched keyword may be classified
minorormoderate. - Very large tables may be summarised by excerpts; full normalised text is capped in the snapshot field.
ignorePatternsis a regex allow-list with safety limits, not a general-purpose rewrite engine.