← Back to Bytemine
POST/crawl/diff
Detect Page Changes
Compare a page's current content against a saved snapshot. Returns added/removed lines and change summary. 1 credit.
Bytemine·$0.03 per call
Example code
// Using @orth/sdk - The simplest way to call APIs
// Install: npm install @orth/sdk
import Orthogonal from "@orth/sdk";
const orthogonal = new Orthogonal({
apiKey: process.env.ORTHOGONAL_API_KEY,
});
const output = await orthogonal.run({
api: "bytemine",
path: "/crawl/diff",
body: {
"url": "example"
}
});
console.log(output);Body parameters
urlrequired
string
URL to compare against its previous snapshot
Response
url
string
changed
boolean
changes.added.0
string
changes.removed.0
string
success
boolean
summary.new_length
number
summary.old_length
number
summary.lines_added
number
summary.lines_removed
number
current_hash
string
snapshot_date
string
snapshot_hash
string