PolicyCheckAPI Documentation

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.tools

Quick 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

FieldTypeDescription
urlstringSeller homepage URL. PolicyCheck auto-discovers policy pages.
seller_urlstringAlias for url.
policy_textstringRaw policy text to analyze directly. Higher confidence than URL fetch.
textstringAlias 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
NetworkBase mainnet (eip155:8453)
Body fieldsurl, 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-registry

See 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.

StatusConfidenceMeaning
completehighAll policy categories fetched and analyzed.
partialmedium / lowSome policy pages fetched. Score reflects only what was found.
text_providedhighAgent provided the policy text. Highest trust.
no_contentnoneNo text extracted. All scores are null. Do not use for decisions.

fetch_method

Indicates data provenance:

ValueMeaning
server_fetchPolicyCheck fetched and parsed the policies from the seller's site.
client_providedThe calling agent provided policy text along with a URL. Higher trust — the agent likely rendered the page in a browser.
text_inputRaw 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 TypeCategoryDescriptionSeverity
binding_arbitrationlegalDisputes must be resolved through binding arbitration, not courtshigh
class_action_waiverlegalBuyer waives right to participate in class action lawsuitshigh
liability_caplegalSeller limits maximum liability, often to purchase price or a fixed amountmedium
termination_at_willlegalSeller can terminate account or service at any time without causemedium
jurisdiction_clauselegalDisputes must be resolved in a specific jurisdiction chosen by sellerlow
auto_renewallegalSubscription or service automatically renews unless cancelledlow
no_returnsreturnsSeller does not accept returns at allhigh
final_salereturnsAll sales are final, no refunds or exchangeshigh
no_refundreturnsAll sales are final, no refunds providedhigh
no_refund_openedreturnsOpened or used items cannot be returned for a refundhigh
restocking_feereturnsA percentage fee is deducted from refund on returned itemsmedium
return_shipping_feereturnsBuyer must pay shipping costs to return itemsmedium
short_return_windowreturnsReturn window is shorter than the industry standard 30 dayslow
exchange_onlyreturnsReturns result in exchange or store credit only, no cash refundmedium
store_credit_onlyreturnsRefunds issued as store credit rather than original payment methodmedium
non_refundable_categoriesreturnsCertain product categories are excluded from returns/refundsmedium
price_adjustment_clausepricingSeller reserves right to adjust prices after purchasehigh
hidden_feespricingAdditional fees not clearly disclosed upfronthigh
data_sellingprivacySeller sells or shares personal data with third parties for profithigh
broad_data_collectionprivacySeller collects more personal data than necessary for the transactionmedium
no_trackingshippingNo shipment tracking providedmedium
long_handling_timeshippingUnusually long handling or processing time before shipmentlow

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

SeverityWeightExample
high+2.0no_refund, binding_arbitration, hidden_fees
medium+1.0restocking_fee, store_credit_only, data_selling
low+0.5return_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 ScoreGradeRisk Level
0 – 1A+low
1.1 – 2Alow
2.1 – 3B+medium
3.1 – 4Bmedium
4.1 – 5C+medium
5.1 – 6Cmedium
6.1 – 7D+high
7.1 – 8Dhigh
8.1 – 10Fcritical

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_arbitration
  • class_action_waiver
  • termination_at_will
  • liability_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.

Agent → PolicyCheck → signed assessment → Agent presents at checkout → Merchant/payment verifies signature

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

User → Agent → finds product → PolicyCheck → risk report → Agent decides → purchase or abort
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

Agent has rule: buyer_protection_score >= 70 → auto-proceed | < 70 → ask human
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

Agent has dealbreakers → check flags → match found → abort | no match → proceed
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:

MethodURL / IdentifierProtocol
REST APIPOST policycheck.tools/api/checkHTTP
A2A Agent Cardpolicycheck.tools/.well-known/agent.jsonA2A
x402 PaymentsPOST policycheck.tools/api/x402/analyzex402
MCP Servernpx policycheck-mcpMCP
Chrome ExtensionChrome Web StoreWebMCP
OpenAPI Specpolicycheck.tools/openapi.jsonOpenAPI
Signed AssessmentPOST policycheck.tools/api/v1/signed-assessmentSigned
VerifyPOST policycheck.tools/api/v1/verifySigned
JWKSGET policycheck.tools/.well-known/jwks.jsonSigned
Clause RegistryGET policycheck.tools/api/clause-registryHTTP

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. A null score 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_text directly 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