API URL
POST /api/v1/diffy/snapshot, /api/v1/diffy/diff
Headers
Code
Content-Type: application/jsonBody Parameters
Param
Type
Description
url
required
string
Target http/https URL (max 2048 chars; SSRF-guarded)
format
optional
string
Snapshot output markdown blocks or tree (default markdown)
render
optional
string
Render mode auto static or browser (default auto)
max_chars
optional
number
Content cap 1000-100000 truncated at block boundaries (default 20000)
include_state
optional
boolean
Include diffable state object in snapshot (default true)
previous_state
required
object
State object previously returned by Diffy (schema 1)
Example Request
Code
POST https://datpaq.com/api/v1/diffy/snapshot?api_key=your-api-key | Body: {"url":"https://example.com/pricing","format":"markdown"}Successful Response
Status
HTML
200 OKBody
Code
{"success":true,"url":"https://example.com/pricing","title":"Pricing","format":"markdown","content":"# Pricing
...","truncated":false,"state":{"schema":1,"captured_at":"2026-10-13T12:00:00.000Z","url":"https://example.com/pricing","blocks":[{"h":"9f2a1c44d0e88b31","t":"h1","x":"Pricing"}]},"state_etag":"9f2a1c44d0e8...","metadata":{"correlationId":"req_abc123","timestamp":"2026-10-13T12:00:00.000Z","processingTime":"412ms","api_token_name":null,"rate_limit":{"limit":null,"remaining":null,"reset":null}}}Field
Type
success
boolean
url
string
title
string
format
string
content
string
truncated
boolean
changed
boolean
summary
object
changes
array
state
object
state_etag
string
snapshotMetadata
object
metadata
object
metadata_correlationId
string
metadata_timestamp
string
metadata_processingTime
string
metadata_api_token_name
string
metadata_rate_limit
object
code
string
status
string
service
string
version
string
error
string
supported_schema
number
Error Response
Example
Code
HTTP 400 VALIDATION: Joi validation failure — Details array included in response; HTTP 400 BLOCKED_URL: Destination failed SSRF policy — Private/reserved IP blocked hostname or blocked redirect hop; HTTP 401 AuthenticationError: Gateway authentication failure — Request rejected due to missing or invalid API credentials; HTTP 404 NotFound: Unknown endpoint path — Request path does not map to available diffy routes; HTTP 409 STATE_SCHEMA_MISMATCH: previous_state.schema not supported — Client must re-snapshot to obtain current schema; HTTP 422 FETCH_FAILED: Target page could not be processed — Also UNSUPPORTED_CONTENT_TYPE TOO_MANY_REDIRECTS SIZE_EXCEEDED EXTRACTION_FAILED; HTTP 429 RateLimitError: More than 30 requests in 15 minutes — Request rejected by service rate limiter; HTTP 503 PoolSaturated: Chromium pool at capacity — Retry-After 5 header included; HTTP 500 InternalError: Unexpected failure — Snapshot or diff could not completeLast Updated: May 4, 2026