{"openapi":"3.1.0","info":{"title":"CyberCredit public API","version":"1.0.0","summary":"Read-only JSON endpoints for public game-account records.","description":"Read-only JSON for game catalogue, account scores and health. API access is granted only by email to cybercreditc@outlook.com, case by case; unauthorised calls are a violation. Demo data (source = demo) must be labelled as such. Rate limit: 10 new lookups per IP per minute; cached reads are not counted.","contact":{"name":"API access","email":"cybercreditc@outlook.com"},"license":{"name":"Proprietary — see https://cybercredit.org/terms"}},"security":[{"bearerAuth":[]}],"servers":[{"url":"https://cybercredit.org"}],"paths":{"/api/games":{"get":{"operationId":"listGames","summary":"List games, scoring dimensions and weights","parameters":[{"name":"lang","in":"query","required":false,"description":"Response language: zh (default) or en.","schema":{"type":"string","enum":["zh","en"]}}],"responses":{"200":{"description":"Game catalogue.","content":{"application/json":{"schema":{"type":"object","required":["site","lang","games"],"properties":{"site":{"type":"string","const":"CyberCredit"},"lang":{"type":"string","enum":["zh","en"]},"games":{"type":"array","items":{"$ref":"#/components/schemas/Game"}}}}}}},"401":{"description":"UNAUTHORIZED — missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/score/{game}/{id}":{"get":{"operationId":"getScore","summary":"Score a single account","description":"Returns the same score and per-dimension reasons the website shows. If less than half of the weight has data, score is null.","parameters":[{"name":"game","in":"path","required":true,"schema":{"type":"string","examples":["steam"]}},{"name":"id","in":"path","required":true,"description":"SteamID64, profile URL or game-native ID (for example a Genshin UID).","schema":{"type":"string"}},{"name":"lang","in":"query","required":false,"description":"Response language: zh (default) or en.","schema":{"type":"string","enum":["zh","en"]}},{"name":"refresh","in":"query","required":false,"description":"Set to 1 to force a refresh. Counts towards the rate limit and is limited to once per account every 30 minutes.","schema":{"type":"string","enum":["1"]}},{"name":"history","in":"query","required":false,"description":"Set to 1 to include the permanent score history (up to 20 snapshots, newest first).","schema":{"type":"string","enum":["1"]}}],"responses":{"200":{"description":"Score result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScoreResponse"}}}},"400":{"description":"INVALID_ID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"UNAUTHORIZED — missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"GAME_NOT_FOUND or NOT_FOUND","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"MODEL_NOT_READY","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED or REFRESH_COOLDOWN","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"UPSTREAM","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/health":{"get":{"operationId":"getHealth","summary":"Liveness probe","responses":{"200":{"description":"Service status.","content":{"application/json":{"schema":{"type":"object","required":["ok","d1","games","dimensions"],"properties":{"ok":{"type":"boolean"},"d1":{"type":"boolean"},"games":{"type":"integer"},"dimensions":{"type":"integer"}}}}}},"401":{"description":"UNAUTHORIZED — missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key issued only by email to cybercreditc@outlook.com; unauthorised calls are a violation."}},"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"message":{"type":"string"}}},"Band":{"type":"object","required":["key","label"],"properties":{"key":{"type":"string","enum":["excellent","good","fair","risky","critical","unknown"]},"label":{"type":"string"}}},"Dimension":{"type":"object","required":["key","label","weight","score","reasons"],"properties":{"key":{"type":"string"},"label":{"type":"string"},"weight":{"type":"number"},"hint":{"type":"string"},"score":{"type":["integer","null"],"minimum":0,"maximum":100},"reasons":{"type":"array","items":{"type":"string"}}}},"Game":{"type":"object","required":["slug","name","status"],"properties":{"slug":{"type":"string"},"name":{"type":"string"},"nameEn":{"type":"string"},"status":{"type":"string","enum":["live","beta","planned"]},"idKind":{"type":"string"},"idLabel":{"type":"string"},"model":{"type":["object","null"],"properties":{"version":{"type":"string"},"dimensions":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"weight":{"type":"number"}}}}}},"dataSources":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"requiresKey":{"type":"boolean"},"status":{"type":"string"}}}}}},"ScoreResponse":{"type":"object","required":["game","score","band","coverage","dimensions","source"],"properties":{"game":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string"},"modelVersion":{"type":"string"}}},"account":{"type":"object","properties":{"id":{"type":"string"},"steamId":{"type":["string","null"]},"persona":{"type":"string"},"avatarUrl":{"type":["string","null"]},"country":{"type":["string","null"]},"createdAt":{"type":["integer","null"]},"bans":{"type":"object"},"steamrep":{"type":["object","null"],"description":"Third-party SteamRep 2024 archive flag. Not a Valve ban; a banned flag caps the score at 30.","properties":{"status":{"type":"string","enum":["banned","caution"]},"detail":{"type":["string","null"]},"source":{"type":"string","const":"steamrep-2024"}}},"gamesCount":{"type":["integer","null"]},"totalPlaytimeMinutes":{"type":["integer","null"]}}},"score":{"type":["integer","null"],"minimum":0,"maximum":100},"rawScore":{"type":["integer","null"]},"cappedBy":{"type":["string","null"]},"reports":{"type":"object","description":"Human-reviewed community reports. A confirmed report sets the score to 0; suspected reports deduct points by count.","properties":{"confirmed":{"type":"integer"},"suspected":{"type":"integer"}}},"reportAdjustment":{"type":"integer","description":"Points deducted by suspected reports."},"overriddenBy":{"type":["string","null"],"description":"Set to reports_confirmed when confirmed reports forced the score to 0."},"band":{"$ref":"#/components/schemas/Band"},"coverage":{"type":"number","minimum":0,"maximum":1},"dimensions":{"type":"array","items":{"$ref":"#/components/schemas/Dimension"}},"source":{"type":"string","enum":["live","demo","mixed"]},"warnings":{"type":"array","items":{"type":"string"}},"cached":{"type":"boolean"},"lang":{"type":"string","enum":["zh","en"]},"fetchedAt":{"type":"string","format":"date-time"},"history":{"type":"array","description":"Present only when ?history=1; newest first.","items":{"type":"object","properties":{"score":{"type":["integer","null"]},"band":{"type":"string"},"coverage":{"type":"number"},"modelVersion":{"type":"string"},"source":{"type":"string"},"fetchedAt":{"type":"string","format":"date-time"}}}}}}}}}