SofaScore API endpoint
Returns a match's text commentary (minute, type, text, and the players involved, plus the running score on scoring lines) from SofaScore, newest first. Works for football and basketball matches that have commentary. An empty `comments` list is a valid response (a live match with no lines yet). Returns 404 when SofaScore has no commentary for the match, which includes matches that have not started.
/sofascore/event-commentsQuery parameters:
id: required. Numeric SofaScore event (match) id, e.g. 16363867.Notable response behavior:
player, player_in/player_out (substitutions), assist, is_home and minute; basketball lines additionally carry time_seconds, goal_type and penalty_drawn_by.minute is the elapsed match minute including stoppage time (a goal in the tenth minute of stoppage time after 90 shows 100); this differs from the shot map, which reports minute: 90 plus added_time.type is SofaScore's own line type (for example shotSaved, scoreChange, substitution, freeKickWon, cornerKick, periodEnd) and is not a closed set the API validates.comments array is a valid response (a live match with no lines yet), not an error.404 when SofaScore has no commentary for the match. This includes matches that have not started and tennis matches.| Field | Filled in, of 114 checked | Values in the sample |
|---|---|---|
| id | 114 | |
| type | 114 | |
| text | 114 | |
| period | 113 | |
| minute | 111 | 1 to 94, median 52 |
| is_home | 107 | true in 52 of 107 |
| player | 107 | |
| player_in | 5 | |
| player_out | 5 | |
| home_score | 8 | 1 to 5, median 2 |
| away_score | 8 | 0 to 3, median 2 |
| assist | 6 |
| Parameter | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
| id | string | Yes | Numeric SofaScore event (match) id | 16363867 | |
| x-api-key (header) | string | Yes | API key required |
curl -X GET "https://api.crawlora.net/api/v1/sofascore/event-comments?id=16363867" \ -H "x-api-key: $CRAWLORA_API_KEY"
{
"code": 200,
"msg": "OK",
"data": {
"event_id": 16363867,
"source_url": "https://api.sofascore.com/api/v1/event/16363867/comments",
"fetched_at": "2026-07-08T00:00:00Z",
"count": 114,
"comments": [
{
"id": 40442273,
"type": "scoreChange",
"text": "Goal! Manchester City 5, Sunderland 3. Erling Haaland (Manchester City) right footed shot from very close range to the bottom right corner. Assisted by Josko Gvardiol.Goal awarded following VAR Review.",
"period": "2ND",
"minute": 81,
"is_home": true,
"home_score": 5,
"away_score": 3,
"player": {
"id": 839956,
"name": "Erling Haaland",
"short_name": "E. Haaland",
"slug": "erling-haaland",
"position": "F",
"jersey_number": "9"
},
"assist": {
"id": 964994,
"name": "Joško Gvardiol",
"short_name": "J. Gvardiol",
"slug": "josko-gvardiol",
"position": "D",
"jersey_number": "24"
}
},
{
"id": 40442362,
"type": "substitution",
"text": "Substitution, Manchester City. Nico O'Reilly replaces Rayan Cherki.",
"period": "2ND",
"minute": 85,
"is_home": true,
"player": {
"id": 1142703,
"name": "Nico O'Reilly",
"short_name": "N. O’Reilly",
"slug": "nico-o-reilly",
"position": "D",
"jersey_number": "33"
},
"player_in": {
"id": 1142703,
"name": "Nico O'Reilly",
"short_name": "N. O’Reilly",
"slug": "nico-o-reilly",
"position": "D",
"jersey_number": "33"
},
"player_out": {
"id": 979128,
"name": "Rayan Cherki",
"short_name": "R. Cherki",
"slug": "cherki-rayan",
"position": "M",
"jersey_number": "10"
}
}
]
}
}Request schema
No body schema
Response schema
#/definitions/sofascore.eventCommentsResponseDoc
| Field | Type | Required | Enum | Bounds | Example | Description |
|---|---|---|---|---|---|---|
| code | integer | No | 200 | |||
| data | sofascore.EventCommentsResponse | No | ||||
| data.comments | array | No | ||||
| data.comments[].assist | sofascore.PlayerBrief | No | PlayerBrief record, 6 fields: id, jersey_number, name, position, short_name, slug. Described under SofaScore event at-bat pitches API. | |||
| data.comments[].away_score | integer | No | ||||
| data.comments[].goal_type | string | No | ||||
| data.comments[].home_score | integer | No | ||||
| data.comments[].id | integer | No | ||||
| data.comments[].is_home | boolean | No | ||||
| data.comments[].minute | integer | No | 94 | |||
| data.comments[].penalty_drawn_by | sofascore.PlayerBrief | No | PlayerBrief record, 6 fields: id, jersey_number, name, position, short_name, slug. Described under SofaScore event at-bat pitches API. | |||
| data.comments[].period | string | No | 2ND | |||
| data.comments[].player | sofascore.PlayerBrief | No | PlayerBrief record, 6 fields: id, jersey_number, name, position, short_name, slug. Described under SofaScore event at-bat pitches API. | |||
| data.comments[].player_in | sofascore.PlayerBrief | No | PlayerBrief record, 6 fields: id, jersey_number, name, position, short_name, slug. Described under SofaScore event at-bat pitches API. | |||
| data.comments[].player_out | sofascore.PlayerBrief | No | PlayerBrief record, 6 fields: id, jersey_number, name, position, short_name, slug. Described under SofaScore event at-bat pitches API. | |||
| data.comments[].text | string | No | Attempt saved. Malick Fofana (Sunderland) right footed shot. | |||
| data.comments[].time_seconds | integer | No | ||||
| data.comments[].type | string | No | shotSaved | |||
| data.count | integer | No | ||||
| data.event_id | integer | No | 16363867 | |||
| data.fetched_at | string | No | ||||
| data.source_url | string | No | ||||
| msg | string | No | OK |
| Status | Description | Schema |
|---|---|---|
| 400 | Bad Request | #/definitions/app.Response |
| 404 | Not Found | #/definitions/app.Response |
| 429 | Too Many Requests | #/definitions/app.Response |
| 503 | Service Unavailable | #/definitions/app.Response |
Use environment variables for secrets and keep Crawlora API keys server-side.
curl -X GET "https://api.crawlora.net/api/v1/sofascore/event-comments?id=16363867" \
-H "x-api-key: $CRAWLORA_API_KEY"