GET/api/v1/widget/options
Live animation widget: views, templates, layouts and modules available to this account
Access
- Request
GET https://api.sports.csap.ai/api/v1/widget/options- 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/options" \ -H "X-API-Key: YOUR_API_KEY"
Try it
Example response
{
"code": 0,
"data": {
"grant": {
"domains": [
"example.com",
"*.example.com"
],
"enabled": true,
"max_concurrent": 20,
"modules": [],
"organization_id": 2,
"organization_name": "外部测试(无内部授权)",
"templates": [],
"updated_at": "2026-11-09T14:22:29.680618Z",
"updated_by": "admin@opendata.local",
"views": [
"2.5d",
"3d"
]
},
"layouts": [
{
"description": "舞台 + 比分条 + 数据页签",
"enabled": true,
"id": "standard",
"min_width": 320,
"name": "标准",
"ratio_25d": "800:280",
"ratio_3d": "16:9",
"sort": 1,
"tab_order": [
"stats",
"timeline",
"scene"
],
"updated_at": "2026-11-09T14:13:45.452135Z",
"updated_by": "",
"views": [
"2.5d",
"3d"
]
},
{
"description": "舞台在左,数据面板在右侧常驻",
"enabled": true,
"id": "wide",
"min_width": 320,
"name": "宽屏",
"ratio_25d": "800:280",
"ratio_3d": "16:9",
"sort": 2,
"tab_order": [
"stats",
"timeline",
"scene"
],
"updated_at": "2026-11-09T14:13:45.452135Z",
"updated_by": "",
"views": [
"2.5d",
"3d"
]
},
{
"description": "只有舞台和比分条",
"enabled": true,
"id": "compact",
"min_width": 320,
"name": "紧凑",
"ratio_25d": "800:280",
"ratio_3d": "16:9",
"sort": 3,
"tab_order": [
"stats",
"timeline",
"scene"
],
"updated_at": "2026-11-09T14:13:45.452135Z",
"updated_by": "",
"views": [
"2.5d",
"3d"
]
}
],
"modules": [
{
"allowed": true,
"id": "scorebar",
"only_25d": false
},
{
"allowed": true,
"id": "sceneLabel",
"only_25d": true
},
{
"allowed": true,
"id": "eventCard",
"only_25d": false
}
],
"templates": [
{
"allowed": true,
"enabled": true,
"id": "classic",
"name": "官方经典",
"sort": 1,
"theme": {
"accent": "#ffb400",
"away": "#01bdff",
"bg": "#333333",
"home": "#fdbf04",
"pitch": "classic",
"text": "#ffffff"
},
"tier": "trial",
"updated_at": "2026-11-09T14:13:45.452135Z",
"updated_by": ""
},
{
"allowed": true,
"enabled": true,
"id": "night",
"name": "夜间",
"sort": 2,
"theme": {
"accent": "#a3e635",
"away": "#f472b6",
"bg": "#0f1419",
"home": "#22d3ee",
"pitch": "dark",
"text": "#e5e7eb"
},
"tier": "trial",
"updated_at": "2026-11-09T14:13:45.452135Z",
"updated_by": ""
},
{
"allowed": true,
"enabled": true,
"id": "flat",
"name": "简约平面",
"sort": 3,
"theme": {
"accent": "#f59e0b",
"away": "#ef4444",
"bg": "#f3f4f6",
"home": "#2563eb",
"pitch": "flat",
"text": "#111827"
},
"tier": "pro",
"updated_at": "2026-11-09T14:13:45.452135Z",
"updated_by": ""
}
],
"views": [
"2.5d",
"3d"
]
},
"message": "success",
"success": true
}Response fields 5
grantobjectWhat is enabled for this organization· 10
layoutsarray<object>Layout list· 12
modulesarray<object>Data modules switched on· 3
templatesarray<object>Template list· 9
viewsarrayAvailable views (2.5d / 3d)
Errors
| 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 |