1. Three-Step Reputation Pipeline & GDPR 0-PII Boundary
B2B SaaS, fintech, and vendor-risk teams rarely need to ingest raw HTML or store individual reviewer identities. A clean reputation pipeline chains three verified EdgeData REST endpoints (or their identical MCP tools) on a cron schedule or inside an AI agent:
Resolve Domain Baseline
POST /v1/trustpilot/companies/by-domain resolves stripe.com to trustScore, stars, numberOfReviews, and verification.
Track Flagging Anomalies
POST /v1/trustpilot/companies/transparency exposes reportingStatistics (flagged/removed ratios) and invitation collection mix.
Isolate Verified 1–2 Star Alerts
POST /v1/trustpilot/reviews filters stars: [1, 2], only_verified: true, and language: "en" for high-signal escalation.
Every call to /v1/trustpilot/reviews and trustpilot_get_reviews enforces 0 personal PII sanitization by default (include_personal_data=false). All reviewer consumer identifiers—names, emails, avatars, profile URLs, and consumer IDs—are completely removed before payloads leave the gateway, while organizational metadata such as businessUnit.displayName is preserved for B2B reporting.
2. Production Python Crisis Alerting Script (Direct REST + SDK Equivalent)
The primary tab below uses standard httpx Direct REST against https://api.upp3.com/v1/trustpilot/* so you can copy, paste, and execute immediately in any Python 3.10+ environment with zero proprietary runtime dependencies. The second tab shows the equivalent EdgeDataClient SDK pattern for teams adopting the typed SDK.
Direct REST (httpx) is live and runnable immediately with any EdgeData Direct API key (X-API-Key). Install only pip install httpx, export EDGEDATA_API_KEY (and optional ALERT_WEBHOOK_URL), and run.
import os
import sys
from datetime import datetime, timezone
import httpx
API_BASE = "https://api.upp3.com"
API_KEY = os.environ["EDGEDATA_API_KEY"]
WEBHOOK_URL = os.getenv("ALERT_WEBHOOK_URL") # Optional Slack / Discord / PagerDuty webhook
WATCHLIST = [
{"domain": "stripe.com", "min_trust_score": 2.5, "max_flagged_ratio": 0.15},
]
def post_trustpilot(client: httpx.Client, path: str, payload: dict) -> dict:
resp = client.post(
f"{API_BASE}{path}",
headers={
"X-API-Key": API_KEY,
"Content-Type": "application/json",
},
json=payload,
timeout=30.0,
)
resp.raise_for_status()
return resp.json().get("data", {})
def evaluate_brand(client: httpx.Client, rule: dict) -> dict:
domain = rule["domain"]
# 1) Resolve company baseline with mode="summary" (~80% fewer tokens)
company = post_trustpilot(
client,
"/v1/trustpilot/companies/by-domain",
{"domain": domain, "mode": "summary"},
)
# 2) Fetch transparency / flagging statistics
transparency = post_trustpilot(
client,
"/v1/trustpilot/companies/transparency",
{"domain": domain, "mode": "summary"},
)
# 3) Fetch verified 1-2 star English reviews (0-PII GDPR-safe by default)
critical = post_trustpilot(
client,
"/v1/trustpilot/reviews",
{
"domain": domain,
"stars": [1, 2],
"only_verified": True,
"language": "en",
"page": 1,
"mode": "summary",
},
)
trust_score = float(company.get("trustScore") or 0.0)
reporting = transparency.get("reportingStatistics") or {}
flagged = int(reporting.get("flaggedReviews") or 0)
total_reviews = max(1, int(company.get("numberOfReviews") or 1))
flagged_ratio = round(flagged / total_reviews, 4)
reviews = critical.get("reviews") or critical.get("items") or []
alerts = []
if trust_score and trust_score < rule["min_trust_score"]:
alerts.append(
f"TrustScore dropped to {trust_score} (threshold < {rule['min_trust_score']})"
)
if flagged_ratio > rule["max_flagged_ratio"]:
alerts.append(
f"Flagged review ratio elevated at {flagged_ratio:.1%} ({flagged} flagged)"
)
if len(reviews) >= 3:
alerts.append(
f"{len(reviews)} verified 1-2 star English reviews detected on page 1"
)
return {
"checked_at": datetime.now(timezone.utc).isoformat(),
"domain": domain,
"display_name": company.get("displayName"),
"trust_score": trust_score,
"stars": company.get("stars"),
"flagged_ratio": flagged_ratio,
"verified_critical_sample_count": len(reviews),
"sample_titles": [r.get("title") for r in reviews[:3] if isinstance(r, dict) and r.get("title")],
"pii_included": False,
"alerts": alerts,
}
def dispatch_webhook(client: httpx.Client, report: dict) -> None:
if not WEBHOOK_URL or not report["alerts"]:
return
body = {
"text": (
f"[Trustpilot Crisis Alert] {report['display_name'] or report['domain']} "
f"(TrustScore: {report['trust_score']})\n- "
+ "\n- ".join(report["alerts"])
),
"metadata": report,
}
resp = client.post(WEBHOOK_URL, json=body, timeout=15.0)
resp.raise_for_status()
def main() -> int:
with httpx.Client() as client:
for rule in WATCHLIST:
report = evaluate_brand(client, rule)
print(report)
if report["alerts"]:
dispatch_webhook(client, report)
return 0
if __name__ == "__main__":
sys.exit(main())
import os
from edgedata import EdgeDataClient
# Note: Direct REST (httpx tab) runs immediately with zero SDK install.
# Use EdgeDataClient when adopting the official Python SDK from /ecosystem.
with EdgeDataClient(api_key=os.environ["EDGEDATA_API_KEY"]) as client:
company = client.trustpilot.lookup_company(
domain="stripe.com",
mode="summary",
)
transparency = client.trustpilot.get_transparency(
domain="stripe.com",
mode="summary",
)
critical_reviews = client.trustpilot.get_reviews(
domain="stripe.com",
stars=[1, 2],
only_verified=True,
language="en",
page=1,
mode="summary",
)
print(company["data"]["displayName"], company["data"]["trustScore"])
print("Flagging stats:", transparency["data"].get("reportingStatistics"))
print("0-PII critical review count:", len(critical_reviews["data"].get("reviews", [])))
3. mode="summary" vs Full Payload (~80% Token Savings + 0-PII JSON)
When feeding Trustpilot reviews into Claude, GPT, or an automated root-cause classifier, raw storefront objects contain deeply nested pagination graphs, localization tables, and UI display boilerplate. Passing "mode": "summary" projects only analytical fields and returns estimated_tokens_saved_pct directly in the response.
| Endpoint | Full Payload (mode="raw") |
mode="summary" (Recommended) |
Est. Token Reduction |
|---|---|---|---|
POST /v1/trustpilot/companies/by-domain |
~1,450 tokens (raw profile + category trees) | ~260 tokens (company_id, displayName, trustScore, stars, numberOfReviews) |
~82% saved |
POST /v1/trustpilot/companies/transparency |
~1,150 tokens (full reporting & audit blocks) | ~240 tokens (displayName, reportingStatistics, reviewStatistics) |
~79% saved |
POST /v1/trustpilot/reviews (1–2 star page) |
~4,800 tokens (full review cards & UI metadata) | ~980 tokens (0-PII stripped excerpts, star split, businessUnit.displayName) |
~80% saved |
Sample 0-PII mode="summary" JSON Output
{
"ok": true,
"source": "trustpilot",
"mode": "summary",
"data": {
"source": "trustpilot",
"businessUnit": {
"id": "4bf3f05e00006400050920c5",
"displayName": "Stripe",
"identifyingName": "stripe.com",
"trustScore": 2.2,
"stars": 2.0,
"numberOfReviews": 16420
},
"totalCount": 3180,
"returned_count": 20,
"rating_distribution": { "1": 17, "2": 3 },
"reviews": [
{
"rating": 1,
"title": "Payout reserve held without clear escalation path",
"text": "Verified merchant account experienced a 14-day rolling reserve with delayed support tickets...",
"verified": true,
"language": "en",
"date": "2026-12-04T14:22:00Z"
}
],
"estimated_tokens_saved_pct": 80.4
}
}
4. Claude Desktop & Cursor Hosted MCP Reputation Audit
Prefer an interactive analyst agent over a cron script? Connect Claude or Cursor to EdgeData’s Hosted Streamable HTTP MCP gateway (https://mcp.upp3.com/mcp). The server automatically defaults to mode="summary" across trustpilot_lookup_company, trustpilot_get_transparency, and trustpilot_get_reviews.
{
"mcpServers": {
"edgedata": {
"url": "https://mcp.upp3.com/mcp",
"headers": {
"Authorization": "Bearer YOUR_EDGEDATA_API_KEY"
}
}
}
}
Run a GDPR-safe B2B reputation crisis audit for stripe.com using EdgeData MCP tools (keep mode="summary" on every call): 1. Call trustpilot_lookup_company(domain="stripe.com", mode="summary") to get TrustScore, star rating, and total review volume. 2. Call trustpilot_get_transparency(domain="stripe.com", mode="summary") to inspect review flagging/removal ratios and invitation mix. 3. Call trustpilot_get_reviews(domain="stripe.com", stars=[1, 2], only_verified=true, language="en", page=1, mode="summary"). Deliver an executive risk brief with: - Current TrustScore & transparency red-flag assessment - Top 3 recurring root causes across verified 1-2 star reviews (billing, support SLA, onboarding, payouts) - Severity classification (P1/P2/P3) and recommended customer-success action items - Confirm zero reviewer PII appears in the report.
5. TypeScript (fetch) & cURL Production Snippets
Drop the exact same three-endpoint workflow into Node 18+, Cloudflare Workers, Next.js Route Handlers, or CI shell pipelines.
const API_BASE = "https://api.upp3.com";
const API_KEY = process.env.EDGEDATA_API_KEY ?? "";
async function postTrustpilot<T>(path: string, body: Record<string, unknown>): Promise<T> {
const res = await fetch(`${API_BASE}${path}`, {
method: "POST",
headers: {
"X-API-Key": API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify(body),
});
if (!res.ok) throw new Error(`EdgeData ${path} failed: ${res.status}`);
const json = (await res.json()) as { data: T };
return json.data;
}
export async function auditBrandReputation(domain: string) {
const [company, transparency, critical] = await Promise.all([
postTrustpilot<Record<string, unknown>>("/v1/trustpilot/companies/by-domain", {
domain,
mode: "summary",
}),
postTrustpilot<Record<string, unknown>>("/v1/trustpilot/companies/transparency", {
domain,
mode: "summary",
}),
postTrustpilot<Record<string, unknown>>("/v1/trustpilot/reviews", {
domain,
stars: [1, 2],
only_verified: true,
language: "en",
page: 1,
mode: "summary",
}),
]);
return { company, transparency, critical, piiIncluded: false };
}
auditBrandReputation("stripe.com").then(console.log);
# 1) Domain baseline lookup (mode="summary")
curl -sS -X POST "https://api.upp3.com/v1/trustpilot/companies/by-domain" \
-H "X-API-Key: $EDGEDATA_API_KEY" \
-H "Content-Type: application/json" \
-d '{"domain":"stripe.com","mode":"summary"}'
# 2) Transparency & flagging statistics
curl -sS -X POST "https://api.upp3.com/v1/trustpilot/companies/transparency" \
-H "X-API-Key: $EDGEDATA_API_KEY" \
-H "Content-Type: application/json" \
-d '{"domain":"stripe.com","mode":"summary"}'
# 3) Verified 1-2 star English reviews (0-PII GDPR-safe default)
curl -sS -X POST "https://api.upp3.com/v1/trustpilot/reviews" \
-H "X-API-Key: $EDGEDATA_API_KEY" \
-H "Content-Type: application/json" \
-d '{"domain":"stripe.com","stars":[1,2],"only_verified":true,"language":"en","page":1,"mode":"summary"}'
6. Get Your Instant Free API Key & Run This Recipe
Provision a free EdgeData API key right here in seconds—no credit card required—and drop it into EDGEDATA_API_KEY or your Cursor/Claude MCP config.