SofaScore API endpoint
Returns every player's average position on the pitch during a football match (`average_x` and `average_y` on SofaScore's 0-100 pitch scale, plus the number of touches behind it) for the home and away sides, and the substitutions with their minute. Returns 404 when SofaScore has no positional data for the match, which includes unstarted matches and sports other than football.
/sofascore/event-average-positionsQuery parameters:
id: required. Numeric SofaScore event (match) id, e.g. 16363867.Notable response behavior:
home and away list each player with average_x and average_y on SofaScore's 0-100 pitch scale and points_count, the number of touches behind the average. substitutions lists who came on and off with the minute and side.404 when SofaScore has no positional data for the match, which includes unstarted matches and sports other than football (basketball and tennis were 404 when checked).| Field | Filled in, of 14 checked | Values in the sample |
|---|---|---|
| player | 14 | |
| average_x | 14 | |
| average_y | 14 | |
| points_count | 14 | 10 to 91, median 42 |
| 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-average-positions?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/average-positions",
"fetched_at": "2026-07-08T00:00:00Z",
"home": [
{
"player": {
"id": 839956,
"name": "Erling Haaland",
"short_name": "E. Haaland",
"slug": "erling-haaland",
"position": "F",
"jersey_number": "9"
},
"average_x": 64.248571428571,
"average_y": 47.802857142857,
"points_count": 35
}
],
"away": [
{
"player": {
"id": 1195784,
"name": "Malick Fofana",
"short_name": "M. Fofana",
"slug": "malick-fofana",
"position": "M",
"jersey_number": "39"
},
"average_x": 59.022222222222,
"average_y": 82.133333333333,
"points_count": 18
}
],
"substitutions": [
{
"player_in": {
"id": 1195784,
"name": "Malick Fofana",
"short_name": "M. Fofana",
"slug": "malick-fofana",
"position": "M",
"jersey_number": "39"
},
"player_out": {
"id": 1116571,
"name": "Nilson Angulo",
"short_name": "N. Angulo",
"slug": "nilson-angulo",
"position": "M",
"jersey_number": "10"
},
"minute": 60,
"is_home": false
}
]
}
}Request schema
No body schema
Response schema
#/definitions/sofascore.eventAveragePositionsResponseDoc
| Field | Type | Required | Enum | Bounds | Example | Description |
|---|---|---|---|---|---|---|
| code | integer | No | 200 | |||
| data | sofascore.EventAveragePositionsResponse | No | ||||
| data.away | array | No | ||||
| data.away[].average_x | number | No | 64.25 | |||
| data.away[].average_y | number | No | 47.8 | |||
| data.away[].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.away[].points_count | integer | No | 35 | |||
| data.event_id | integer | No | 16363867 | |||
| data.fetched_at | string | No | ||||
| data.home | array | No | ||||
| data.home[].average_x | number | No | 64.25 | |||
| data.home[].average_y | number | No | 47.8 | |||
| data.home[].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.home[].points_count | integer | No | 35 | |||
| data.source_url | string | No | ||||
| data.substitutions | array | No | ||||
| data.substitutions[].is_home | boolean | No | ||||
| data.substitutions[].minute | integer | No | 60 | |||
| data.substitutions[].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.substitutions[].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. | |||
| 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-average-positions?id=16363867" \
-H "x-api-key: $CRAWLORA_API_KEY"