SofaScore API endpoint
Returns a football team's goals scored and conceded per block of match minutes (1-15, 16-30, 31-45, 46-60, 61-75, 76-90) for one competition season, in three views: `overall`, `home` and `away`, each with the matches played and the goal totals. A block with no goals is returned as 0. Returns 404 for non-football teams and for a team and season that do not belong together.
/sofascore/team-goal-distributionsQuery parameters:
id: required. Numeric SofaScore team id, e.g. 17. Get it from sofascore-search or sofascore-team-events.tournament_id: required. Numeric SofaScore unique-tournament (competition) id of a football competition, e.g. 17.season: required. Numeric SofaScore season id, e.g. 96668.Notable response behavior:
distributions has three views in this order: overall, home, away. Each holds matches, the goal totals and six periods (minutes 1-15, 16-30, 31-45, 46-60, 61-75, 76-90). Home and away periods add up to the overall period, and each view's periods add up to its totals.0. (SofaScore omits both counts for such a block in the home and away views.)404 for non-football teams and for a team, competition and season that do not belong together.| Field | Filled in, of 3 checked | Values in the sample |
|---|---|---|
| type | 3 | “overall” and 2 other values |
| matches | 3 | 19 to 38, median 19 |
| scored_goals | 3 | 32 to 77, median 45 |
| conceded_goals | 3 | 14 to 35, median 21 |
| periods | 3 | median 6 entries |
| Parameter | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
| id | string | Yes | Numeric SofaScore team id | 17 | |
| tournament_id | string | Yes | Numeric SofaScore unique-tournament (competition) id of a football competition | 17 | |
| season | string | Yes | Numeric SofaScore season id | 96668 | |
| x-api-key (header) | string | Yes | API key required |
curl -X GET "https://api.crawlora.net/api/v1/sofascore/team-goal-distributions?id=17&tournament_id=17&season=96668" \ -H "x-api-key: $CRAWLORA_API_KEY"
{
"code": 200,
"msg": "OK",
"data": {
"team_id": 17,
"tournament_id": 17,
"season_id": 96668,
"source_url": "https://api.sofascore.com/api/v1/team/17/unique-tournament/17/season/96668/goal-distributions",
"fetched_at": "2026-10-07T00:00:00Z",
"distributions": [
{
"type": "overall",
"matches": 5,
"scored_goals": 13,
"conceded_goals": 5,
"periods": [
{
"start_minute": 1,
"end_minute": 15,
"scored_goals": 1,
"conceded_goals": 1
},
{
"start_minute": 16,
"end_minute": 30,
"scored_goals": 3,
"conceded_goals": 1
}
]
}
]
}
}Request schema
No body schema
Response schema
#/definitions/sofascore.teamGoalDistributionsResponseDoc
| Field | Type | Required | Enum | Bounds | Example | Description |
|---|---|---|---|---|---|---|
| code | integer | No | 200 | |||
| data | sofascore.TeamGoalDistributionsResponse | No | ||||
| data.distributions | array | No | ||||
| data.distributions[].conceded_goals | integer | No | 5 | |||
| data.distributions[].matches | integer | No | 5 | |||
| data.distributions[].periods | array | No | ||||
| data.distributions[].periods[].conceded_goals | integer | No | 1 | |||
| data.distributions[].periods[].end_minute | integer | No | 15 | |||
| data.distributions[].periods[].scored_goals | integer | No | 1 | |||
| data.distributions[].periods[].start_minute | integer | No | 1 | |||
| data.distributions[].scored_goals | integer | No | 13 | |||
| data.distributions[].type | string | No | overall | |||
| data.fetched_at | string | No | ||||
| data.season_id | integer | No | 96668 | |||
| data.source_url | string | No | ||||
| data.team_id | integer | No | 17 | |||
| data.tournament_id | integer | No | 17 | |||
| 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/team-goal-distributions?id=17&tournament_id=17&season=96668" \
-H "x-api-key: $CRAWLORA_API_KEY"