API Documentation

Width Screening Intelligence API v1.0 — sanctions, PEP, criminal records, adverse media, real-time news

Authentication Registration Screening Search & Entity Account Rate Limits Decision Logic Errors
Authentication

All API calls (except /v1/register) require an API key passed via the X-API-Key header.

HTTP Header
X-API-Key: your-uuid-api-key

Get a key instantly at /register or via POST /v1/register.

Registration Flow

1. Register (get a UUID key) → 2. Use key in headers → 3. Optionally upgrade tier for higher limits.

POST/v1/register NO AUTH
Register a new API key. No authentication required. Returns your key immediately.
namestring *Your name or company name
emailstringEmail (optional). Providing one upgrades to 500/day tier.
curl example
# Register (no email = 300/day free tier)
curl -X POST http://localhost:8899/v1/register \
  -H "Content-Type: application/json" \
  -d '{"name": "Acme Corp"}'

# Register with email (500/day email tier)
curl -X POST http://localhost:8899/v1/register \
  -H "Content-Type: application/json" \
  -d '{"name": "Acme Corp", "email": "compliance@acme.com"}'
Response
{
  "api_key": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "name": "Acme Corp",
  "email": "compliance@acme.com",
  "tier": "email",
  "daily_limit": 500,
  "status": "active",
  "created_at": "2026-03-30T12:00:00+00:00"
}
Screening API

Submit a name for full KYC due diligence. The screening runs asynchronously (40-120s). Poll for results.

POST/v1/screening API KEY
Submit a KYC screening task. Returns task ID immediately, runs in background.
namestring *Primary name (Chinese or English)
countrystringISO code (CN, SG, HK, JP, KR, TH, AE, US, UK) — targeted source selection
industrystring"crypto", "banking", "insurance", etc. — industry-specific sources
aliasesstring[]Additional name variants, e.g. ["CZ", "Changpeng Zhao"]
contextstringBackground for disambiguation ("Founder of Binance...")
thresholdfloatFuzzy match minimum (default 0.3)
curl example
curl -X POST http://localhost:8899/v1/screening \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_KEY" \
  -d '{
    "name": "赵长鹏",
    "country": "CN",
    "industry": "crypto",
    "aliases": ["CZ", "Changpeng Zhao"],
    "context": "Founder of Binance, world largest crypto exchange"
  }'
Response (immediate)
{
  "id": "ee508b37-1234-5678-abcd-ef1234567890",
  "status": "processing",
  "query": "赵长鹏"
}
GET/v1/screening/{id} API KEY
Poll screening status and result. Call every 3-5 seconds until status != "processing".
statusstring"processing" | "completed" | "failed"
result.decisionstringAPPROVE | ENHANCED_REVIEW | EDD | MANDATORY_EDD | REJECT
result.risk_levelstringnone | low | medium | high | severe
result.decision_reasonsstring[]Human-readable audit trail of decision logic
result.risk_level_reasonsstring[]Factors contributing to risk level
result.sanctionsobject{hit: bool, triggers: [{type, entity, similarity, detail}]}
result.pepobject{hit: bool, triggers: [{entity, detail: [{position, jurisdiction}]}]}
result.convictedobject{hit: bool, triggers: [{entity, detail}]}
result.adverse_mediaobject{hit: bool, triggers: [{entity, count, max_severity, entries}]}
result.relationshipsobject{hit: bool, triggers: [{entity, relationship, risk}]}
result.live_newsobject{articles: [{headline, source, date, severity, url, verified}]}
curl example — poll
curl -H "X-API-Key: YOUR_KEY" \
  http://localhost:8899/v1/screening/ee508b37-1234-5678-abcd-ef1234567890
Response (completed)
{
  "id": "ee508b37-...",
  "status": "completed",
  "query": "赵长鹏",
  "result": {
    "decision": "EDD",
    "decision_label": "Enhanced Due Diligence Required",
    "risk_level": "high",
    "sanctions": { "hit": false, "triggers": [] },
    "pep": { "hit": false, "triggers": [] },
    "convicted": { "hit": true, "triggers": [...] },
    "adverse_media": { "hit": true, "triggers": [...] },
    "live_news": { "articles": [...] },
    "decision_reasons": ["Criminal record: conviction on record", ...],
    "risk_level_reasons": ["HIGH adverse media severity", ...]
  }
}
GET/v1/screening/{id}/report API KEY
Get a formatted Markdown screening report. Content-Type: text/markdown. Only available when status is "completed".
curl example
curl -H "X-API-Key: YOUR_KEY" \
  http://localhost:8899/v1/screening/ee508b37-.../report
Account Management

Upgrade your tier and check usage. All endpoints require your API key.

POST/v1/account/bind-email API KEY
Bind an email address to upgrade from Free (300/day) to Email tier (500/day).
emailstring *Email address to bind
curl example
curl -X POST http://localhost:8899/v1/account/bind-email \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_KEY" \
  -d '{"email": "compliance@acme.com"}'
POST/v1/account/survey API KEY
Complete a short survey to upgrade to Survey tier (1000/day). Must have email tier first.
answersobjectSurvey answers (freeform key-value)
curl example
curl -X POST http://localhost:8899/v1/account/survey \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_KEY" \
  -d '{"answers": {"use_case": "compliance", "company_size": "50-200"}}'
GET/v1/account/usage API KEY
Check current daily usage, remaining quota, tier, and status.
curl example
curl -H "X-API-Key: YOUR_KEY" \
  http://localhost:8899/v1/account/usage
Response
{
  "used_today": 42,
  "daily_limit": 500,
  "remaining": 458,
  "tier": "email",
  "email": "compliance@acme.com",
  "status": "active"
}
Rate Limits

Each API key has a daily request limit based on its tier. When the limit is exceeded, you'll receive a 429 Too Many Requests response.

Tier Daily Limit Requirement
Free300 / dayName only
Email500 / dayProvide email address
Survey1,000 / dayComplete short survey

Every response includes rate limit headers:

Response Headers
X-RateLimit-Limit: 500       # Your daily limit
X-RateLimit-Remaining: 458   # Requests remaining today

When quota is exceeded:

429 Response
HTTP/1.1 429 Too Many Requests
Retry-After: 86400
X-RateLimit-Limit: 300
X-RateLimit-Remaining: 0

{
  "detail": "Daily quota exceeded (300/day). Upgrade at /register."
}

Quotas reset at midnight UTC. Upgrade your tier to increase limits.

Decision Hierarchy

The screening engine applies checks in priority order. The highest-priority match determines the final decision.

1
REJECTSanctioned entity or convicted criminal
2
MANDATORY_EDDPolitically Exposed Person (PEP)
3
EDDHIGH or SEVERE adverse media / live news
4
ENHANCED_REVIEWMEDIUM adverse media
5
APPROVENo risk indicators found
Error Responses
Status Meaning Action
401Missing or invalid API keyRegister at /register
403API key suspended or bannedContact admin
404Screening task or entity not foundCheck the UUID
429Daily quota exceededWait until UTC midnight or upgrade tier
500Internal server errorRetry or report the issue
Error Response Format
{
  "detail": "Human-readable error message"
}
Base URL: http://localhost:8899 · Get API Key ·