Access
- Request
GET https://api.sports.csap.ai/api/v1/widget/stats- Auth
- Header X-API-Key: <your key> (Authorization: Bearer <key> also works; ?key= is still accepted but discouraged, because the key ends up in URLs and logs)
- External keys
- Requires entitlementThe endpoint and its data domain must be granted to the key; otherwise 403.
- Rate limits
- 3000 per minute · 200000 per day · Set per key (rate_per_min and quota_daily returned by /api/v1/account are authoritative; the numbers above are a trial key's). Beyond them the answer is 429. In addition, heavy requests such as whole-table snapshots and statistics lists without a match id are processed 2 at a time for the whole platform; a request that cannot get a slot receives 429 with Retry-After. Responses do not carry X-RateLimit-* headers for now. See the general guide
Request parameters 0
This endpoint takes no request parameters.
Example request
curl "https://api.sports.csap.ai/api/v1/widget/stats" \ -H "X-API-Key: YOUR_API_KEY"
Try it
Example response
{
"code": 0,
"data": {
"configs": [
{
"config": "wgt_cb6d03be",
"layout_id": "wide",
"name": "文档示例 · 3D 宽屏",
"organization": "外部测试(无内部授权)",
"template_id": "night",
"tokens_today": 3,
"view": "3d",
"views_today": 0
},
{
"config": "wgt_776edb42",
"layout_id": "standard",
"name": "文档示例 · 2.5D 标准",
"organization": "外部测试(无内部授权)",
"template_id": "classic",
"tokens_today": 1,
"view": "2.5d",
"views_today": 0
}
],
"online": 0
},
"message": "success",
"success": true
}Response fields 2
configsarray<object>Statistics per configuration· 8
onlineintegerViewers online now (this instance)
Example: 0Errors
| HTTP | message | When |
|---|---|---|
| 401 | missing API key / unauthorized | No X-API-Key, or the key is invalid or disabled |
| 403 | The live animation widget isn't enabled. Please contact sales. | The organization has no access to the live animation widget, or the access is suspended |
| 403 | explicit endpoint and data-domain entitlement required | This endpoint and its data domain must be enabled separately |
| 429 | rate limit exceeded / daily quota exceeded | The key's per-minute rate or daily quota is exceeded |
| 429 | server busy, retry later | The server's concurrency slots are full (only 2 heavy requests at a time); retry after Retry-After seconds |
| 500 | query error | The query failed on the server; you may retry |