SofaScore API endpoint
Returns the historical head-to-head win/draw record between a match's two teams (and managers, when available) from SofaScore.
/sofascore/event-h2hQuery parameters:
id: required. Numeric SofaScore event (match) id.Notable response behavior:
team_duel is the all-time record between the two clubs; manager_duel is omitted when SofaScore has no manager-vs-manager history.| Field | In the sample | Value in the sample |
|---|---|---|
| event_id | Has a value | |
| team_duel.home_wins | Has a value | 8 |
| team_duel.away_wins | Has a value | 2 |
| team_duel.draws | Has a value | 0 |
| manager_duel.home_wins | Has a value | 3 |
| manager_duel.away_wins | Has a value | 1 |
| manager_duel.draws | Has a value | 0 |
| Parameter | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
| id | string | Yes | Numeric SofaScore event (match) id | 14025013 | |
| x-api-key (header) | string | Yes | API key required |
curl -X GET "https://api.crawlora.net/api/v1/sofascore/event-h2h?id=14025013" \ -H "x-api-key: $CRAWLORA_API_KEY"
{
"code": 200,
"msg": "OK",
"data": {
"event_id": 14025013,
"source_url": "https://api.sofascore.com/api/v1/event/14025013/h2h",
"fetched_at": "2026-07-08T16:45:00Z",
"team_duel": {
"home_wins": 8,
"away_wins": 2,
"draws": 0
},
"manager_duel": {
"home_wins": 3,
"away_wins": 1,
"draws": 0
}
}
}Request schema
No body schema
Response schema
#/definitions/sofascore.eventH2HResponseDoc
| Field | Type | Required | Enum | Bounds | Example | Description |
|---|---|---|---|---|---|---|
| code | integer | No | 200 | |||
| data | sofascore.EventH2HResponse | No | ||||
| data.event_id | integer | No | SofaScore event id the record belongs to. | |||
| data.fetched_at | string | No | Time the data was fetched, in UTC (RFC 3339). | |||
| data.manager_duel | object | No | Record between the two managers. Omitted when SofaScore has no history for them. | |||
| data.manager_duel.away_wins | integer | No | Past meetings won by the away side of this match. | |||
| data.manager_duel.draws | integer | No | Past meetings that ended in a draw. | |||
| data.manager_duel.home_wins | integer | No | Past meetings won by the home side of this match. | |||
| data.source_url | string | No | SofaScore URL the data was read from. | |||
| data.team_duel | object | No | All-time record between the two teams. | |||
| data.team_duel.away_wins | integer | No | Past meetings won by the away side of this match. | |||
| data.team_duel.draws | integer | No | Past meetings that ended in a draw. | |||
| data.team_duel.home_wins | integer | No | Past meetings won by the home side of this match. | |||
| 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-h2h?id=14025013" \
-H "x-api-key: $CRAWLORA_API_KEY"