SofaScore API endpoint
Returns a page of a team's upcoming or recent fixtures. The `direction` enum accepts `next` and `last`. An empty `events` list is a valid response when there is no fixture on that page.
/sofascore/team-eventsReturns a page of a team's upcoming or recent fixtures from SofaScore.
Query parameters:
id: required. Numeric SofaScore team id.direction: required enum. Allowed values: next, last.page: optional integer. Zero-based page number. Defaults to 0.Notable response behavior:
events array is a valid response when there is no fixture on that page (not an error).has_next_page indicates whether a further page (page + 1) has more fixtures in the requested direction.| Field | Filled in, of 30 checked | Values in the sample |
|---|---|---|
| id | 30 | |
| slug | 30 | |
| start_timestamp | 30 | 2026-03-10 to 2026-10-10 |
| start_time | 30 | 2026-03-10 to 2026-10-10 |
| status | 30 | |
| winner_code | 30 | |
| tournament | 30 | |
| home_team | 30 | |
| away_team | 30 | |
| home_score | 30 | |
| away_score | 30 |
| Parameter | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
| id | string | Yes | Numeric SofaScore team id | 2817 | |
| direction | string | Yes | Fixture direction Allowed values: next, last. | next | |
| page | integer | No | Zero-based page number | 0 | |
| x-api-key (header) | string | Yes | API key required |
curl -X GET "https://api.crawlora.net/api/v1/sofascore/team-events?id=2817&direction=next&page=1" \ -H "x-api-key: $CRAWLORA_API_KEY"
{
"code": 200,
"msg": "OK",
"data": {
"team_id": 2817,
"direction": "next",
"page": 0,
"has_next_page": true,
"count": 1,
"source_url": "https://api.sofascore.com/api/v1/team/2817/events/next/0",
"fetched_at": "2026-07-08T16:45:00Z",
"events": [
{
"id": 16500000,
"slug": "barcelona-real-madrid",
"start_timestamp": 1757520000,
"start_time": "2026-09-10T19:00:00Z",
"status": {
"code": 0,
"description": "Not started",
"type": "notstarted"
},
"tournament": {
"id": 52,
"name": "LaLiga",
"category": "Spain",
"unique_tournament_id": 8,
"unique_tournament_name": "LaLiga"
},
"home_team": {
"id": 2817,
"name": "FC Barcelona",
"short_name": "Barcelona",
"slug": "barcelona",
"country": "Spain"
},
"away_team": {
"id": 2829,
"name": "Real Madrid",
"short_name": "Real Madrid",
"slug": "real-madrid",
"country": "Spain"
}
}
]
}
}Request schema
No body schema
Response schema
#/definitions/sofascore.teamEventsResponseDoc
| Field | Type | Required | Enum | Bounds | Example | Description |
|---|---|---|---|---|---|---|
| code | integer | No | 200 | |||
| data | sofascore.TeamEventsResponse | No | ||||
| data.count | integer | No | Number of events on this page. | |||
| data.direction | string | No | next | Which fixtures were requested: `next` for upcoming, `last` for past. | ||
| data.events | array | No | Fixtures on this page. Empty when there are none. | |||
| data.events[].away_score | object | No | Away side's score, when available. | |||
| data.events[].away_score.current | integer | No | Current score, which is the final score once the match is over. | |||
| data.events[].away_score.period1 | integer | No | Score in the first period. | |||
| data.events[].away_score.period2 | integer | No | Score in the second period. | |||
| data.events[].away_team | object | No | Away side. | |||
| data.events[].away_team.country | string | No | Spain | Country the team belongs to. | ||
| data.events[].away_team.id | integer | No | 2817 | SofaScore team id. Use it with the team endpoints. | ||
| data.events[].away_team.name | string | No | FC Barcelona | Full team name. | ||
| data.events[].away_team.national | boolean | No | True for a national team. | |||
| data.events[].away_team.short_name | string | No | Barcelona | Shortened team name. | ||
| data.events[].away_team.slug | string | No | barcelona | URL slug of the team on SofaScore. | ||
| data.events[].home_score | object | No | Home side's score, when available. | |||
| data.events[].home_score.current | integer | No | Current score, which is the final score once the match is over. | |||
| data.events[].home_score.period1 | integer | No | Score in the first period. | |||
| data.events[].home_score.period2 | integer | No | Score in the second period. | |||
| data.events[].home_team | object | No | Home side. | |||
| data.events[].home_team.country | string | No | Spain | Country the team belongs to. | ||
| data.events[].home_team.id | integer | No | 2817 | SofaScore team id. Use it with the team endpoints. | ||
| data.events[].home_team.name | string | No | FC Barcelona | Full team name. | ||
| data.events[].home_team.national | boolean | No | True for a national team. | |||
| data.events[].home_team.short_name | string | No | Barcelona | Shortened team name. | ||
| data.events[].home_team.slug | string | No | barcelona | URL slug of the team on SofaScore. | ||
| data.events[].id | integer | No | 14025013 | SofaScore event id. Use it with the event endpoints. | ||
| data.events[].slug | string | No | URL slug of the match on SofaScore. | |||
| data.events[].start_time | string | No | 2025-08-15T19:00:00Z | Start time in UTC (RFC 3339). | ||
| data.events[].start_timestamp | integer | No | Start time as a Unix timestamp in seconds. | |||
| data.events[].status | object | No | Current status of the match. | |||
| data.events[].status.code | integer | No | SofaScore's numeric status code, for example 0 for not started and 100 for ended. | |||
| data.events[].status.description | string | No | Ended | Status as displayed, for example "Ended". | ||
| data.events[].status.type | string | No | finished | Status group, for example `notstarted`, `inprogress` or `finished`. | ||
| data.events[].tournament | object | No | Tournament and parent competition the match belongs to. | |||
| data.events[].tournament.category | string | No | England | Category the tournament sits under, usually a country or region. | ||
| data.events[].tournament.id | integer | No | SofaScore id of the tournament the match is filed under. The seasons, standings and round endpoints take `unique_tournament_id` instead. | |||
| data.events[].tournament.name | string | No | Premier League | Tournament name. | ||
| data.events[].tournament.slug | string | No | premier-league | URL slug of the tournament on SofaScore. | ||
| data.events[].tournament.unique_tournament_id | integer | No | 17 | Id of the parent competition. This is the tournament id the tournament-seasons, standings and round-events endpoints take. | ||
| data.events[].tournament.unique_tournament_name | string | No | Premier League | Name of the parent competition. | ||
| data.events[].winner_code | integer | No | Result code: 1 when the home side won, 2 when the away side won, 3 for a draw. Omitted until the match is decided. | |||
| data.fetched_at | string | No | Time the data was fetched, in UTC (RFC 3339). | |||
| data.has_next_page | boolean | No | True when page + 1 has more fixtures in the same direction. | |||
| data.page | integer | No | Zero-based page number returned. | |||
| data.source_url | string | No | SofaScore URL the data was read from. | |||
| data.team_id | integer | No | SofaScore team id the fixtures belong to. | |||
| 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-events?id=2817&direction=next&page=1" \
-H "x-api-key: $CRAWLORA_API_KEY"