Page & Document Semantic Diff for AI Agents avatar

Page & Document Semantic Diff for AI Agents

Pricing

from $3.00 / 1,000 diff inlines

Go to Apify Store
Page & Document Semantic Diff for AI Agents

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

Chris Day

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

2 days ago

Last modified

Features

Limited permissionsSingle-tenantServer interface

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-diff to your MCP client; the tool is geeky_goth_gamer--page-doc-semantic-diff. Or use call-actor with "actor": "geeky_goth_gamer/page-doc-semantic-diff".
  • Standby HTTP: POST https://geeky-goth-gamer--page-doc-semantic-diff.apify.actor/diff (also POST /snapshot) with Authorization: Bearer YOUR_TOKEN and the input JSON. GET /health is a liveness check.
  • Python: ApifyClient(token).actor("geeky_goth_gamer/page-doc-semantic-diff").call(run_input=...), then read client.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_TOKEN with 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

FieldDefaultNotes
actiondiffdiff or snapshot. Standby routes set this for you.
modesemanticsemantic, 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 / afterFormatautohtml, 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).
ignoreVolatiletrueStrip ISO timestamps, relative times, UUIDs, hex nonces/hashes, cache-buster query params.
includeSnapshotstrueInclude normalised snapshot text (capped). Hashes and counts are always returned.
timeoutSeconds30Download time limit.
maxFileSizeMb5Download 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, optional text.
  • 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 — liveness
  • POST /diff — compare two sources
  • POST /snapshot — canonical baseline of one source
  • Any request carrying the x-apify-container-server-readiness-probe header is answered immediately with HTTP 200 and body ok

Standby URL: https://geeky-goth-gamer--page-doc-semantic-diff.apify.actor

Pricing

EventPriceWhen it is charged
diff-inline (primary)US$0.003One successful inline diff or snapshot.
diff-urlUS$0.006One successful URL-fetched document (a two-URL diff charges 2).
apify-actor-startUS$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 minor or moderate.
  • Very large tables may be summarised by excerpts; full normalised text is capped in the snapshot field.
  • ignorePatterns is a regex allow-list with safety limits, not a general-purpose rewrite engine.