SofaScore API endpoint
Searches SofaScore for teams, players, and competitions matching a free-text query. An empty `results` list is a valid response when nothing matches.
/sofascore/searchQuery parameters:
q: required. Free-text search query (team, player, or competition name), 1-128 characters.Notable response behavior:
results array is a valid response when nothing matches the query (not an error).type (e.g. team, player, uniqueTournament); player results also carry team_id/team_name for their current club.q value returns an invalid-parameter error before upstream IO.| Field | Filled in, of 20 checked | Values in the sample |
|---|---|---|
| type | 20 | player (17), team (3) |
| id | 20 | |
| name | 20 | “FC Barcelona” and 19 other values |
| slug | 20 | |
| sport | 3 | “Football” |
| country | 20 | Spain (12), Brazil (2), Netherlands (1) and 5 more |
| team_id | 17 | |
| team_name | 17 | FC Barcelona in all 17 |
| Parameter | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
| q | string | Yes | Free-text search query | barcelona | |
| x-api-key (header) | string | Yes | API key required |
curl -X GET "https://api.crawlora.net/api/v1/sofascore/search?q=barcelona" \ -H "x-api-key: $CRAWLORA_API_KEY"
{
"code": 200,
"msg": "OK",
"data": {
"query": "barcelona",
"count": 2,
"source_url": "https://api.sofascore.com/api/v1/search/all?q=barcelona",
"fetched_at": "2026-07-08T16:45:00Z",
"results": [
{
"type": "team",
"id": 2817,
"name": "FC Barcelona",
"slug": "barcelona",
"sport": "Football",
"country": "Spain"
},
{
"type": "player",
"id": 1102841,
"name": "Alejandro Balde",
"slug": "alejandro-balde",
"team_id": 2817,
"team_name": "FC Barcelona"
}
]
}
}Request schema
No body schema
Response schema
#/definitions/sofascore.searchResponseDoc
| Field | Type | Required | Enum | Bounds | Example | Description |
|---|---|---|---|---|---|---|
| code | integer | No | 200 | |||
| data | sofascore.SearchResponse | No | ||||
| data.count | integer | No | Number of results returned. | |||
| data.fetched_at | string | No | Time the data was fetched, in UTC (RFC 3339). | |||
| data.query | string | No | Search query that was run. | |||
| data.results | array | No | Matching teams, players and other entities. Empty when nothing matches. | |||
| data.results[].country | string | No | Country of the result. | |||
| data.results[].id | integer | No | SofaScore id of the result. Which endpoints accept it depends on `type`. | |||
| data.results[].name | string | No | Name of the result. | |||
| data.results[].slug | string | No | URL slug of the result on SofaScore. | |||
| data.results[].sport | string | No | Sport the result belongs to. | |||
| data.results[].team_id | integer | No | For a player, the SofaScore id of their team. | |||
| data.results[].team_name | string | No | For a player, the name of their team. | |||
| data.results[].type | string | No | team | Kind of result, for example `team` or `player`. | ||
| data.source_url | string | No | SofaScore URL the data was read from. | |||
| msg | string | No | OK |
| Status | Description | Schema |
|---|---|---|
| 400 | Bad Request | #/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/search?q=barcelona" \
-H "x-api-key: $CRAWLORA_API_KEY"