PolicyCheck API
Pre-purchase seller policy verification for AI agents. Analyzes return policies, shipping terms, terms of service, and privacy policies — returns structured risk data so your agent can make informed purchasing decisions.
Design principle: PolicyCheck is an intelligence provider, not a gatekeeper. It returns factual risk classifications and scores — your agent decides what to do with them. No purchase recommendations, no "safe to buy" verdicts.
Base URL:
https://policycheck.toolsQuick Start
Analyze a seller by URL — PolicyCheck auto-discovers and fetches return, shipping, terms, and privacy policy pages:
curl -X POST https://policycheck.tools/api/check \
-H "Content-Type: application/json" \
-d '{"url": "https://amazon.com"}'Or provide policy text directly for highest-confidence analysis:
curl -X POST https://policycheck.tools/api/check \
-H "Content-Type: application/json" \
-d '{"policy_text": "All sales are final. No refunds. 25% restocking fee."}'Endpoints
POST /api/check
Primary REST endpoint. Accepts a seller URL or raw policy text and returns a full risk assessment. Supports CORS for browser-based clients.
Request Body
| Field | Type | Description |
|---|---|---|
| url | string | Seller homepage URL. PolicyCheck auto-discovers policy pages. |
| seller_url | string | Alias for url. |
| policy_text | string | Raw policy text to analyze directly. Higher confidence than URL fetch. |
| text | string | Alias for policy_text. |
Provide at least one of url/seller_url or policy_text/text. Both can be provided together.
Response
{
"seller_url": "https://amazon.com",
"risk_score": 1.5, // number | null — 0-10 scale
"risk_level": "low", // "low" | "medium" | "high" | "critical" | "unknown"
"buyer_protection_rating": "A", // string | null — letter grade A+ through F
"buyer_protection_score": 85, // number | null — 0-100 (inverse of risk)
"risk_factors": [
{
"factor": "return_shipping_fee", // clause type identifier
"severity": "low", // "high" | "medium" | "low"
"detail": "Buyer pays return shipping costs.",
"source": "returns", // "returns" | "legal" | "pricing" | "privacy" | "shipping"
"found_in": "return_policy", // which policy page contained this clause
"severity_note": null // "standard_tos_boilerplate" when severity was discounted
}
],
"positives": [ // consumer-friendly policies found
"Free shipping on orders over $25"
],
"summary": "3 of 4 policy categories analyzed. Return shipping fee detected.",
"flags": ["return_shipping_fee"], // flat array of clause type names
"fetch_method": "server_fetch", // "server_fetch" | "client_provided" | "text_input"
"analysis_status": "partial", // "complete" | "partial" | "no_content" | "text_provided"
"confidence": "medium", // "high" | "medium" | "low" | "none"
"analysis_method": "regex_plus_llm", // "regex_plus_llm" | "regex_only" | "none"
"analyzed_at": "2026-02-16T11:29:53Z" // ISO 8601 timestamp
}When analysis_status is "no_content", risk_score, buyer_protection_rating, and buyer_protection_score will be null. See Response Fields for details.
POST /api/a2a
JSON-RPC 2.0 endpoint implementing the Agent-to-Agent (A2A) protocol. For agent frameworks that support A2A discovery and task delegation.
Agent card: https://policycheck.tools/.well-known/agent.json
Request
curl -X POST https://policycheck.tools/api/a2a \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": "1",
"method": "message/send",
"params": {
"message": {
"role": "user",
"parts": [
{
"kind": "data",
"data": { "seller_url": "https://amazon.com" }
}
]
}
}
}'The response includes a completed task with both a human-readable text summary and a structured data artifact containing the same fields as /api/check. You can also send natural language — the endpoint extracts URLs from text parts.
POST /api/x402/analyze
Paid analysis endpoint using the x402 micropayment protocol. First request returns HTTP 402 with payment requirements. After paying on Base mainnet, re-send with the X-PAYMENT header.
| Price | $0.03 per analysis |
| Network | Base mainnet (eip155:8453) |
| Body fields | url, sellerUrl, seller_url, text, or policy_text |
The response wraps the analysis inside a payment + analysis envelope:
{
"payment": {
"settled": true,
"transaction": "0x...",
"network": "eip155:8453",
"payer": "0x..."
},
"analysis": {
"risk_score": 1.5,
"risk_level": "low",
"flags": ["return_shipping_fee"],
... // same fields as /api/check
}
}GET /api/clause-registry
Returns the versioned registry of all clause types PolicyCheck can detect. Use this to build rules against stable identifiers. Cached for 24 hours.
curl https://policycheck.tools/api/clause-registrySee the full registry contents in the Clause Registry section below.
Response Fields Deep Dive
flags
The primary field for rule-based agents. A flat string array of detected clause type identifiers. An agent with a user preference of "never buy from sellers with binding arbitration" just checks:
if (result.flags.includes("binding_arbitration")) {
// abort purchase or ask human for confirmation
}analysis_status + confidence
Critical for agents to check before trusting scores. If analysis_status === "no_content", the scores are null and should not be used for decisions. The agent should fall back to browser-based analysis or flag for human review.
| Status | Confidence | Meaning |
|---|---|---|
complete | high | All policy categories fetched and analyzed. |
partial | medium / low | Some policy pages fetched. Score reflects only what was found. |
text_provided | high | Agent provided the policy text. Highest trust. |
no_content | none | No text extracted. All scores are null. Do not use for decisions. |
fetch_method
Indicates data provenance:
| Value | Meaning |
|---|---|
server_fetch | PolicyCheck fetched and parsed the policies from the seller's site. |
client_provided | The calling agent provided policy text along with a URL. Higher trust — the agent likely rendered the page in a browser. |
text_input | Raw text provided without a URL. |
found_in + severity_note
On each risk factor, found_in indicates which policy page contained the clause: return_policy, shipping_policy, terms_of_service, privacy_policy, or unknown.
When severity_note is "standard_tos_boilerplate", the clause was found in terms of service and its severity was discounted in scoring. Standard legal clauses like binding arbitration appear in nearly every major retailer's ToS — they're still reported as findings but scored as low severity rather than high.
Clause Registry
All clause types PolicyCheck can detect. Identifiers are stable within a major version — agent developers can safely write rules against these names. Current version: 1.0.1
Live endpoint: GET https://policycheck.tools/api/clause-registry
| Clause Type | Category | Description | Severity |
|---|---|---|---|
| binding_arbitration | legal | Disputes must be resolved through binding arbitration, not courts | high |
| class_action_waiver | legal | Buyer waives right to participate in class action lawsuits | high |
| liability_cap | legal | Seller limits maximum liability, often to purchase price or a fixed amount | medium |
| termination_at_will | legal | Seller can terminate account or service at any time without cause | medium |
| jurisdiction_clause | legal | Disputes must be resolved in a specific jurisdiction chosen by seller | low |
| auto_renewal | legal | Subscription or service automatically renews unless cancelled | low |
| no_returns | returns | Seller does not accept returns at all | high |
| final_sale | returns | All sales are final, no refunds or exchanges | high |
| no_refund | returns | All sales are final, no refunds provided | high |
| no_refund_opened | returns | Opened or used items cannot be returned for a refund | high |
| restocking_fee | returns | A percentage fee is deducted from refund on returned items | medium |
| return_shipping_fee | returns | Buyer must pay shipping costs to return items | medium |
| short_return_window | returns | Return window is shorter than the industry standard 30 days | low |
| exchange_only | returns | Returns result in exchange or store credit only, no cash refund | medium |
| store_credit_only | returns | Refunds issued as store credit rather than original payment method | medium |
| non_refundable_categories | returns | Certain product categories are excluded from returns/refunds | medium |
| price_adjustment_clause | pricing | Seller reserves right to adjust prices after purchase | high |
| hidden_fees | pricing | Additional fees not clearly disclosed upfront | high |
| data_selling | privacy | Seller sells or shares personal data with third parties for profit | high |
| broad_data_collection | privacy | Seller collects more personal data than necessary for the transaction | medium |
| no_tracking | shipping | No shipment tracking provided | medium |
| long_handling_time | shipping | Unusually long handling or processing time before shipment | low |
Scoring System
Risk scores are calculated deterministically from detected risk factors — the LLM identifies clauses, but the score comes from a fixed formula:
Severity Weights
| Severity | Weight | Example |
|---|---|---|
| high | +2.0 | no_refund, binding_arbitration, hidden_fees |
| medium | +1.0 | restocking_fee, store_credit_only, data_selling |
| low | +0.5 | return_shipping_fee, jurisdiction_clause |
Risk score is the sum of all weights, capped at 10. A seller with 3 high-severity clauses and 1 medium scores: 2.0 + 2.0 + 2.0 + 1.0 = 7.0.
Grade Scale
| Risk Score | Grade | Risk Level |
|---|---|---|
| 0 – 1 | A+ | low |
| 1.1 – 2 | A | low |
| 2.1 – 3 | B+ | medium |
| 3.1 – 4 | B | medium |
| 4.1 – 5 | C+ | medium |
| 5.1 – 6 | C | medium |
| 6.1 – 7 | D+ | high |
| 7.1 – 8 | D | high |
| 8.1 – 10 | F | critical |
Buyer Protection Score
buyer_protection_score = 100 - (risk_score × 10), clamped to 0–100. A risk score of 1.5 yields a buyer protection score of 85.
ToS Boilerplate Discounting
When analyzing via URL (not raw text), certain legal clauses found only in the terms of service page are downgraded to low severity. These clauses appear in virtually every major retailer's ToS and inflate scores when treated as high severity:
binding_arbitrationclass_action_waivertermination_at_willliability_cap
These clauses are still reported in risk_factors with their original severity, but the severity_note field is set to "standard_tos_boilerplate" and scoring uses low weight (0.5 instead of 2.0).
Signed Assessments
PolicyCheck supports cryptographically signed seller policy assessments. Agents can request a signed assessment and present it as verifiable proof of seller policy analysis during checkout.
POST /api/v1/signed-assessment
Returns an Ed25519-signed seller assessment envelope. The assessment includes risk scores, flags, and buyer protection data. Signatures use canonical JSON (sorted keys, no whitespace) and expire after 5 minutes.
Request
curl -X POST https://policycheck.tools/api/v1/signed-assessment \
-H "Content-Type: application/json" \
-d '{"seller_url": "https://amazon.com"}'Response
{
"signed_assessment": {
"version": "1.0",
"provider": "policycheck.tools",
"assessment_id": "550e8400-e29b-41d4-a716-446655440000",
"timestamp": "2026-02-22T10:00:00.000Z",
"expires_at": "2026-02-22T10:05:00.000Z",
"seller": { "domain": "amazon.com", "url": "https://amazon.com" },
"flags": ["return_shipping_fee"],
"risk_factors_summary": { "returns": 1 },
"risk_score": 0.5,
"risk_level": "low",
"buyer_protection_score": 95,
"buyer_protection_rating": "A+",
"risk_factors": [...],
"positives": [...],
"analysis_status": "complete",
"confidence": "high"
},
"signature": "base64url-ed25519-signature",
"signed_payload_hash": "sha256:abc123...",
"verification_url": "https://policycheck.tools/api/v1/verify",
"jwks_url": "https://policycheck.tools/.well-known/jwks.json"
}POST /api/v1/verify
Stateless signature verification. Pass the signed_assessment object and signature from the signed-assessment response. Checks both expiry and Ed25519 signature validity. No database or state required.
curl -X POST https://policycheck.tools/api/v1/verify \
-H "Content-Type: application/json" \
-d '{"signed_assessment": {...}, "signature": "..."}'// Valid
{ "valid": true, "assessment_id": "...", "seller_domain": "amazon.com",
"expires_at": "2026-02-22T10:05:00.000Z", "verified_at": "2026-02-22T10:01:00.000Z" }
// Expired or invalid
{ "valid": false, "reason": "Assessment has expired" }GET /.well-known/jwks.json
Returns the Ed25519 public key in standard JWKS format (OKP/Ed25519). Use this to verify signatures independently without calling the verify endpoint. Cached for 1 hour.
{
"keys": [{
"kty": "OKP",
"crv": "Ed25519",
"use": "sig",
"kid": "policycheck-1",
"x": "base64url-encoded-public-key"
}]
}Signed Assessment Example
// 1. Get signed assessment
const result = await fetch("https://policycheck.tools/api/v1/signed-assessment", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ url: sellerUrl }),
}).then(r => r.json());
// 2. Present at checkout alongside agent identity
const checkoutPayload = {
agent_identity: myAgentToken,
seller_assessment: result.signed_assessment,
seller_assessment_signature: result.signature,
seller_assessment_jwks: result.jwks_url,
};
// 3. Merchant/payment processor can verify independently
const verification = await fetch(result.verification_url, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
signed_assessment: result.signed_assessment,
signature: result.signature,
}),
}).then(r => r.json());
// { valid: true, assessment_id: "...", seller_domain: "amazon.com" }Integration Patterns
Pattern 1: Pre-purchase Check
const result = await fetch("https://policycheck.tools/api/check", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ url: sellerUrl }),
}).then(r => r.json());
if (result.analysis_status === "no_content") {
// Can't analyze — ask human or try browser-based approach
return askHuman(`Could not analyze ${sellerUrl}. Proceed anyway?`);
}
if (result.risk_level === "critical") {
return abort("Seller has critical risk indicators");
}
proceed();Pattern 2: Threshold-based Automation
const MIN_SCORE = 70;
if (result.buyer_protection_score === null) {
return askHuman("Unable to verify seller policies.");
}
if (result.buyer_protection_score >= MIN_SCORE) {
proceed(); // score 85 → auto-approve
} else {
askHuman(`Buyer protection score is ${result.buyer_protection_score}/100.`);
}Pattern 3: Dealbreaker Flags
const DEALBREAKERS = ["no_refund", "no_returns", "hidden_fees"];
const matched = result.flags.filter(f => DEALBREAKERS.includes(f));
if (matched.length > 0) {
abort(`Dealbreaker policies found: ${matched.join(", ")}`);
} else {
proceed();
}Discovery & Protocols
PolicyCheck is available through multiple discovery mechanisms and protocols:
| Method | URL / Identifier | Protocol |
|---|---|---|
| REST API | POST policycheck.tools/api/check | HTTP |
| A2A Agent Card | policycheck.tools/.well-known/agent.json | A2A |
| x402 Payments | POST policycheck.tools/api/x402/analyze | x402 |
| MCP Server | npx policycheck-mcp | MCP |
| Chrome Extension | Chrome Web Store | WebMCP |
| OpenAPI Spec | policycheck.tools/openapi.json | OpenAPI |
| Signed Assessment | POST policycheck.tools/api/v1/signed-assessment | Signed |
| Verify | POST policycheck.tools/api/v1/verify | Signed |
| JWKS | GET policycheck.tools/.well-known/jwks.json | Signed |
| Clause Registry | GET policycheck.tools/api/clause-registry | HTTP |
Rate Limits & Pricing
Free during beta. The /api/check and /api/a2a endpoints are currently free with no enforced rate limits. The /api/x402/analyze endpoint charges $0.03 per analysis via on-chain micropayment.
Results are cached by domain for 24 hours on the server side. Repeated requests for the same seller URL return cached results instantly. Providing policy_text bypasses the cache.
Important Notes
- 1.Intelligence provider, not gatekeeper. PolicyCheck returns factual risk classifications and scores. It does not make purchase recommendations or issue "safe to buy" verdicts. Your agent decides what to do with the data.
- 2.Always check
analysis_status. Scores reflect only what could be analyzed. Anullscore means "no data", not "perfect seller." Never treat missing data as a positive signal. - 3.JavaScript-rendered sites. Server-side fetching cannot analyze SPAs or bot-protected sites (e.g., Temu, Best Buy). For these, use the Chrome extension or provide
policy_textdirectly from a browser context. - 4.Not legal advice. PolicyCheck identifies policy clauses and classifies risk levels. It is not a substitute for legal counsel.
PolicyCheck · GitHub · Agent Card · Clause Registry