Scores
What does the include do?
The scores include allows you to retrieve detailed information about the scores within a football match from both participants (home and away teams). Including scores in your API requests provides comprehensive scoring data including 1st half, 2nd half, extra time, penalty shootout results, and current match score.
Why use scores?
The scores include is essential for:
Live match tracking: Display real-time score updates during matches
Historical score analysis: Analyse how teams performed across different match periods
Comeback patterns: Identify teams that score more in second halves
Extra time performance: Track team performance in high-pressure situations
Statistical analysis: Build datasets for scoring pattern analysis
Requesting scores
To retrieve scores for a fixture, use the following include:
https://api.sportmonks.com/v3/football/fixtures/{fixture_id}
?api_token=YOUR_TOKEN&include=scoresExample: Get scores for Napoli vs Atalanta (fixture ID: 19424997)
https://api.sportmonks.com/v3/football/fixtures/19424997
?api_token=YOUR_TOKEN&include=scoresResponse structure
When you include scores in your request, you'll receive an array of score objects for each match period:
Field descriptions
id
integer
Unique identifier for this score entry
fixture_id
integer
ID of the fixture this score belongs to
type_id
integer
Type identifier indicating the score period (see Score Types below)
participant_id
integer
ID of the team (participant) this score belongs to
score
object
Score object containing goals and participant location
score.goals
integer
Number of goals scored by this participant in this period
score.participant
string
Team location: "home" or "away"
description
string
Human-readable description of the score type
Score types and descriptions
When you use the scores include for a regular match, you'll get different types of scores based on the match state:
Regular Match (90 minutes)
1ST_HALF
Goals scored during the first 45 minutes
2ND_HALF_ONLY
Goals scored during the second 45 minutes only (not cumulative)
2ND_HALF
Cumulative score after both halves (1st half + 2nd half)
CURRENT
The current/final score of the match
Extended match (Extra Time)
If the match goes into extra time, you'll see additional score types:
EXTRA_TIME
Goals scored during extra time (both periods combined)
EXTRA_TIME_ONLY
Goals scored in extra time only (not including regular time)
CURRENT
The updated current score including extra time
Penalty Shootout
If the match goes to penalties, you'll see:
PENALTIES
Number of successful penalty kicks in the shootout
CURRENT
Final score including all periods
A few examples (not all scores) from the Euro 2024 quarter-final (Spain vs Germany):
Displaying current score
To display the latest scores for a game, always use the CURRENT indicator. This ensures you show the most up-to-date score regardless of whether the match included extra time or penalties.
Nested includes
The scores include supports the following nested includes for additional information:
scores.type
Get detailed information about the score type:
This returns the type object with details about the score period.
scores.participant
Get detailed information about the team (participant):
This returns team information including name, logo, and other details.
Example with nested includes:
Code examples
Python Example
JavaScript example
Common use cases
1. Live Score Display
Display live scores that automatically update with the most current match state:
2. Half-time vs Full-time analysis
Compare first half and full-time scores to identify second-half comebacks:
3. Statistical analysis
Build datasets for machine learning or statistical analysis:
Best practices
Always use CURRENT for live updates: Don't rely on calculating 1ST_HALF + 2ND_HALF, as extra time and penalties will make this incorrect.
Check for extra time and penalties: Before displaying results, check if
EXTRA_TIMEorPENALTIESdescriptions exist.Use nested includes for complete data: Include
scores.participantto get team names and logos without additional API calls.Cache historical data: Scores don't change after a match ends. Cache completed matches to reduce API calls.
Handle missing data gracefully: Not all matches have all score types immediately available during live matches.
Related includes
Participants - Get team information for the scoring teams
Events - See individual goal events with scorers
Statistics - Combine scores with match statistics for analysis
Periods - Get timing information for when goals were scored
Summary
The scores include provides comprehensive scoring data for all match periods including regular time, extra time, and penalties. With support for nested includes and clear score type descriptions, it enables accurate live score displays, statistical analysis, and historical score tracking. Always use the CURRENT description to display the most up-to-date score.
Last updated
Was this helpful?