SofaScore API endpoint
Returns each side's form going into a match: league position, points (football) or win-loss record (basketball) in `value` with the `label` that names it, the average player rating where SofaScore has one, and the recent results (`W`, `D`, `L`) in the order SofaScore returns them. Covers football and basketball; returns 404 when SofaScore has no pre-game form for the match, which includes tennis matches.
/sofascore/event-pregame-formQuery parameters:
id: required. Numeric SofaScore event (match) id, e.g. 16363867.Notable response behavior:
label names what value holds: Pts (league points) for football and W-L (win-loss record, e.g. 0-1) for basketball. position is the league position.avg_rating is the team's average player rating and is present for football only.form lists recent results as W, D or L in the order SofaScore returns them.404 when SofaScore has no pre-game form for the match, which includes tennis matches.| Field | In the sample | Value in the sample |
|---|---|---|
| event_id | Has a value | |
| label | Has a value | “Pts” |
| home.position | Has a value | 1 |
| home.value | Has a value | 12 |
| home.avg_rating | Has a value | 7.91 |
| home.form | Has a value | 4 entries |
| away.position | Has a value | 15 |
| away.value | Has a value | 4 |
| away.avg_rating | Has a value | 7.13 |
| away.form | Has a value | 4 entries |
| 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-pregame-form?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/pregame-form",
"fetched_at": "2026-07-08T00:00:00Z",
"label": "Pts",
"home": {
"position": 1,
"value": "12",
"avg_rating": 7.91,
"form": [
"W",
"W",
"W"
]
},
"away": {
"position": 15,
"value": "4",
"avg_rating": 7.13,
"form": [
"L",
"W",
"D"
]
}
}
}Request schema
No body schema
Response schema
#/definitions/sofascore.eventPregameFormResponseDoc
| Field | Type | Required | Enum | Bounds | Example | Description |
|---|---|---|---|---|---|---|
| code | integer | No | 200 | |||
| data | sofascore.EventPregameFormResponse | No | ||||
| data.away | sofascore.PregameFormSide | No | ||||
| data.away.avg_rating | number | No | 7.91 | |||
| data.away.form | array | No | W,W,W,W | |||
| data.away.position | integer | No | 1 | |||
| data.away.value | string | No | 12 | |||
| data.event_id | integer | No | 16363867 | |||
| data.fetched_at | string | No | ||||
| data.home | sofascore.PregameFormSide | No | ||||
| data.home.avg_rating | number | No | 7.91 | |||
| data.home.form | array | No | W,W,W,W | |||
| data.home.position | integer | No | 1 | |||
| data.home.value | string | No | 12 | |||
| data.label | string | No | Pts | |||
| 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-pregame-form?id=16363867" \
-H "x-api-key: $CRAWLORA_API_KEY"