Home / Diff change monitoring through the API

Diff change monitoring through the API

Diff change monitoring through the API. HTTP requests, parameters, response schemas and Labrika workflows.

On this page

Change monitoring

Use this API to retrieve monitoring projects, check history, and changes to individual pages. The results can feed your own dashboard, exports, or checks before publication.

Retrieve a project, select a report from its history, then load its rows. Copy the page identifier url_md5 from a report row. Use last for the latest completed report in that project; use a specific report_id for a reproducible export.
Scopes
  • diff-projects:read
  • diff-reports:read
  • Start with /public-api/v1/diff-projects to obtain diff_project_id.
  • Report history: /public-api/v1/diff-projects/{diff_project_id}/reports.
  • Latest report: pass last instead of report_id.
  • include_state=true in /public-api/v1/diff-projects/{diff_project_id}/reports/{report_id}/rows adds page state and file availability details.
Project, report, and row lists are returned in data. Pass pagination.next_offset as offset while pagination.has_more is true. limit: 1–10000, default 1000; offset: 0 or greater, default 0.
GET /public-api/v1/diff-projects

Returns the current user’s monitoring projects. Use data[].diff_project_id in subsequent requests.

GET /public-api/v1/diff-projects/{diff_project_id}/reports

Returns the project’s check history: report_id, status, creation time, page count, and alert count.

GET /public-api/v1/diff-projects/{diff_project_id}/report-graph

Chart data for the project’s check history, suitable for displaying monitoring results over time.

GET /public-api/v1/diff-projects/{diff_project_id}/reports/{report_id}/rows

Returns pages and detected changes for the selected check. Set report_id to an identifier from the check history or last.

Parameters
Parameter Type Description
include_state boolean true adds the title, description, h1, tracked tags, files, and other state fields.
limit / offset integer Paginated row retrieval. The maximum limit is 10,000.
has_alert boolean Filters rows with triggered alerts.
GET /public-api/v1/diff-projects/{diff_project_id}/reports/{report_id}/pages/{url_md5}

Detailed page data captured for the selected report.

Rows with state
curl
curl --fail-with-body --silent --show-error --location \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Accept: application/json' \
  'https://app.labrika.com/public-api/v1/diff-projects/PROJECT_ID/reports/last/rows?include_state=true&limit=1000&offset=0'
JavaScript
async function main () {
  const response = await fetch("https://app.labrika.com/public-api/v1/diff-projects/PROJECT_ID/reports/last/rows?include_state=true&limit=1000&offset=0", {
    method: "GET",
    headers: {
      "Authorization": "Bearer YOUR_API_KEY",
      "Accept": "application/json",
    },
    signal: AbortSignal.timeout(30_000),
  })

  if (!response.ok) {
    const responseText = await response.text()
    throw new Error(`HTTP ${response.status}: ${responseText}`)
  }

  const responseText = await response.text()
  const data = responseText && response.headers.get("content-type")?.includes("application/json") ? JSON.parse(responseText) : responseText

  console.log(data)
}

main().catch(error => {
  console.error(error)
  process.exitCode = 1
})
Python
import json
import requests

url = "https://app.labrika.com/public-api/v1/diff-projects/PROJECT_ID/reports/last/rows?include_state=true&limit=1000&offset=0"
headers = {
    "Authorization": "Bearer YOUR_API_KEY",
    "Accept": "application/json",
}

response = requests.request(
    "GET",
    url,
    headers=headers,
    timeout=30,
)
response.raise_for_status()
print(json.dumps(response.json(), ensure_ascii=False, indent=2) if response.content and "application/json" in response.headers.get("Content-Type", "") else response.text)
PHP
<?php

$curl = curl_init('https://app.labrika.com/public-api/v1/diff-projects/PROJECT_ID/reports/last/rows?include_state=true&limit=1000&offset=0');

if ($curl === false) {
    throw new RuntimeException('Unable to initialize cURL');
}

curl_setopt_array($curl, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer YOUR_API_KEY',
        'Accept: application/json',
    ],
]);

$response = curl_exec($curl);

if ($response === false) {
    $message = curl_error($curl);
    curl_close($curl);
    throw new RuntimeException('Network error: ' . $message);
}

$status = curl_getinfo($curl, CURLINFO_RESPONSE_CODE);
$contentType = curl_getinfo($curl, CURLINFO_CONTENT_TYPE) ?: '';
curl_close($curl);

if ($status < 200 || $status >= 300) {
    throw new RuntimeException("HTTP $status: $response");
}

if ($response !== '' && str_contains($contentType, 'application/json')) {
    print_r(json_decode($response, true, 512, JSON_THROW_ON_ERROR));
} else {
    echo $response;
}
Go
package main

import (
	"context"
	"fmt"
	"io"
	"net/http"
	"os"
	"time"
)

func main() {
	ctx, cancel := context.WithTimeout(context.Background(), 30 * time.Second)
	defer cancel()

	request, err := http.NewRequestWithContext(ctx, http.MethodGet, "https://app.labrika.com/public-api/v1/diff-projects/PROJECT_ID/reports/last/rows?include_state=true&limit=1000&offset=0", nil)
	if err != nil {
		panic(err)
	}

	request.Header.Set("Authorization", "Bearer YOUR_API_KEY")
	request.Header.Set("Accept", "application/json")

	client := &http.Client{Timeout: 30 * time.Second}
	response, err := client.Do(request)
	if err != nil {
		panic(err)
	}
	defer response.Body.Close()

	if response.StatusCode < http.StatusOK || response.StatusCode >= http.StatusMultipleChoices {
		errorBody, readErr := io.ReadAll(response.Body)
		if readErr != nil {
			panic(readErr)
		}
		panic(fmt.Sprintf("HTTP %d: %s", response.StatusCode, errorBody))
	}

	if _, err := io.Copy(os.Stdout, response.Body); err != nil {
		panic(err)
	}
}
Google Apps Script
function callLabrikaPublicAPI() {
  const response = UrlFetchApp.fetch("https://app.labrika.com/public-api/v1/diff-projects/PROJECT_ID/reports/last/rows?include_state=true&limit=1000&offset=0", {
    method: "get",
    headers: {
      "Authorization": "Bearer YOUR_API_KEY",
      "Accept": "application/json",
    },
    followRedirects: false,
    muteHttpExceptions: true,
  });
  const status = response.getResponseCode();
  if (status < 200 || status >= 300) {
    throw new Error('HTTP ' + status + ': ' + response.getContentText());
  }
  Logger.log(response.getContentText());
}

Back to contents

API method reference — Diff

Choose a method from the contents. Check its HTTP method, path, scopes, required parameters and request body. JSON blocks containing schema, properties and $ref describe the contract; do not send them as a ready-made request body. Request examples and response schemas are labelled separately.

Methods in this section

GET /public-api/v1/diff-projects

Parameters

Related data models: CacheControl · RateLimitLimit · RateLimitRemaining · RateLimitResetAt · RetryAfter · XRequestID · DiffProjectListResponse · ErrorResponse

limit (query)
{
  "schema": {
    "type": "integer",
    "minimum": 1,
    "maximum": 10000,
    "default": 1000
  }
}
offset (query)
{
  "schema": {
    "type": "integer",
    "minimum": 0,
    "default": 0
  }
}

Responses

200

Diff projects.

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiffProjectListResponse"
      }
    }
  }
}
default

Public API error. Rate-limit headers describe the limit actually checked: failed authentication attempts per IP for missing or invalid keys, or the applicable key/account limit after authentication. They may be absent for access blocks before rate-limit checks or when the limiter is unavailable. X-RateLimit-Reset is a Unix timestamp in seconds; Retry-After is a delay in seconds for 429.

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    },
    "X-RateLimit-Limit": {
      "$ref": "#/components/headers/RateLimitLimit"
    },
    "X-RateLimit-Remaining": {
      "$ref": "#/components/headers/RateLimitRemaining"
    },
    "X-RateLimit-Reset": {
      "$ref": "#/components/headers/RateLimitResetAt"
    },
    "Cache-Control": {
      "$ref": "#/components/headers/CacheControl"
    },
    "Retry-After": {
      "$ref": "#/components/headers/RetryAfter"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/ErrorResponse"
      }
    }
  }
}

GET /public-api/v1/diff-projects/{id}/reports

Parameters

Related data models: CacheControl · RateLimitLimit · RateLimitRemaining · RateLimitResetAt · RetryAfter · XRequestID · DiffReportListResponse · ErrorResponse · XID

id (path)
{
  "required": true,
  "schema": {
    "$ref": "#/components/schemas/XID"
  }
}
limit (query)
{
  "schema": {
    "type": "integer",
    "minimum": 1,
    "maximum": 10000,
    "default": 1000
  }
}
offset (query)
{
  "schema": {
    "type": "integer",
    "minimum": 0,
    "default": 0
  }
}
status (query)
{
  "schema": {
    "type": "string",
    "enum": [
      "progress",
      "done",
      "failed"
    ]
  }
}
created_from (query)
{
  "schema": {
    "type": "string",
    "format": "date-time"
  }
}
created_to (query)
{
  "schema": {
    "type": "string",
    "format": "date-time"
  }
}

Responses

200

Diff reports.

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiffReportListResponse"
      }
    }
  }
}
default
{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    },
    "X-RateLimit-Limit": {
      "$ref": "#/components/headers/RateLimitLimit"
    },
    "X-RateLimit-Remaining": {
      "$ref": "#/components/headers/RateLimitRemaining"
    },
    "X-RateLimit-Reset": {
      "$ref": "#/components/headers/RateLimitResetAt"
    },
    "Cache-Control": {
      "$ref": "#/components/headers/CacheControl"
    },
    "Retry-After": {
      "$ref": "#/components/headers/RetryAfter"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/ErrorResponse"
      }
    }
  }
}

GET /public-api/v1/diff-projects/{id}/report-graph

Parameters

Related data models: CacheControl · RateLimitLimit · RateLimitRemaining · RateLimitResetAt · RetryAfter · XRequestID · DiffReportGraphResponse · ErrorResponse · XID

id (path)
{
  "required": true,
  "schema": {
    "$ref": "#/components/schemas/XID"
  }
}
limit (query)
{
  "schema": {
    "type": "integer",
    "minimum": 1,
    "maximum": 10000,
    "default": 1000
  }
}
offset (query)
{
  "schema": {
    "type": "integer",
    "minimum": 0,
    "default": 0
  }
}

Responses

200

Diff report graph.

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiffReportGraphResponse"
      }
    }
  }
}
default
{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    },
    "X-RateLimit-Limit": {
      "$ref": "#/components/headers/RateLimitLimit"
    },
    "X-RateLimit-Remaining": {
      "$ref": "#/components/headers/RateLimitRemaining"
    },
    "X-RateLimit-Reset": {
      "$ref": "#/components/headers/RateLimitResetAt"
    },
    "Cache-Control": {
      "$ref": "#/components/headers/CacheControl"
    },
    "Retry-After": {
      "$ref": "#/components/headers/RetryAfter"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/ErrorResponse"
      }
    }
  }
}

GET /public-api/v1/diff-projects/{id}/reports/{report_id}/rows

Parameters

Related data models: CacheControl · RateLimitLimit · RateLimitRemaining · RateLimitResetAt · RetryAfter · XRequestID · DiffReportRowsResponse · ErrorResponse · XID

id (path)
{
  "required": true,
  "schema": {
    "$ref": "#/components/schemas/XID"
  }
}
report_id (path)

Report xid or the literal last. The literal last is accepted only in this path parameter.

{
  "required": true,
  "schema": {
    "type": "string",
    "minLength": 4,
    "maxLength": 64,
    "pattern": "^([A-Za-z0-9_-]+|last)$"
  }
}
include_state (query)
{
  "schema": {
    "type": "boolean",
    "default": false
  }
}
limit (query)
{
  "schema": {
    "type": "integer",
    "minimum": 1,
    "maximum": 10000,
    "default": 1000
  }
}
offset (query)
{
  "schema": {
    "type": "integer",
    "minimum": 0,
    "default": 0
  }
}
search (query)
{
  "schema": {
    "type": "string",
    "maxLength": 300
  }
}
url_md5 (query)
{
  "schema": {
    "type": "string",
    "pattern": "^[a-fA-F0-9]{32}$"
  }
}
has_alert (query)
{
  "schema": {
    "type": "boolean"
  }
}
rule_id (query)
{
  "schema": {
    "type": "string"
  }
}
http_status (query)
{
  "schema": {
    "type": "integer",
    "minimum": 100,
    "maximum": 599
  }
}
changed_field (query)
{
  "schema": {
    "type": "string"
  }
}
alert_trigger_code (query)
{
  "schema": {
    "type": "string"
  }
}
alert_trigger_group (query)
{
  "schema": {
    "type": "string"
  }
}

Responses

200

Diff report rows.

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiffReportRowsResponse"
      }
    }
  }
}
default
{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    },
    "X-RateLimit-Limit": {
      "$ref": "#/components/headers/RateLimitLimit"
    },
    "X-RateLimit-Remaining": {
      "$ref": "#/components/headers/RateLimitRemaining"
    },
    "X-RateLimit-Reset": {
      "$ref": "#/components/headers/RateLimitResetAt"
    },
    "Cache-Control": {
      "$ref": "#/components/headers/CacheControl"
    },
    "Retry-After": {
      "$ref": "#/components/headers/RetryAfter"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/ErrorResponse"
      }
    }
  }
}

GET /public-api/v1/diff-projects/{id}/reports/{report_id}/pages/{url_md5}

Parameters

Related data models: CacheControl · RateLimitLimit · RateLimitRemaining · RateLimitResetAt · RetryAfter · XRequestID · DiffPageDetailResponse · ErrorResponse · URLMD5 · XID

id (path)
{
  "required": true,
  "schema": {
    "$ref": "#/components/schemas/XID"
  }
}
report_id (path)

Report xid or the literal last. The literal last is accepted only in this path parameter.

{
  "required": true,
  "schema": {
    "type": "string",
    "minLength": 4,
    "maxLength": 64,
    "pattern": "^([A-Za-z0-9_-]+|last)$"
  }
}
url_md5 (path)
{
  "required": true,
  "schema": {
    "$ref": "#/components/schemas/URLMD5"
  }
}

Responses

200

Diff page detail.

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiffPageDetailResponse"
      }
    }
  }
}
default
{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    },
    "X-RateLimit-Limit": {
      "$ref": "#/components/headers/RateLimitLimit"
    },
    "X-RateLimit-Remaining": {
      "$ref": "#/components/headers/RateLimitRemaining"
    },
    "X-RateLimit-Reset": {
      "$ref": "#/components/headers/RateLimitResetAt"
    },
    "Cache-Control": {
      "$ref": "#/components/headers/CacheControl"
    },
    "Retry-After": {
      "$ref": "#/components/headers/RetryAfter"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/ErrorResponse"
      }
    }
  }
}

Back to contents

URLs and change monitoring rules

URLs and rules affect only future reports. Historical reports continue to show data calculated when the report was run.

409 rule_in_use: This rule is used for automatic URL additions, imports and the API. Before deleting it, select and save another rule for new pages.

Scopes
  • GET → diff-urls:read, diff-rules:read
  • POST / PATCH / DELETE → diff-urls:write, diff-rules:write
  • POST /public-api/v1/diff-projects/{diff_project_id}/urls?dry_run=true validates URLs without saving them.
  • Idempotency-Key is recommended for bulk URL imports.
  • For POST, an omitted or null alert_rule_id pins the current rule for new pages from the URL list settings. PATCH with null explicitly assigns that current rule to the selected URLs. Later changes to the setting leave existing pages unchanged; reposting an existing URL preserves its previous rule. If no selection is saved, the response is 409 default_rule_not_configured.
  • Deleting a URL does not remove historical rows from earlier reports.
  • A rule can be deleted only if it is not the default and no URLs are explicitly assigned to it.

URLs: urls is an array of up to 1000 absolute HTTP/HTTPS addresses. Read url_md5 from the normalized API result; do not compute it from the original input. An omitted or null alert_rule_id uses the project rule; effective_rule_id identifies the applied rule and uses_default_rule is always false. dry_run=true does not save URLs: check would_create_count and errors. Bulk assignment accepts 1–10000 url_md5s. Pagination: limit 1–10000 (default 1000), offset from 0.

Rule: name has 1–32 characters; parsing_javascript, screenshot_desktop, screenshot_mobile and available are booleans. screenshot_delay is 1–10 seconds with one decimal place; percent_diff_html/text/meta is 0–100%; load_time_more is 0.1–10 seconds; min_page_size/max_page_size is 0–10000000 bytes, minimum no greater than maximum. Get expected_http_status values from rules/expected-http-statuses. tracked_tags allows up to 6 entries, unique number 1–6, mode css or regex, pattern up to 1000 characters. missing_html/appearing_html allows up to 20 strings of 1000 characters. Optional thresholds accept null.

Creating a rule returns 201 with data; PATCH returns 200 with data; DELETE returns 204 with no body. PATCH replaces the editable settings: send all values you want to keep, including name. Omitted booleans become false, arrays are cleared and optional values become null. Fetch the rule with GET first. The project default rule and rules explicitly assigned to URLs cannot be deleted.

URL validation
http/httpsOnly absolute HTTP/HTTPS URLs are supported.
IDNInternationalized domain names are supported and normalized to Punycode.
domain_blockedThe domain is blocked by the product blacklist.
unsafe_urlThe URL was rejected by SSRF protection.

Back to contents

API method reference — URLs

Choose a method from the contents. Check its HTTP method, path, scopes, required parameters and request body. JSON blocks containing schema, properties and $ref describe the contract; do not send them as a ready-made request body. Request examples and response schemas are labelled separately.

Methods in this section

GET /public-api/v1/diff-projects/{id}/urls

Parameters

Related data models: CacheControl · RateLimitLimit · RateLimitRemaining · RateLimitResetAt · RetryAfter · XRequestID · DiffURLListResponse · ErrorResponse · XID

id (path)
{
  "required": true,
  "schema": {
    "$ref": "#/components/schemas/XID"
  }
}
limit (query)
{
  "schema": {
    "type": "integer",
    "minimum": 1,
    "maximum": 10000,
    "default": 1000
  }
}
offset (query)
{
  "schema": {
    "type": "integer",
    "minimum": 0,
    "default": 0
  }
}

Responses

200

Monitored URLs.

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiffURLListResponse"
      }
    }
  }
}
default

Public API error. Rate-limit headers describe the limit actually checked: failed authentication attempts per IP for missing or invalid keys, or the applicable key/account limit after authentication. They may be absent for access blocks before rate-limit checks or when the limiter is unavailable. X-RateLimit-Reset is a Unix timestamp in seconds; Retry-After is a delay in seconds for 429.

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    },
    "X-RateLimit-Limit": {
      "$ref": "#/components/headers/RateLimitLimit"
    },
    "X-RateLimit-Remaining": {
      "$ref": "#/components/headers/RateLimitRemaining"
    },
    "X-RateLimit-Reset": {
      "$ref": "#/components/headers/RateLimitResetAt"
    },
    "Cache-Control": {
      "$ref": "#/components/headers/CacheControl"
    },
    "Retry-After": {
      "$ref": "#/components/headers/RetryAfter"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/ErrorResponse"
      }
    }
  }
}

POST /public-api/v1/diff-projects/{id}/urls

Parameters

Related data models: CacheControl · RateLimitLimit · RateLimitRemaining · RateLimitResetAt · RetryAfter · XRequestID · DiffURLAddRequest · DiffURLAddResponse · ErrorResponse · XID

id (path)
{
  "required": true,
  "schema": {
    "$ref": "#/components/schemas/XID"
  }
}
dry_run (query)
{
  "schema": {
    "type": "boolean",
    "default": false
  }
}
Idempotency-Key (header)
{
  "schema": {
    "type": "string",
    "minLength": 1,
    "maxLength": 255
  }
}

Request

{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiffURLAddRequest"
      }
    }
  }
}

Responses

200

URL add result.

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiffURLAddResponse"
      }
    }
  }
}
default
{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    },
    "X-RateLimit-Limit": {
      "$ref": "#/components/headers/RateLimitLimit"
    },
    "X-RateLimit-Remaining": {
      "$ref": "#/components/headers/RateLimitRemaining"
    },
    "X-RateLimit-Reset": {
      "$ref": "#/components/headers/RateLimitResetAt"
    },
    "Cache-Control": {
      "$ref": "#/components/headers/CacheControl"
    },
    "Retry-After": {
      "$ref": "#/components/headers/RetryAfter"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/ErrorResponse"
      }
    }
  }
}

DELETE /public-api/v1/diff-projects/{id}/urls/{url_md5}

Parameters

Related data models: CacheControl · RateLimitLimit · RateLimitRemaining · RateLimitResetAt · RetryAfter · XRequestID · ErrorResponse · URLMD5 · XID

id (path)
{
  "required": true,
  "schema": {
    "$ref": "#/components/schemas/XID"
  }
}
url_md5 (path)
{
  "required": true,
  "schema": {
    "$ref": "#/components/schemas/URLMD5"
  }
}

Responses

204

Deleted. The response body is empty.

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    }
  }
}
default
{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    },
    "X-RateLimit-Limit": {
      "$ref": "#/components/headers/RateLimitLimit"
    },
    "X-RateLimit-Remaining": {
      "$ref": "#/components/headers/RateLimitRemaining"
    },
    "X-RateLimit-Reset": {
      "$ref": "#/components/headers/RateLimitResetAt"
    },
    "Cache-Control": {
      "$ref": "#/components/headers/CacheControl"
    },
    "Retry-After": {
      "$ref": "#/components/headers/RetryAfter"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/ErrorResponse"
      }
    }
  }
}

PATCH /public-api/v1/diff-projects/{id}/urls/{url_md5}/rule

Parameters

Related data models: CacheControl · RateLimitLimit · RateLimitRemaining · RateLimitResetAt · RetryAfter · XRequestID · DiffURLRulePatchRequest · DiffURLRulePatchResponse · ErrorResponse · URLMD5 · XID

id (path)
{
  "required": true,
  "schema": {
    "$ref": "#/components/schemas/XID"
  }
}
url_md5 (path)
{
  "required": true,
  "schema": {
    "$ref": "#/components/schemas/URLMD5"
  }
}

Request

{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiffURLRulePatchRequest"
      }
    }
  }
}

Responses

200

URL rule assignment result.

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiffURLRulePatchResponse"
      }
    }
  }
}
default
{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    },
    "X-RateLimit-Limit": {
      "$ref": "#/components/headers/RateLimitLimit"
    },
    "X-RateLimit-Remaining": {
      "$ref": "#/components/headers/RateLimitRemaining"
    },
    "X-RateLimit-Reset": {
      "$ref": "#/components/headers/RateLimitResetAt"
    },
    "Cache-Control": {
      "$ref": "#/components/headers/CacheControl"
    },
    "Retry-After": {
      "$ref": "#/components/headers/RetryAfter"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/ErrorResponse"
      }
    }
  }
}

PATCH /public-api/v1/diff-projects/{id}/urls/rule

Parameters

Related data models: CacheControl · RateLimitLimit · RateLimitRemaining · RateLimitResetAt · RetryAfter · XRequestID · DiffURLBulkRulePatchRequest · DiffURLRulePatchResponse · ErrorResponse · XID

id (path)
{
  "required": true,
  "schema": {
    "$ref": "#/components/schemas/XID"
  }
}

Request

{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiffURLBulkRulePatchRequest"
      }
    }
  }
}

Responses

200

URL rule assignment result.

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiffURLRulePatchResponse"
      }
    }
  }
}
default
{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    },
    "X-RateLimit-Limit": {
      "$ref": "#/components/headers/RateLimitLimit"
    },
    "X-RateLimit-Remaining": {
      "$ref": "#/components/headers/RateLimitRemaining"
    },
    "X-RateLimit-Reset": {
      "$ref": "#/components/headers/RateLimitResetAt"
    },
    "Cache-Control": {
      "$ref": "#/components/headers/CacheControl"
    },
    "Retry-After": {
      "$ref": "#/components/headers/RetryAfter"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/ErrorResponse"
      }
    }
  }
}

Back to contents

API method reference — Rules

Choose a method from the contents. Check its HTTP method, path, scopes, required parameters and request body. JSON blocks containing schema, properties and $ref describe the contract; do not send them as a ready-made request body. Request examples and response schemas are labelled separately.

Methods in this section

GET /public-api/v1/diff-projects/{id}/rules

Parameters

Related data models: CacheControl · RateLimitLimit · RateLimitRemaining · RateLimitResetAt · RetryAfter · XRequestID · DiffRuleListResponse · ErrorResponse · XID

id (path)
{
  "required": true,
  "schema": {
    "$ref": "#/components/schemas/XID"
  }
}
limit (query)
{
  "schema": {
    "type": "integer",
    "minimum": 1,
    "maximum": 10000,
    "default": 1000
  }
}
offset (query)
{
  "schema": {
    "type": "integer",
    "minimum": 0,
    "default": 0
  }
}

Responses

200

Alert rules.

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiffRuleListResponse"
      }
    }
  }
}
default

Public API error. Rate-limit headers describe the limit actually checked: failed authentication attempts per IP for missing or invalid keys, or the applicable key/account limit after authentication. They may be absent for access blocks before rate-limit checks or when the limiter is unavailable. X-RateLimit-Reset is a Unix timestamp in seconds; Retry-After is a delay in seconds for 429.

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    },
    "X-RateLimit-Limit": {
      "$ref": "#/components/headers/RateLimitLimit"
    },
    "X-RateLimit-Remaining": {
      "$ref": "#/components/headers/RateLimitRemaining"
    },
    "X-RateLimit-Reset": {
      "$ref": "#/components/headers/RateLimitResetAt"
    },
    "Cache-Control": {
      "$ref": "#/components/headers/CacheControl"
    },
    "Retry-After": {
      "$ref": "#/components/headers/RetryAfter"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/ErrorResponse"
      }
    }
  }
}

POST /public-api/v1/diff-projects/{id}/rules

Parameters

Related data models: CacheControl · RateLimitLimit · RateLimitRemaining · RateLimitResetAt · RetryAfter · XRequestID · DiffRuleResponse · DiffRuleWriteRequest · ErrorResponse · XID

id (path)
{
  "required": true,
  "schema": {
    "$ref": "#/components/schemas/XID"
  }
}

Request

{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiffRuleWriteRequest"
      }
    }
  }
}

Responses

201

Alert rule.

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiffRuleResponse"
      }
    }
  }
}
default
{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    },
    "X-RateLimit-Limit": {
      "$ref": "#/components/headers/RateLimitLimit"
    },
    "X-RateLimit-Remaining": {
      "$ref": "#/components/headers/RateLimitRemaining"
    },
    "X-RateLimit-Reset": {
      "$ref": "#/components/headers/RateLimitResetAt"
    },
    "Cache-Control": {
      "$ref": "#/components/headers/CacheControl"
    },
    "Retry-After": {
      "$ref": "#/components/headers/RetryAfter"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/ErrorResponse"
      }
    }
  }
}

GET /public-api/v1/diff-projects/{id}/rules/expected-http-statuses

Parameters

Related data models: CacheControl · RateLimitLimit · RateLimitRemaining · RateLimitResetAt · RetryAfter · XRequestID · DiffRuleExpectedHTTPStatusesResponse · ErrorResponse · XID

id (path)
{
  "required": true,
  "schema": {
    "$ref": "#/components/schemas/XID"
  }
}

Responses

200

Expected HTTP statuses.

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiffRuleExpectedHTTPStatusesResponse"
      }
    }
  }
}
default
{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    },
    "X-RateLimit-Limit": {
      "$ref": "#/components/headers/RateLimitLimit"
    },
    "X-RateLimit-Remaining": {
      "$ref": "#/components/headers/RateLimitRemaining"
    },
    "X-RateLimit-Reset": {
      "$ref": "#/components/headers/RateLimitResetAt"
    },
    "Cache-Control": {
      "$ref": "#/components/headers/CacheControl"
    },
    "Retry-After": {
      "$ref": "#/components/headers/RetryAfter"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/ErrorResponse"
      }
    }
  }
}

GET /public-api/v1/diff-projects/{id}/rules/{rule_id}

Parameters

Related data models: CacheControl · RateLimitLimit · RateLimitRemaining · RateLimitResetAt · RetryAfter · XRequestID · DiffRuleResponse · ErrorResponse · XID

id (path)
{
  "required": true,
  "schema": {
    "$ref": "#/components/schemas/XID"
  }
}
rule_id (path)
{
  "required": true,
  "schema": {
    "$ref": "#/components/schemas/XID"
  }
}

Responses

200

Alert rule.

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiffRuleResponse"
      }
    }
  }
}
default
{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    },
    "X-RateLimit-Limit": {
      "$ref": "#/components/headers/RateLimitLimit"
    },
    "X-RateLimit-Remaining": {
      "$ref": "#/components/headers/RateLimitRemaining"
    },
    "X-RateLimit-Reset": {
      "$ref": "#/components/headers/RateLimitResetAt"
    },
    "Cache-Control": {
      "$ref": "#/components/headers/CacheControl"
    },
    "Retry-After": {
      "$ref": "#/components/headers/RetryAfter"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/ErrorResponse"
      }
    }
  }
}

PATCH /public-api/v1/diff-projects/{id}/rules/{rule_id}

Parameters

Related data models: CacheControl · RateLimitLimit · RateLimitRemaining · RateLimitResetAt · RetryAfter · XRequestID · DiffRuleResponse · DiffRuleWriteRequest · ErrorResponse · XID

id (path)
{
  "required": true,
  "schema": {
    "$ref": "#/components/schemas/XID"
  }
}
rule_id (path)
{
  "required": true,
  "schema": {
    "$ref": "#/components/schemas/XID"
  }
}

Request

{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiffRuleWriteRequest"
      }
    }
  }
}

Responses

200

Alert rule.

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiffRuleResponse"
      }
    }
  }
}
default
{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    },
    "X-RateLimit-Limit": {
      "$ref": "#/components/headers/RateLimitLimit"
    },
    "X-RateLimit-Remaining": {
      "$ref": "#/components/headers/RateLimitRemaining"
    },
    "X-RateLimit-Reset": {
      "$ref": "#/components/headers/RateLimitResetAt"
    },
    "Cache-Control": {
      "$ref": "#/components/headers/CacheControl"
    },
    "Retry-After": {
      "$ref": "#/components/headers/RetryAfter"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/ErrorResponse"
      }
    }
  }
}

DELETE /public-api/v1/diff-projects/{id}/rules/{rule_id}

Parameters

Related data models: CacheControl · RateLimitLimit · RateLimitRemaining · RateLimitResetAt · RetryAfter · XRequestID · ErrorResponse · XID

id (path)
{
  "required": true,
  "schema": {
    "$ref": "#/components/schemas/XID"
  }
}
rule_id (path)
{
  "required": true,
  "schema": {
    "$ref": "#/components/schemas/XID"
  }
}

Responses

204

Deleted. The response body is empty.

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    }
  }
}
default
{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    },
    "X-RateLimit-Limit": {
      "$ref": "#/components/headers/RateLimitLimit"
    },
    "X-RateLimit-Remaining": {
      "$ref": "#/components/headers/RateLimitRemaining"
    },
    "X-RateLimit-Reset": {
      "$ref": "#/components/headers/RateLimitResetAt"
    },
    "Cache-Control": {
      "$ref": "#/components/headers/CacheControl"
    },
    "Retry-After": {
      "$ref": "#/components/headers/RetryAfter"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/ErrorResponse"
      }
    }
  }
}

Back to contents

Run a website change check

This section explains how to run a new check in Change monitoring. The check covers all tracked URLs in the selected project. Check the balance and estimate the cost first, then submit the run request with an Idempotency-Key header. Estimating the cost does not charge the account.

Scopes
  • diff-reports:run
  • /public-api/v1/diff-projects/{diff_project_id}/balance returns the available payment sources.
  • /public-api/v1/diff-projects/{diff_project_id}/reports/cost returns a signed cost_estimate_id valid for 10 minutes.
  • /public-api/v1/diff-projects/{diff_project_id}/reports/run charges the account and queues the analysis.
  • Analyses cover the entire project: scope=all_urls. Selected URLs are not supported in v1.
  • For retries, use the same API key, Idempotency-Key, and unchanged request parameters.

When automatic URL addition is enabled, /reports/cost first updates the URL list and assigns the saved project rule to new pages. /reports/run repeats preparation; if the page count or cost has changed, it returns 409 cost_estimate_mismatch without charging. Request a new estimate and retry with a new Idempotency-Key. Existing URLs and their rules are preserved.

GET/public-api/v1/diff-projects/{diff_project_id}/balance

Check the balance and available payment options.

POST/public-api/v1/diff-projects/{diff_project_id}/reports/cost

Calculate the cost. The account is not charged at this step.

{
  "scope": "all_urls",
  "force_recheck": false
}
POST/public-api/v1/diff-projects/{diff_project_id}/reports/run

Run the analysis. The Idempotency-Key header is required.

Idempotency-Key: run-report-20260531-001
{
  "cost_estimate_id": "COST_ESTIMATE_ID",
  "payment_option": "auto",
  "scope": "all_urls",
  "force_recheck": false
}
GET/public-api/v1/diff-projects/{diff_project_id}/reports/runs/{run_id}

Check the run status: pending, progress, done, failed.

After a timeout or server error, check GET /public-api/v1/diff-projects/{diff_project_id}/reports/runs and GET /public-api/v1/diff-projects/{diff_project_id}/reports: a failed response does not mean that the analysis was not started. Do not send concurrent run requests or use a new idempotency key until the outcome of the previous request is known.

Back to contents

API method reference — Runs

Choose a method from the contents. Check its HTTP method, path, scopes, required parameters and request body. JSON blocks containing schema, properties and $ref describe the contract; do not send them as a ready-made request body. Request examples and response schemas are labelled separately.

Methods in this section

GET /public-api/v1/diff-projects/{id}/balance

Parameters

Related data models: CacheControl · RateLimitLimit · RateLimitRemaining · RateLimitResetAt · RetryAfter · XRequestID · DiffBalanceResponse · ErrorResponse · XID

id (path)
{
  "required": true,
  "schema": {
    "$ref": "#/components/schemas/XID"
  }
}

Responses

200

Balance and payment options.

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiffBalanceResponse"
      }
    }
  }
}
default

Public API error. Rate-limit headers describe the limit actually checked: failed authentication attempts per IP for missing or invalid keys, or the applicable key/account limit after authentication. They may be absent for access blocks before rate-limit checks or when the limiter is unavailable. X-RateLimit-Reset is a Unix timestamp in seconds; Retry-After is a delay in seconds for 429.

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    },
    "X-RateLimit-Limit": {
      "$ref": "#/components/headers/RateLimitLimit"
    },
    "X-RateLimit-Remaining": {
      "$ref": "#/components/headers/RateLimitRemaining"
    },
    "X-RateLimit-Reset": {
      "$ref": "#/components/headers/RateLimitResetAt"
    },
    "Cache-Control": {
      "$ref": "#/components/headers/CacheControl"
    },
    "Retry-After": {
      "$ref": "#/components/headers/RetryAfter"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/ErrorResponse"
      }
    }
  }
}

POST /public-api/v1/diff-projects/{id}/reports/cost

Before estimating the cost, adds new URLs according to the saved project mode and assigns the selected rule to them. Existing URLs and their rules are preserved. Estimation does not reserve or spend credits or money.

Related data models: CacheControl · RateLimitLimit · RateLimitRemaining · RateLimitResetAt · RetryAfter · XRequestID · DiffCostRequest · DiffCostResponse · ErrorResponse · XID

Parameters

id (path)
{
  "required": true,
  "schema": {
    "$ref": "#/components/schemas/XID"
  }
}

Request

{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiffCostRequest"
      }
    }
  }
}

Responses

200

Signed cost estimate.

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiffCostResponse"
      }
    }
  }
}
default
{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    },
    "X-RateLimit-Limit": {
      "$ref": "#/components/headers/RateLimitLimit"
    },
    "X-RateLimit-Remaining": {
      "$ref": "#/components/headers/RateLimitRemaining"
    },
    "X-RateLimit-Reset": {
      "$ref": "#/components/headers/RateLimitResetAt"
    },
    "Cache-Control": {
      "$ref": "#/components/headers/CacheControl"
    },
    "Retry-After": {
      "$ref": "#/components/headers/RetryAfter"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/ErrorResponse"
      }
    }
  }
}

POST /public-api/v1/diff-projects/{id}/reports/run

Prepares URLs again before payment. If the final cost or page count differs from cost_estimate_id, returns 409 cost_estimate_mismatch without charging. Get a new estimate and retry with a new Idempotency-Key.

Related data models: CacheControl · RateLimitLimit · RateLimitRemaining · RateLimitResetAt · RetryAfter · XRequestID · DiffRunRequest · DiffRunResponse · ErrorResponse · XID

Parameters

id (path)
{
  "required": true,
  "schema": {
    "$ref": "#/components/schemas/XID"
  }
}
Idempotency-Key (header)
{
  "schema": {
    "type": "string",
    "minLength": 1,
    "maxLength": 255
  }
}

Request

{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiffRunRequest"
      }
    }
  }
}

Responses

200

Diff run.

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiffRunResponse"
      }
    }
  }
}
default
{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    },
    "X-RateLimit-Limit": {
      "$ref": "#/components/headers/RateLimitLimit"
    },
    "X-RateLimit-Remaining": {
      "$ref": "#/components/headers/RateLimitRemaining"
    },
    "X-RateLimit-Reset": {
      "$ref": "#/components/headers/RateLimitResetAt"
    },
    "Cache-Control": {
      "$ref": "#/components/headers/CacheControl"
    },
    "Retry-After": {
      "$ref": "#/components/headers/RetryAfter"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/ErrorResponse"
      }
    }
  }
}

GET /public-api/v1/diff-projects/{id}/reports/runs

Parameters

Related data models: CacheControl · RateLimitLimit · RateLimitRemaining · RateLimitResetAt · RetryAfter · XRequestID · DiffRunListResponse · ErrorResponse · XID

id (path)
{
  "required": true,
  "schema": {
    "$ref": "#/components/schemas/XID"
  }
}
limit (query)
{
  "schema": {
    "type": "integer",
    "minimum": 1,
    "maximum": 10000,
    "default": 100
  }
}
offset (query)
{
  "schema": {
    "type": "integer",
    "minimum": 0,
    "default": 0
  }
}

Responses

200

Diff runs.

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiffRunListResponse"
      }
    }
  }
}
default
{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    },
    "X-RateLimit-Limit": {
      "$ref": "#/components/headers/RateLimitLimit"
    },
    "X-RateLimit-Remaining": {
      "$ref": "#/components/headers/RateLimitRemaining"
    },
    "X-RateLimit-Reset": {
      "$ref": "#/components/headers/RateLimitResetAt"
    },
    "Cache-Control": {
      "$ref": "#/components/headers/CacheControl"
    },
    "Retry-After": {
      "$ref": "#/components/headers/RetryAfter"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/ErrorResponse"
      }
    }
  }
}

GET /public-api/v1/diff-projects/{id}/reports/runs/{run_id}

Parameters

Related data models: CacheControl · RateLimitLimit · RateLimitRemaining · RateLimitResetAt · RetryAfter · XRequestID · DiffRunResponse · ErrorResponse · XID

id (path)
{
  "required": true,
  "schema": {
    "$ref": "#/components/schemas/XID"
  }
}
run_id (path)
{
  "required": true,
  "schema": {
    "$ref": "#/components/schemas/XID"
  }
}

Responses

200

Diff run.

{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DiffRunResponse"
      }
    }
  }
}
default
{
  "headers": {
    "X-Request-ID": {
      "$ref": "#/components/headers/XRequestID"
    },
    "X-RateLimit-Limit": {
      "$ref": "#/components/headers/RateLimitLimit"
    },
    "X-RateLimit-Remaining": {
      "$ref": "#/components/headers/RateLimitRemaining"
    },
    "X-RateLimit-Reset": {
      "$ref": "#/components/headers/RateLimitResetAt"
    },
    "Cache-Control": {
      "$ref": "#/components/headers/CacheControl"
    },
    "Retry-After": {
      "$ref": "#/components/headers/RetryAfter"
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/ErrorResponse"
      }
    }
  }
}

Back to contents