Skip to main content
GET
/
games
/
commentary
Game Commentary
curl --request GET \
  --url https://v1.football.sportsapipro.com/games/commentary \
  --header 'x-api-key: <api-key>'

Overview

The Match Commentary endpoint provides real-time play-by-play commentary for games, including match analysis, key events, and post-match summaries. Commentary is available during live matches and for completed games.

Parameters

gameId
integer
required
The unique game/match identifier.
fixtureId
string
required
The fixture identifier for play-by-play data (also known as matchupId). Can be obtained from game details response under playByPlay.fixtureId.
filter
string
default:"all"
Commentary filter:
  • all - Returns all commentary messages
  • top - Returns key/highlighted moments only (preview)
isLive
boolean
default:"false"
Set to true for live matches to get real-time commentary updates.
isFinished
boolean
default:"true"
Set to true for finished matches, false for ongoing matches.
All LastModified timestamps use ISO 8601 format with UTC timezone (e.g., 2025-12-17T21:22:59Z). Commentary timestamps are always returned in UTC regardless of client timezone.

Request

curl -X GET "https://v1.football.sportsapipro.com/games/commentary?gameId=4452706&fixtureId=2yuulrtp37mbqe9rok936lslw&filter=all" \
  -H "x-api-key: YOUR_API_KEY"

Response

{
  "Messages": [
    {
      "Id": 75,
      "InnerId": "10l77cskp8etg1l1omc43oha2w",
      "Comment": "Barrott blows his whistle for one final time then and it's Man City who coast into the EFL Cup semi-finals thanks to a 2-0 win over Brentford in this last-eight contest at the Etihad Stadium...",
      "Type": 4,
      "TypeName": "comment",
      "Period": "14",
      "LastModified": "2025-12-17T21:22:59Z"
    },
    {
      "Id": 74,
      "InnerId": "uyjgus6b2eyw1diutdxoo5a51",
      "Comment": "FULL-TIME: MANCHESTER CITY 2-0 BRENTFORD",
      "Timeline": "90",
      "Type": 4,
      "TypeName": "comment",
      "Period": "2",
      "LastModified": "2025-12-17T21:22:23Z",
      "TimeLineSecondaryText": "+3'",
      "TimeLineSecondaryColor": "#FF5200"
    },
    {
      "Id": 73,
      "InnerId": "nxdsl7nmkbza1w84jikyhoz0j",
      "Comment": "Cherki has been awarded the Man of the Match award and, purely for his outstanding goal (an early Christmas cracker if you will), he probably deserves it.",
      "Timeline": "90",
      "Type": 4,
      "TypeName": "comment",
      "Period": "2",
      "LastModified": "2025-12-17T21:21:07Z",
      "TimeLineSecondaryText": "+2'",
      "TimeLineSecondaryColor": "#FF5200"
    }
  ],
  "UpdateURL": "",
  "TTL": 60
}

Response Fields

Root Level

FieldTypeDescription
MessagesarrayArray of commentary messages
UpdateURLstringReserved field (stripped from response for security)
TTLintegerCache TTL in seconds (typically 60)

Message Object

FieldTypeDescription
IdintegerUnique message ID (sequential)
InnerIdstringInternal unique identifier
CommentstringThe commentary text
TimelinestringMatch minute when the event occurred
TypeintegerMessage type ID
TypeNamestringMessage type name
PeriodstringMatch period identifier
LastModifiedstringISO 8601 timestamp of last modification
TimeLineSecondaryTextstringAdditional time info (e.g., “+3’” for stoppage time)
TimeLineSecondaryColorstringColor for stoppage time display

Message Types

TypeTypeNameDescription
1goalGoal scored
2yellow_cardYellow card shown
3red_cardRed card shown
4commentGeneral commentary
5substitutionPlayer substitution
6period_startPeriod started
7period_endPeriod ended
8penaltyPenalty event
9varVAR decision

Period Values

PeriodDescription
”1”First half
”2”Second half
”3”First half extra time
”4”Second half extra time
”5”Penalty shootout
”14”Post-match summary

Obtaining the fixtureId

The fixtureId is available in the game details response under the playByPlay object:
// First, get game details
const gameDetails = await fetch(
  'https://v1.football.sportsapipro.com/games/details?gameId=4452706',
  { headers: { 'x-api-key': 'YOUR_API_KEY' } }
);
const data = await gameDetails.json();

// Extract fixtureId from playByPlay
const fixtureId = data.game.playByPlay?.fixtureId;
// Example: "2yuulrtp37mbqe9rok936lslw"

// Then fetch commentary
const commentary = await fetch(
  `https://v1.football.sportsapipro.com/games/commentary?gameId=4452706&fixtureId=${fixtureId}`,
  { headers: { 'x-api-key': 'YOUR_API_KEY' } }
);

Real-time Updates

For live matches, use the UpdateURL to fetch only new messages after a certain ID:
// Initial fetch
const initial = await fetchCommentary(gameId, matchupId);
let lastId = initial.Messages[0]?.Id;

// Poll for updates
setInterval(async () => {
  const updates = await fetch(initial.UpdateURL + `&afterItem=${lastId}`);
  const newData = await updates.json();
  
  if (newData.Messages.length > 0) {
    lastId = newData.Messages[0].Id;
    // Process new messages
  }
}, initial.TTL * 1000);

Use Cases

  • Display live match commentary feed
  • Show post-match analysis and summaries
  • Build match timeline with key events
  • Create highlight reels based on commentary
  • Track VAR decisions and penalties

Authorizations

x-api-key
string
header
required

Your SportsAPI Pro API key

Query Parameters

gameId
integer
required

Game identifier

Example:

4452706

fixtureId
string
required

Fixture ID from game details playByPlay.fixtureId

Example:

"2yuulrtp37mbqe9rok936lslw"

filter
enum<string>
default:all

Filter type: 'all' for all commentary, 'top' for highlights only

Available options:
all,
top
isLive
boolean
default:false

Set to true for live matches

isFinished
boolean
default:true

Set to true for finished matches

Response

200

Game commentary retrieved successfully