Description
Returns match events, match statistics and text commentary for the last 120 minutes (full update)
ps: matches outside the 120 minutes are returned as well when their data changes
Suggested frequency: once every 2 seconds
Match minute formula
First half: minute = (now - first-half kick-off timestamp) / 60 + 1
Second half: minute = (now - second-half kick-off timestamp) / 60 + 45 + 1
Extra time: minute = (now - extra-time kick-off timestamp) / 60 + 90 + 1
stats: match statistics
Includes: corners, yellow cards, red cards, penalties, shots on target, shots off target, attacks, dangerous attacks, possession, shots blocked
incidents: match events
Includes: yellow card, second yellow card, red card, goal (assist), substitution, penalty, missed penalty, own goal, VAR, half-time, stoppage time, full-time, end of extra time, end of penalty shoot-out, drinks break
tlive: text commentary
Includes: yellow card, red card, goal, substitution, corner, offside, assist, kick-off, half-time, full-time and others
ps: matches outside the 120 minutes are returned as well when their data changes
Suggested frequency: once every 2 seconds
Match minute formula
First half: minute = (now - first-half kick-off timestamp) / 60 + 1
Second half: minute = (now - second-half kick-off timestamp) / 60 + 45 + 1
Extra time: minute = (now - extra-time kick-off timestamp) / 60 + 90 + 1
stats: match statistics
Includes: corners, yellow cards, red cards, penalties, shots on target, shots off target, attacks, dangerous attacks, possession, shots blocked
incidents: match events
Includes: yellow card, second yellow card, red card, goal (assist), substitution, penalty, missed penalty, own goal, VAR, half-time, stoppage time, full-time, end of extra time, end of penalty shoot-out, drinks break
tlive: text commentary
Includes: yellow card, red card, goal, substitution, corner, offside, assist, kick-off, half-time, full-time and others
Access
- Request
GET https://api.sports.csap.ai/api/v1/matches/realtime/events- 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
- Available (scoped)External keys can call it, but only data inside the open scope is returned.
- 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/matches/realtime/events" \ -H "X-API-Key: YOUR_API_KEY"
Try it
Example response
{
"code": 0,
"data": [
{
"add_time": null,
"added_time": null,
"assist2_name": null,
"assist_name": null,
"away": null,
"away_score": null,
"confirmed": null,
"data": null,
"home": null,
"home_score": null,
"id": 1,
"incident_class": null,
"incident_type": "goal",
"incidents": null,
"injury_length": null,
"is_home": false,
"main": null,
"match_source": "S3",
"player_id": null,
"player_in": null,
"player_name": null,
"player_out": null,
"position": null,
"reason": null,
"reason_type": null,
"score": null,
"second": null,
"seq": 7337779521,
"stats": null,
"text": null,
"time": 8,
"tlive": null,
"type": null,
"updated_at": 1793771299665,
"var_reason": null,
"var_result": null
},
{
"add_time": null,
"added_time": null,
"assist2_name": null,
"assist_name": null,
"away": null,
"away_score": null,
"confirmed": null,
"data": null,
"home": null,
"home_score": null,
"id": 2,
"incident_class": null,
"incident_type": "corner_kick",
"incidents": null,
"injury_length": null,
"is_home": true,
"main": null,
"match_source": "S3",
"player_id": null,
"player_in": null,
"player_name": null,
"player_out": null,
"position": null,
"reason": null,
"reason_type": null,
"score": null,
"second": null,
"seq": 7317951341,
"stats": null,
"text": null,
"time": 12,
"tlive": null,
"type": null,
"updated_at": 1793771299666,
"var_reason": null,
"var_result": null
}
],
"message": "success",
"success": true
}Response fields 37
add_timenullnullableStoppage time (present for stoppage-time events and events during stoppage time)
added_timenullnullableStoppage-time minutes
assist2_namenullnullable
assist_namenullnullable
awaynullnullableAway team value
away_scorenullnullableAway team score (regular time, including stoppage time)
confirmednullnullableWhether the lineup is confirmed
datanullnullableEvent text
homenullnullableHome team value
home_scorenullnullableHome team score (regular time, including stoppage time)
idintegerRecord id; paging cursor (the id parameter returns records >= this value). In match endpoints it is the platform match id (gmid)
Example: 1incident_classnullnullable
incident_typestringEvent type
Example: "goal"incidentsnullnullableMatch events; may be absent
injury_lengthnullnullableStoppage-time minutes
is_homeboolean
Example: falsemainnullnullableImportant event: 1 yes, 0 no
match_sourcestringSource code of this row
Example: "S3"gmidintegernullablePlatform match id (gmid, unique across the platform)
player_idnullnullablePlayer id
player_innullnullablePlayer coming on
player_namenullnullablePlayer name
player_outnullnullablePlayer going off
positionnullnullablePosition
reasonnullnullableReason
reason_typenullnullableReason for a card or substitution, see status codes -> event reasons (present for card and substitution events)
scorenullnullableScore
secondnullnullableTime
seqintegerSequence number
Example: 7337779521statsnullnullableStatistic item
textnullnullable
timeintegerTime / minute
Example: 8tlivenullnullableText commentary; may be absent
typenullnullableType
updated_atintegerLast update time (UTC, ISO 8601; incremental sync with the time parameter goes by it)
Example: 1793771299665var_reasonnullnullableVAR reason (present for VAR events) · 1 - goal awarded · 2 - goal not awarded · 3 - penalty awarded · 4 - penalty not awarded · 5 - red card given · 6 - card review · 7 - mistaken identity · 8 - corner awarded · 9 - corner not awarded · 0 - other
var_resultnullnullableVAR result (present for VAR events) · 1 - goal stands · 2 - goal disallowed · 3 - penalty stands · 4 - penalty cancelled · 5 - red card stands · 6 - red card cancelled · 7 - card confirmed · 8 - card changed · 9 - original decision stands · 10 - decision changed · 11 - corner stands · 12 - corner cancelled · 0 - unknown
Errors
| HTTP | message | When |
|---|---|---|
| 401 | missing API key / unauthorized | No X-API-Key, or the key is invalid or disabled |
| 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 |