Get the difference between two snapshots
Generate a difference (comparison) between two historical snapshots of a web page change monitor (watch).
This endpoint compares content between two points in time and returns the differences in your chosen format. Perfect for reviewing what changed between specific versions or comparing recent changes.
Timestamp Keywords:
- Use
'latest'for the most recent snapshot (to_timestamp) - Use
'previous'for the second-most-recent snapshot (from_timestamp) - Or use specific Unix timestamps from the watch history
Format Options:
text(default): Plain text with (removed) and (added) prefixeshtml: HTML format with (removed) and (added) texthtmlcolor: Rich HTML with colored highlights (green for additions, red for deletions)
Word-Level Diffing:
- Enable word-level granularity with
word_diff=truefor detailed inline comparisons - Disable with
word_diff=falsefor line-level comparisons only (default false/off, line-level mode by default)
Raw Diff Output:
- Use
no_markup=trueto get raw diff content without any formatting applied - Returns content with placeholders for opening/closing tags of changes
- Allows you to implement your own custom colorisation or formatting
- Skips all HTML color application and service tweaks (added text, html color tags, etc)
Authorizations
API key for authentication. You can find your API key in the Site Spy dashboard under Settings → API.
Path Parameters
Web page change monitor (watch) unique ID
Starting snapshot timestamp, 'previous' for second-most-recent, or specific Unix timestamp Unix timestamp of the starting snapshot
Ending snapshot timestamp, 'latest' for most recent, or specific Unix timestamp Unix timestamp of the ending snapshot
Query Parameters
Output format for the diff:
text(default): Plain text with (removed) and (added) prefixeshtml: Basic HTML formathtmlcolor: Rich HTML with colored backgrounds (red for deletions, green for additions)markdown: Markdown format with HTML rendering
text, html, htmlcolor, markdown Enable word-level diffing for more granular comparisons. When enabled, changes are highlighted at the word level rather than line level. Default is false (line-level mode). Accepts: true, false, 1, 0, yes, no, on, off
true, false, 1, 0, yes, no, on, off When set to true, returns the raw diff content without any markup formatting. The content will include placeholders for opening/closing tags of the changes, allowing you to implement your own custom colorisation or formatting. This skips all HTML color application and service tweaks. Accepts: true, false, 1, 0, yes, no, on, off
true, false, 1, 0, yes, no, on, off Diff granularity type:
diffLines(default): Line-level comparison, showing which lines changeddiffWords: Word-level comparison, showing which words changed within lines
This parameter is an alternative to word_diff for better alignment with the UI.
If both are specified, type=diffWords will enable word-level diffing.
diffLines, diffWords When enabled, only show lines/content that changed (no surrounding context). When disabled, include unchanged lines for context around changes. Accepts: true, false, 1, 0, yes, no, on, off
true, false, 1, 0, yes, no, on, off When enabled, ignore whitespace-only changes (spaces, tabs, newlines). Useful for focusing on content changes and ignoring formatting differences. Accepts: true, false, 1, 0, yes, no, on, off
true, false, 1, 0, yes, no, on, off Include removed/deleted content in the diff output. When disabled, content that was deleted will not appear in the diff. Accepts: true, false, 1, 0, yes, no, on, off
true, false, 1, 0, yes, no, on, off Include added/new content in the diff output. When disabled, content that was added will not appear in the diff. Accepts: true, false, 1, 0, yes, no, on, off
true, false, 1, 0, yes, no, on, off Include replaced/modified content in the diff output. When disabled, content that was modified (changed from one value to another) will not appear in the diff. Accepts: true, false, 1, 0, yes, no, on, off
true, false, 1, 0, yes, no, on, off Response
Formatted diff between the two snapshots
Plain text diff with change markers

