Compare against a snapshot
compare_snapshotFree up to 40 pages a day per client address for a live compare, no key needed. Compares a saved snapshot, as Site A, against a live targetUrl (every stored page paired by path, or the urls pairs you name) at the snapshot’s width and check mode, priced at one captured page per pair (half a live pair) with no discovery; the snapshot’s own origin is never fetched. With otherSnapshotId instead of targetUrl it compares two snapshots captured alike at no charge, which needs the account’s key on the request; the compare is saved under a Pro account and otherwise removed after 30 days. Call it when the baseline was captured earlier; then wait_for_comparison and get_report as for start_comparison. dryRun: true answers the page count and price without charging. Answers with jobId, jobToken, status, pagesCharged, snapshotId or compareId and, on a free run, sample and allowanceRemaining.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| urls | No | With targetUrl: the pairs to compare, each source a page of the snapshot (its path or full URL on the snapshot’s origin) and each target on targetUrl. Without it every stored page is paired by path. | |
| dryRun | No | Quote only: runs every check and the pricing, then answers the page count and exact amount. Nothing is charged, the free allowance is not used and no job starts; the same body without dryRun is priced from the retained result. | |
| visual | No | Not accepted: a run against a snapshot uses the masks and freeze recorded with the snapshot. | |
| targetUrl | No | The live site to compare against the snapshot (full URL). Give this or otherSnapshotId. | |
| threshold | No | Visual diff tolerance as a fraction from 0 (exact) to 1: 0.05 means 5%. The web app takes a percentage; the API does not. | |
| shareToken | No | A share token (dcs_…) the snapshot’s owner issued for agents. Needed unless the account key on the request’s HTTP headers owns or was granted the snapshot. | |
| snapshotId | Yes | The snapshot id, snap-<uuid>, from list_snapshots or the web app. | |
| callbackUrl | No | Optional https URL (port 443) that receives one JSON POST when the job ends (jobId, status, summary, links; never the jobToken), a nudge to read the job. Public hosts only, no redirects followed, retried twice; delivery never affects the job. | |
| maxPriceUsd | No | Optional spend cap in USD. A job priced above it is refused before any challenge, so an auto-paying client is never asked for more. | |
| idempotencyKey | No | Optional opaque string a retry repeats: under a prepaid balance the same value within 24 hours is not charged again and answers DUPLICATE_REQUEST with the jobId of the first call. | |
| otherSnapshotId | No | A second snapshot, captured at the same width and check mode, to compare the first against. Needs the account key on the request; never free. Give this or targetUrl. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | ||
| error | No | ||
| jobId | No | ||
| amount | No | ||
| dryRun | No | ||
| sample | No | ||
| status | No | ||
| payment | No | ||
| currency | No | ||
| jobToken | No | ||
| compareId | No | ||
| freeCovers | No | ||
| snapshotId | No | ||
| pagesPriced | No | ||
| pagesCharged | No | ||
| allowanceRemaining | No | ||
| pagesFromAllowance | No |