SofaScore API endpoint
Returns the games (maps) of an esports match from SofaScore: each game's id, status, start time, length in seconds, winner, score per side (kills for Dota 2 and League of Legends, rounds with half and overtime split for Counter-Strike), the map for Counter-Strike, and whether complete statistics exist. Use a game `id` with sofascore-esports-game to read its statistics, lineups, bans or rounds. Returns 404 when SofaScore has no games for the event, which includes sports other than esports.
/sofascore/event-esports-gamesQuery parameters:
id: required. Numeric SofaScore event (match) id of an esports match (Dota 2, League of Legends or Counter-Strike), e.g. 17260338. Find esports events with sofascore/live-events or sofascore/scheduled-events using sport esports.Notable response behavior:
id (use it with sofascore/esports-game), status, start_time, length_seconds (omitted while running), winner_code (1 home, 2 away, omitted until decided) and a home_score/away_score with display (kills in Dota 2 and League of Legends, rounds won in Counter-Strike). Counter-Strike scores add period1, period2 and overtime round counts, and the game has a map.home_team_starting_side_code is SofaScore's code for the side the home team started on; in Counter-Strike 4 is terrorist and 5 is counter-terrorist (decoded from the round history).has_complete_statistics is false while a game is running and for games SofaScore does not track in depth; the per-game endpoints can answer 404 for them.404 when SofaScore has no games for the event, which includes events of other sports.Example response (shortened):
{
"code": 200,
"msg": "OK",
"data": {
"event_id": 17264021,
"source_url": "https://api.sofascore.com/api/v1/event/17264021/esports-games",
"fetched_at": "2026-10-07T17:00:00Z",
"count": 3,
"games": [
{
"id": 588953,
"status": {
"code": 100,
"description": "Ended",
"type": "finished"
},
"start_timestamp": 1791317748,
"start_time": "2026-10-06T20:15:48Z",
"length_seconds": 4765,
"winner_code": 2,
"map": {
"id": 21,
"name": "Anubis"
},
"home_score": {
"display": 15,
"period1": 8,
"period2": 4,
"overtime": 3
},
"away_score": {
"display": 19,
"period1": 4,
"period2": 8,
"overtime": 7
},
"home_team_starting_side_code": 5,
"has_complete_statistics": true
}
]
}
}
| Field | Filled in, of 2 checked | Values in the sample |
|---|---|---|
| id | 2 | |
| status | 2 | |
| start_timestamp | 2 | 2026-10-06 |
| start_time | 2 | 2026-10-06 |
| length_seconds | 2 | 2,015 to 2,543, median 2,015 |
| winner_code | 2 | |
| home_score | 2 | |
| away_score | 2 | |
| home_team_starting_side_code | 2 | |
| has_complete_statistics | 2 | true in 2 of 2 |
| Parameter | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
| id | string | Yes | Numeric SofaScore esports event (match) id | 17260338 | |
| x-api-key (header) | string | Yes | API key required |
curl -X GET "https://api.crawlora.net/api/v1/sofascore/event-esports-games?id=17260338" \ -H "x-api-key: $CRAWLORA_API_KEY"
{
"code": 200,
"msg": "OK",
"data": {
"event_id": 17264021,
"source_url": "https://api.sofascore.com/api/v1/event/17264021/esports-games",
"fetched_at": "2026-10-07T17:00:00Z",
"count": 3,
"games": [
{
"id": 588953,
"status": {
"code": 100,
"description": "Ended",
"type": "finished"
},
"start_timestamp": 1791317748,
"start_time": "2026-10-06T20:15:48Z",
"length_seconds": 4765,
"winner_code": 2,
"map": {
"id": 21,
"name": "Anubis"
},
"home_score": {
"display": 15,
"period1": 8,
"period2": 4,
"overtime": 3
},
"away_score": {
"display": 19,
"period1": 4,
"period2": 8,
"overtime": 7
},
"home_team_starting_side_code": 5,
"has_complete_statistics": true
}
]
}
}Request schema
No body schema
Response schema
#/definitions/sofascore.eventEsportsGamesResponseDoc
| Field | Type | Required | Enum | Bounds | Example | Description |
|---|---|---|---|---|---|---|
| code | integer | No | 200 | |||
| data | sofascore.EventEsportsGamesResponse | No | ||||
| data.count | integer | No | ||||
| data.event_id | integer | No | 17260338 | |||
| data.fetched_at | string | No | ||||
| data.games | array | No | ||||
| data.games[].away_score | sofascore.EsportsGameScore | No | ||||
| data.games[].away_score.display | integer | No | 31 | Display is the headline score: kills in Dota 2 and League of Legends, rounds won in Counter-Strike. | ||
| data.games[].away_score.overtime | integer | No | 3 | |||
| data.games[].away_score.period1 | integer | No | 4 | |||
| data.games[].away_score.period2 | integer | No | 3 | |||
| data.games[].has_complete_statistics | boolean | No | HasCompleteStatistics reports whether the per-game statistics, lineups and bans are complete. | |||
| data.games[].home_score | sofascore.EsportsGameScore | No | ||||
| data.games[].home_score.display | integer | No | 31 | Display is the headline score: kills in Dota 2 and League of Legends, rounds won in Counter-Strike. | ||
| data.games[].home_score.overtime | integer | No | 3 | |||
| data.games[].home_score.period1 | integer | No | 4 | |||
| data.games[].home_score.period2 | integer | No | 3 | |||
| data.games[].home_team_starting_side_code | integer | No | 5 | HomeTeamStartingSideCode is SofaScore's code for the side the home team started on. In Counter-Strike 4 is terrorist and 5 is counter-terrorist. | ||
| data.games[].id | integer | No | 588883 | |||
| data.games[].length_seconds | integer | No | 2543 | LengthSeconds is the game length; omitted while the game is running. | ||
| data.games[].map | sofascore.EsportsGameMap | No | ||||
| data.games[].map.id | integer | No | 23 | |||
| data.games[].map.name | string | No | Ancient | |||
| data.games[].start_time | string | No | 2026-10-04T14:23:29Z | |||
| data.games[].start_timestamp | integer | No | ||||
| data.games[].status | sofascore.EventStatus | No | ||||
| data.games[].status.code | integer | No | SofaScore's numeric status code, for example 0 for not started and 100 for ended. | |||
| data.games[].status.description | string | No | Ended | Status as displayed, for example "Ended". | ||
| data.games[].status.type | string | No | finished | Status group, for example `notstarted`, `inprogress` or `finished`. | ||
| data.games[].winner_code | integer | No | 1 | WinnerCode is 1 for the home side, 2 for the away side, 0 until decided. | ||
| 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-esports-games?id=17260338" \
-H "x-api-key: $CRAWLORA_API_KEY"