Policy Change Tracker
Snapshots a privacy policy, terms of service or DPA as a text hash with per-section hashes plus a structured summary of its key terms, built to run as a monitor that alerts you when the policy changes.
- Price per call
- 1 credit
- per successful call
- Price ceiling
- 10 credits
- if a call is retried elsewhere
- Failed calls
- Free
- retried automatically
- Billed
- Per call
- only on success
Endpoint
api.primaryapi.com/ v1/ run/ company. policy_changesAuth: API key with run or full access, or a dashboard session
Send the input below as a JSON body. The call is routed to a healthy upstream; if an attempt fails, it is retried automatically inside the same request and you pay only for the answer you get. To check an input and see the exact price without running anything, call POST /v1/quote/company.policy_changes with the same body (free).
This API can take longer than the synchronous wait window. Send Prefer: respond-async and an Idempotency-Key, then poll GET /v1/requests/{id}; see Durable requests.
Example request
curl -sS -X POST "https://api.primaryapi.com/v1/run/company.policy_changes" \
-H "Authorization: Bearer $PRIMARYAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com/privacy"}'const res = await fetch('https://api.primaryapi.com/v1/run/company.policy_changes', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.PRIMARYAPI_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
url: 'https://example.com/privacy',
}),
});
const body = await res.json();
if (!res.ok) throw new Error(`${body.code}: ${body.error}`);
// found:false is a successful answer ("does not exist"), not an error
console.log(body.output.found ? body.output.data : body.output.reason, body.credits);import os
import requests
res = requests.post(
"https://api.primaryapi.com/v1/run/company.policy_changes",
headers={"Authorization": f"Bearer {os.environ['PRIMARYAPI_API_KEY']}"},
json={
"url": "https://example.com/privacy",
},
timeout=60,
)
body = res.json()
if not res.ok:
raise RuntimeError(f"{body['code']}: {body['error']}")
# found=False is a successful answer ("does not exist"), not an error
print(body["output"]["data"] if body["output"]["found"] else body["output"]["reason"], body["credits"]){
"name": "run_api",
"arguments": {
"sku": "company.policy_changes",
"input": {
"url": "https://example.com/privacy"
}
}
}Price this exact input first (free)
curl -sS -X POST "https://api.primaryapi.com/v1/quote/company.policy_changes" \
-H "Authorization: Bearer $PRIMARYAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com/privacy"}'Returns credits (what the call is expected to cost) and maxCredits (the most it can cost, which is set aside while it runs). Invalid input fails here the same way it would on run.
Input
JSON body fields. Unknown fields are rejected with 400 invalid_input (never silently ignored). You may add the routing controls preferLatencyUnderMs and maxCredits to the same object.
urlstringrequired- Policy page or document URL (HTML, plain text or PDF).max 2048 chars · format: uri
summarizebooleandefaulttrue- Also summarise the key terms with AI (default true). false = hashes and sections only, at 1 credit.
Output
When output.found is true, output.data has these fields.
urlstring- URL that was requested.
finalUrlstring- URL after redirects.
titlestring | nulllastUpdatedstring | null- The "last updated" / "effective" date exactly as the page states it, or null when it states none.
lastUpdatedDatestring | null- The same date as ISO 8601 (YYYY-MM-DD, or YYYY-MM when the page gives only a month).
textHashstring- "sha256:<hex>" of the normalised main text: changes whenever the wording changes.
wordCountintegersectionsobject[]- Headings in document order with a hash of each section, so a changed section can be pinpointed.
sections[].headingstringsections[].hashstring- "sha256:<hex>" of the section text.
summaryobject | null- Key terms read with AI; null when summarize=false.
summary.documentTypeenum- one of: privacy_policy, terms_of_service, data_processing_agreement, cookie_policy, acceptable_use_policy, subprocessor_list, security_policy, other
summary.sellsPersonalDataenum- one of: yes, no, not_stated
summary.sharesDataForAdvertisingenum- one of: yes, no, not_stated
summary.usesDataToTrainAienum- one of: yes, no, opt_out, not_stated
summary.dataRetentionMaxDaysinteger | null- Longest retention period the document states, in days (null when it states none).
summary.deletionOnRequestenum- one of: yes, no, not_stated
summary.userRightsenum[]- Rights the document grants, sorted.
summary.minimumAgeinteger | nullsummary.internationalTransfersenum- one of: yes, no, not_stated
summary.transferMechanismsenum[]- Sorted.
summary.changeNoticeDaysinteger | null- Advance notice of changes to the document, in days.
summary.autoRenewalenum- one of: yes, no, not_stated
summary.arbitrationenum- one of: yes, no, not_stated
summary.classActionWaiverenum- one of: yes, no, not_stated
summary.breachNotificationHoursinteger | nullsummary.subprocessorNoticeDaysinteger | nullkeyPointsstring[]- Short statements built from `summary` in a fixed order; they change only when a summarised term changes.
truncatedboolean- The document was longer than the AI reader takes and only its most relevant parts were read.
TypeScript type
/** output.data when output.found is true */
type CompanyPolicyChanges = {
/** URL that was requested. */
url: string;
/** URL after redirects. */
finalUrl: string;
title: string | null;
/** The "last updated" / "effective" date exactly as the page states it, or null when it states none. */
lastUpdated: string | null;
/** The same date as ISO 8601 (YYYY-MM-DD, or YYYY-MM when the page gives only a month). */
lastUpdatedDate: string | null;
/** "sha256:<hex>" of the normalised main text: changes whenever the wording changes. */
textHash: string;
wordCount: number;
/** Headings in document order with a hash of each section, so a changed section can be pinpointed. */
sections: {
heading: string;
/** "sha256:<hex>" of the section text. */
hash: string;
}[];
/** Key terms read with AI; null when summarize=false. */
summary: {
documentType: "privacy_policy" | "terms_of_service" | "data_processing_agreement" | "cookie_policy" | "acceptable_use_policy" | "subprocessor_list" | "security_policy" | "other";
sellsPersonalData: "yes" | "no" | "not_stated";
sharesDataForAdvertising: "yes" | "no" | "not_stated";
usesDataToTrainAi: "yes" | "no" | "opt_out" | "not_stated";
/** Longest retention period the document states, in days (null when it states none). */
dataRetentionMaxDays: number | null;
deletionOnRequest: "yes" | "no" | "not_stated";
/** Rights the document grants, sorted. */
userRights: Array<"access" | "deletion" | "correction" | "portability" | "opt_out_of_sale" | "objection" | "restriction">;
minimumAge: number | null;
internationalTransfers: "yes" | "no" | "not_stated";
/** Sorted. */
transferMechanisms: Array<"standard_contractual_clauses" | "data_privacy_framework" | "binding_corporate_rules" | "adequacy_decision">;
/** Advance notice of changes to the document, in days. */
changeNoticeDays: number | null;
autoRenewal: "yes" | "no" | "not_stated";
arbitration: "yes" | "no" | "not_stated";
classActionWaiver: "yes" | "no" | "not_stated";
breachNotificationHours: number | null;
subprocessorNoticeDays: number | null;
} | null;
/** Short statements built from `summary` in a fixed order; they change only when a summarised term changes. */
keyPoints: string[];
/** The document was longer than the AI reader takes and only its most relevant parts were read. */
truncated: boolean;
};If what you asked about does not exist, is private, or a search matches nothing, the call still succeeds: output.found is false, output.data is null and output.reason says why. Such misses are free unless the notes below say misses are billed, in which case a miss costs the price of one call.
Example response
Values are placeholders that follow the output schema (strings as "string", numbers as 0); credits shows what this call would cost at the usual price.
{
"output": {
"found": true,
"data": {
"url": "https://example.com/privacy",
"finalUrl": "https://example.com/legal/privacy",
"title": "Privacy Policy",
"lastUpdated": "October 1, 2026",
"lastUpdatedDate": "2026-10-01",
"textHash": "sha256:5f2b1c0e8a7d4b3c2a1f0e9d8c7b6a5f4e3d2c1b0a9f8e7d6c5b4a3f2e1d0c9b",
"wordCount": 4120,
"sections": [
{
"heading": "Information we collect",
"hash": "sha256:0a1b2c3d4e5f60718293a4b5c6d7e8f90a1b2c3d4e5f60718293a4b5c6d7e8f9"
},
{
"heading": "How we share information",
"hash": "sha256:1b2c3d4e5f60718293a4b5c6d7e8f90a1b2c3d4e5f60718293a4b5c6d7e8f90a"
}
],
"summary": {
"documentType": "privacy_policy",
"sellsPersonalData": "no",
"sharesDataForAdvertising": "yes",
"usesDataToTrainAi": "opt_out",
"dataRetentionMaxDays": null,
"deletionOnRequest": "yes",
"userRights": [
"access",
"correction",
"deletion",
"portability"
],
"minimumAge": 13,
"internationalTransfers": "yes",
"transferMechanisms": [
"data_privacy_framework",
"standard_contractual_clauses"
],
"changeNoticeDays": 30,
"autoRenewal": "not_stated",
"arbitration": "not_stated",
"classActionWaiver": "not_stated",
"breachNotificationHours": null,
"subprocessorNoticeDays": null
},
"keyPoints": [
"Document type: privacy policy",
"Sells personal data: no",
"Shares data for advertising: yes",
"Uses data to train AI: opt-out offered",
"Deletion on request: yes",
"User rights: access, correction, deletion, portability",
"Minimum age: 13",
"International transfers: yes (data privacy framework, standard contractual clauses)",
"Notice of changes: 30 days"
],
"truncated": false
}
},
"provider": "PrimaryAPI",
"credits": 1,
"items": 1,
"requestId": "req_01JBXK6Y2N9V8T4R3Q2P1M0A7Z"
}Pricing and reliability
Calls go only to upstreams that are healthy right now. If an attempt fails, the call is retried automatically inside the same request; a failed attempt costs nothing, and a call never costs more than its quote’s maxCredits. Live figures below are measured on real traffic.
Success rate, uptime, latency and call counts are measured live from real traffic over 30 days and show “—” until there is data.
Errors
Errors are JSON { code, error, requestId } and are never charged. The ones to handle for this endpoint:
- invalid_inputThe request failed validation before anything ran.
- unauthorizedNo valid API key or session was presented.
- insufficient_balanceThe balance cannot cover the most this call could cost.
- key_limit_reachedThe key’s own spend limit is used up for the current window.
- trial_cap_reachedAn agent trial key has used its whole trial budget.
- forbiddenThe credential is valid but may not do this.
- not_foundThe thing addressed by the URL does not exist for you.
- idempotency_conflictThe
Idempotency-Keyis already bound to a different request. - rate_limitedToo many requests in the current window.
- all_sources_failedThe call could not be answered, even after automatic retries.
- service_unavailableThis API cannot run in this deployment right now.
- timeoutThe request passed its deadline before it finished.
Notes
Schedule it as a monitor: the output is identical between runs until the policy text changes, then textHash and the changed section hashes move; keyPoints change only when a summarised term changes. A page that does not exist is a free miss (reason not_found). Text read with AI is checked against the page: names and quotes that do not appear in it are dropped. Treat extracted facts as a starting point and confirm them in the source before relying on them. Pages are read the way a polite crawler would: robots.txt is honoured (a disallowed page is a free miss with reason robots_disallowed), requests are paced per site, and only facts, short quotes and source links are returned.
More Company endpoints
Generated from the PrimaryAPI catalog. Machine-readable contract: GET https://api.primaryapi.com/v1/apis/company.policy_changes.