SofaScore API: Get football match
Finds a football match between two teams on SofaScore (on a given date, or their latest played or live match) and returns its score, goals, red cards, team statistics and player ratings.
Unofficial. Not affiliated with or endorsed by SofaScore.
Inputs
Values from the run on Oct 31, 2026, shown under Output.
- Date optional
date Match date in YYYY-MM-DD, for example 2025-10-26. Omit for the latest played or live match.
Not set
- Team 1, required
team_1 First football team, for example Barcelona.
Barcelona
- Team 2, required
team_2 Second football team, for example Real Madrid.
Atlético Madrid
Input as JSON
{ "team_1": "Barcelona", "team_2": "Atlético Madrid"}Output
{ "goals": [ { "team": "FC Barcelona", "assist": "Ferran Torres", "minute": "4", "scorer": "Lamine Yamal" }, { "team": "FC Barcelona", "assist": "Dani Olmo", "minute": "24", "scorer": "Ferran Torres" }, { "team": "Atlético Madrid", "assist": "Marcos Llorente", "minute": "31", "scorer": "Ademola Lookman" } ], "score": { "away": 2, "home": 1 }, "venue": "Riyadh Air Metropolitano", "status": "Ended", "players": [ { "name": "Juan Musso", "team": "Atlético Madrid", "rating": 9.5, "position": "Goalkeeper", "player_id": 263651, "minutes_played": 90 }, { "name": "Nahuel Molina", "team": "Atlético Madrid", "rating": 6.2, "position": "Defender", "player_id": 831799, "minutes_played": 90 }, { "name": "Robin Le Normand", "team": "Atlético Madrid", "rating": 6.1, "position": "Defender", "player_id": 787751, "minutes_played": 90 } ], "event_id": 15632089, "away_team": "FC Barcelona", "date_time": "2026-04-14T19:00:00+00:00", "home_team": "Atlético Madrid", "red_cards": [ { "team": "FC Barcelona", "minute": "79", "player": "Eric García", "reason": "Red card" } ], "away_stats": { "team": "FC Barcelona", "fouls": 8, "passes": 699, "corners": 4, "total_shots": 15, "expected_goals": 2.22, "shots_on_target": 8, "possession_percent": 71, "pass_accuracy_percent": 90 }, "home_stats": { "team": "Atlético Madrid", "fouls": 15, "passes": 282, "corners": 2, "total_shots": 15, "expected_goals": 1.77, "shots_on_target": 5, "possession_percent": 29, "pass_accuracy_percent": 71.6 }, "match_link": "https://www.sofascore.com/football/match/atletico-madrid-barcelona/rgbsLgb#id:15632089" , "competition": "UEFA Champions League, Knockout stage", "half_time_score": { "away": 2, "home": 1 }}Code
curl https://api.fous.com/v1/runs \ -H "Authorization: Bearer $FOUS_API_KEY" \ -H "Content-Type: application/json" \ -d '{"method":"sofascore.com/get_match","input":{"team_1":"Barcelona","team_2":"Atlético Madrid"}}' # Save as fous.py, then run: python3 fous.pyimport json, os, timefrom urllib.error import HTTPErrorfrom urllib.request import Request, urlopenAPI = "https://api.fous.com/v1/runs" KEY = os.environ["FOUS_API_KEY"]HEADERS = { "Authorization": f"Bearer {KEY}", "Content-Type": "application/json" ,}def call(url, body=None): data = json.dumps(body).encode() if body else None request = Request(url, data, HEADERS) try: with urlopen(request, timeout=120) as r: return r.status, json.load(r) except HTTPError as error: message = json.load(error)["error"]["message"] raise RuntimeError(message) from errorstatus, run = call(API, { "method": "sofascore.com/get_match" , "input": { "team_1": "Barcelona", "team_2": "Atlético Madrid" }})# 202: still going after 30 s. Ask again until it ends.while status == 202: time.sleep(2) status, run = call(f"{API}/{run['id']}")print(json.dumps(run["data"], indent=2))// Save as fous.mjs, then run: node fous.mjsconst api = "https://api.fous.com/v1/runs" ;const headers = { Authorization: `Bearer ${process.env.FOUS_API_KEY}`, "Content-Type": "application/json" ,};let response = await fetch(api, { method: "POST", headers, body: JSON.stringify({ "method": "sofascore.com/get_match" , "input": { "team_1": "Barcelona", "team_2": "Atlético Madrid" } }), signal: AbortSignal.timeout(120_000),});let run = await response.json();// 202: still going after 30 s. Ask again until it ends.while (response.status === 202) { await new Promise((done) => setTimeout(done, 2_000)); response = await fetch(`${api}/${run.id}`, { headers }); run = await response.json();}if (!response.ok) throw new Error(run.error.message);console.log(run.data);# Connect your agent to Fous once, over MCP (Streamable HTTP):# https://api.fous.com/mcp# Set FOUS_API_KEY first: create a key at https://app.fous.com/keys.# Claude Codeclaude mcp add \ --scope user \ --transport http fous https://api.fous.com/mcp \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Codexcodex mcp add fous \ --url https://api.fous.com/mcp \ --bearer-token-env-var FOUS_API_KEY# Cursor, VS Code, Windsurf, Cline and morenpx -y add-mcp https://api.fous.com/mcp -g -n fous \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Then ask your agent:# "Use Fous to run sofascore.com/get_match# with {"team_1":"Barcelona","team_2":"Atlético Madrid"}"Over HTTP, the answer’s data holds the output. A run still going after 30 seconds answers 202 with its id: ask GET /v1/runs/{id} until it ends.
Schema
Input schema
{ "type": "object", "required": [ "team_1", "team_2" ], "properties": { "date": { "type": "string", "description": "Match date in YYYY-MM-DD, for example 2025-10-26. Omit for the latest played or live match." }, "team_1": { "type": "string", "description": "First football team, for example Barcelona." }, "team_2": { "type": "string", "description": "Second football team, for example Real Madrid." } }}Output schema
{ "type": "object", "required": [ "competition", "date_time", "venue", "status", "home_team", "away_team", "score", "half_time_score", "goals", "red_cards", "home_stats", "away_stats", "players", "match_link", "event_id" ], "properties": { "goals": { "type": "array", "items": { "type": "object", "required": [ "minute", "scorer", "assist", "team" ], "properties": { "team": { "type": "string" }, "assist": { "type": [ "string", "null" ] }, "minute": { "type": [ "string", "null" ] }, "scorer": { "type": [ "string", "null" ] } }, "additionalProperties": false } }, "score": { "type": "object", "required": [ "home", "away" ], "properties": { "away": { "type": [ "integer", "null" ] }, "home": { "type": [ "integer", "null" ] } }, "additionalProperties": false }, "venue": { "type": [ "string", "null" ] }, "status": { "type": [ "string", "null" ] }, "players": { "type": "array", "items": { "type": "object", "required": [ "name", "team", "position", "minutes_played", "rating", "player_id" ], "properties": { "name": { "type": "string" }, "team": { "type": "string" }, "rating": { "type": [ "number", "null" ] }, "position": { "type": [ "string", "null" ] }, "player_id": { "type": [ "integer", "null" ], "x-fous-developer": true }, "minutes_played": { "type": [ "integer", "null" ] } }, "additionalProperties": false } }, "event_id": { "type": "integer", "x-fous-developer": true }, "away_team": { "type": "string" }, "date_time": { "type": "string" }, "home_team": { "type": "string" }, "red_cards": { "type": "array", "items": { "type": "object", "required": [ "minute", "player", "team", "reason" ], "properties": { "team": { "type": "string" }, "minute": { "type": [ "string", "null" ] }, "player": { "type": [ "string", "null" ] }, "reason": { "type": [ "string", "null" ] } }, "additionalProperties": false } }, "away_stats": { "type": "object", "required": [ "team", "possession_percent", "total_shots", "shots_on_target", "expected_goals", "corners", "fouls", "passes", "pass_accuracy_percent" ], "properties": { "team": { "type": "string" }, "fouls": { "type": [ "number", "null" ] }, "passes": { "type": [ "number", "null" ] }, "corners": { "type": [ "number", "null" ] }, "total_shots": { "type": [ "number", "null" ] }, "expected_goals": { "type": [ "number", "null" ] }, "shots_on_target": { "type": [ "number", "null" ] }, "possession_percent": { "type": [ "number", "null" ] }, "pass_accuracy_percent": { "type": [ "number", "null" ] } }, "additionalProperties": false }, "home_stats": { "type": "object", "required": [ "team", "possession_percent", "total_shots", "shots_on_target", "expected_goals", "corners", "fouls", "passes", "pass_accuracy_percent" ], "properties": { "team": { "type": "string" }, "fouls": { "type": [ "number", "null" ] }, "passes": { "type": [ "number", "null" ] }, "corners": { "type": [ "number", "null" ] }, "total_shots": { "type": [ "number", "null" ] }, "expected_goals": { "type": [ "number", "null" ] }, "shots_on_target": { "type": [ "number", "null" ] }, "possession_percent": { "type": [ "number", "null" ] }, "pass_accuracy_percent": { "type": [ "number", "null" ] } }, "additionalProperties": false }, "match_link": { "type": "string" }, "competition": { "type": [ "string", "null" ] }, "half_time_score": { "type": "object", "required": [ "home", "away" ], "properties": { "away": { "type": [ "integer", "null" ] }, "home": { "type": [ "integer", "null" ] } }, "additionalProperties": false } }, "additionalProperties": false}- Price
- 1 credit per completed run (1¢ with pay as you go); failed runs are free.
- Method
sofascore.com/get_match- Returns
- competition, date, venue, status, teams, score, half-time score, goals, red cards, team stats, player ratings, match link
Use it from your agent
Give your agent this line. It reads SKILL.md, gets a Fous API key and connects the Fous MCP server. Its run then takes the method sofascore.com/get_match with the inputs above.
Ask your agent
- What was the final score of the last Arsenal vs Tottenham game, and who scored?
- Pull up the SofaScore player ratings and team stats for Liverpool against Manchester City on 2025-03-15
- Is Inter vs AC Milan live right now? Give me the current score and any red cards
- Check sofascore.com for the Bayern Munich vs Borussia Dortmund match from 2024-11-30 — I need the half-time score, possession and shots
- Who got sent off and who was the highest-rated player in the most recent Celtic v Rangers derby?
See more
All SofaScore methodsGets a football player's season statistics on SofaScore by name, with an optional competition and season (defaults: the player's main league and the current season). Unavailable statistics are null.
sofascore.com/get_player_season_statsFinds the latest game between two teams, or their game on a given date, in major US leagues, MLS or the EPL. Returns the score, scoring by period, leading players, team stats and player box scores.
espn.com/get_game_summaryGets a cricket match's full scorecard on Cricbuzz from two team names. You can pick the match by date or series, or pass a match link. Otherwise you get the teams' most recent match, including live play.
cricbuzz.com/get_scorecardGets UEFA club competition matches in a date range, with kick-off times in a chosen time zone, scores, stages and venues. You can limit the list to one club.
uefa.com/get_competition_matchesGets NFL scores and scheduled games for the week that contains a date. You can keep only one team's games. Kickoff times are in US Eastern time unless you choose another time zone.
nfl.com/get_scoresReturns the NBA box score for a game between two teams on a date; without a date, their most recent matchup, including Summer League and games in progress.
nba.com/get_box_scoreGets Premier League fixtures and results in a date range, with kickoff times in your chosen time zone. Returns up to 380 matches.
premierleague.com/get_fixtures_and_resultsGets ESPN scores and the schedule for a league on a local day. You can filter by team, and start times are shown in your time zone.
espn.com/get_scores