Match Analytics

The Match Analytics resources lets you access advanced player and team analytics related to events in a football match and derived from basic match data.

Match State

GET /v1/analytics/match/(matchID)/state

Returns the state of the match, i.e. the scoreline, at a specific match time. If no match time is passed, the final state of the match is returned.

Query Parameter:

Field Type Description
time string Match time in minutes, form of: <normal-time> {-,|:+}[stoppage-time]

Response Parameters:

Field Type Description
match uuid The unique ID of the football match.
homeTeam uuid The unique ID of the home team.
awayTeam uuid The unique ID of the away team.
timeMins integer Time of match state, in minutes of match time.
stoppage_mins integer Stoppage time of match state, in minutes of match time.
is_fulltime boolean The unique ID of the team credited with the goal.
homeGoals integer Number of goals scored by home team.
awayGoals integer Number of goals scored by away team.

Link Parameters:

Field URL Description
match Match Information representation.
homeTeam Home Team resource representation, club or national team.
awayTeam Away Team resource representation, club or national team.

Example #1:

Return the match state midway through the second half.

GET /v1/analytics/match/2f02ade7fa354ef6bb2f77b4453cfb16/state?time=67 HTTP/1.1
Host: api-connect.soccermetrics.net
Accept: application/json
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Server: gunicorn/18.0
Date: Fri, 25 Jul 2014 04:20:07 GMT
Connection: close
Content-Type: application/json
Content-Length: 1296

{
  "attribution": {
    "html": "<a href=\"http://www.soccermetrics.net\"><img src=\"http://soccermetrics-connect-v1.s3.amazonaws.com/logo/soccermetrics_logo.png\"/></a>",
    "logo": "http://soccermetrics-connect-v1.s3.amazonaws.com/logo/soccermetrics_logo.png",
    "source": {
      "html": "<a href=\"http://www.pressassociation.com\"><img src=\"http://soccermetrics-connect-v1.s3.amazonaws.com/logo/PressAssociation.png\"/></a>",
      "logo": "http://soccermetrics-connect-v1.s3.amazonaws.com/logo/PressAssociation.png",
      "name": "Press Association",
      "url": "http://www.pressassociation.com"
    },
    "text": "Powered by Soccermetrics Research",
    "url": "http://www.soccermetrics.net"
  },
  "meta": {},
  "result": [
    {
      "awayGoals": 0,
      "awayTeam": "bf44e6c22ce14846b44231d24ed7a29b",
      "homeGoals": 1,
      "homeTeam": "de0edd8fa095496e869dd382edbcf068",
      "isFulltime": false,
      "link": {
        "awayTeam": "/v1/countries/bf44e6c22ce14846b44231d24ed7a29b",
        "homeTeam": "/v1/countries/de0edd8fa095496e869dd382edbcf068",
        "match": "/v1/national/matches/2f02ade7fa354ef6bb2f77b4453cfb16/info"
      },
      "match": "2f02ade7fa354ef6bb2f77b4453cfb16",
      "stoppageMins": 0,
      "timeMins": 67
    }
  ]
}

Example #2:

The full-time match state.

GET /v1/analytics/match/2f02ade7fa354ef6bb2f77b4453cfb16/state HTTP/1.1
Host: api-connect.soccermetrics.net
Accept: application/json
HTTP/1.1 200 OK
Server: gunicorn/18.0
Date: Fri, 25 Jul 2014 04:23:24 GMT
Connection: close
Content-Type: application/json
Content-Length: 1296
Access-Control-Allow-Origin: *

{
  "attribution": {
    "html": "<a href=\"http://www.soccermetrics.net\"><img src=\"http://soccermetrics-connect-v1.s3.amazonaws.com/logo/soccermetrics_logo.png\"/></a>",
    "logo": "http://soccermetrics-connect-v1.s3.amazonaws.com/logo/soccermetrics_logo.png",
    "source": {
      "html": "<a href=\"http://www.pressassociation.com\"><img src=\"http://soccermetrics-connect-v1.s3.amazonaws.com/logo/PressAssociation.png\"/></a>",
      "logo": "http://soccermetrics-connect-v1.s3.amazonaws.com/logo/PressAssociation.png",
      "name": "Press Association",
      "url": "http://www.pressassociation.com"
    },
    "text": "Powered by Soccermetrics Research",
    "url": "http://www.soccermetrics.net"
  },
  "meta": {},
  "result": [
    {
      "awayGoals": 1,
      "awayTeam": "bf44e6c22ce14846b44231d24ed7a29b",
      "homeGoals": 3,
      "homeTeam": "de0edd8fa095496e869dd382edbcf068",
      "isFulltime": true,
      "link": {
        "awayTeam": "/v1/countries/bf44e6c22ce14846b44231d24ed7a29b",
        "homeTeam": "/v1/countries/de0edd8fa095496e869dd382edbcf068",
        "match": "/v1/national/matches/2f02ade7fa354ef6bb2f77b4453cfb16/info"
      },
      "match": "2f02ade7fa354ef6bb2f77b4453cfb16",
      "stoppageMins": 15,
      "timeMins": 90
    }
  ]
}
OPTIONS /v1/analytics/match/state

Returns documentation of the match state resource.

Match Segment

GET /v1/analytics/match/(matchID)/segment

Returns all segments of a match, which are defined at periods of play in which the players on the pitch are unchanged. Segments contain identification codes of the players on the pitch and players who had been sent off, and are separated by substitution and expulsion events.

The primary intent of the segment is to build adjusted plus/minus models, but there are other applications as well.

Query Parameter:

None

Response Parameters:

Field Type Description
startTimeMins integer Match time at start of segment.
startStoppageMins integer Stoppage time at start of segment.
duration integer Duration of segment in minutes.
homeGoals integer Number of goals scored by home team during segment.
awayGoals integer Number of goals scored by away team during segment.
homePlayersOn uuid Unique IDs of home team players on pitch during segment.
awayPlayersOn uuid Unique IDs of away team players on pitch during segment.
homePlayersExpelled uuid Unique IDs of home team players ejected in match, including segment.
awayPlayersExpelled uuid Unique IDs of away team players ejected in match, including segment.

Example:

Retrieve all the segments for a match (Colombia vs Japan in the 2014 FIFA World Cup).

GET /v1/analytics/match/1000373/segment HTTP/1.1
Host: api-connect.soccermetrics.net
Accept: application/json
HTTP/1.1 200 OK
Server: gunicorn/0.15.0
Date: Sat, 22 Feb 2014 06:38:52 GMT
Connection: close
Content-Type: application/json
Content-Length: 4838
Access-Control-Allow-Origin: *
OPTIONS /v1/analytics/match/segment

Returns documentation of the match segment resource.

Total Shot Ratio (Match)

GET /v1/analytics/match/(matchID)/tsr

Returns the Total Shot Ratio (TSR) statistic of the two teams competing in the football match, which is the ratio of all shots taken by a team to the total number of shots taken by both teams.

Query Parameter:

None

Response Parameters:

Field Type Description
match uuid The unique ID of the football match.
homeTeam uuid The unique ID of the home team.
awayTeam uuid The unique ID of the away team.
homeTeamName string The name of the home team.
awayTeamName string The name of the away team.
homeTeamTSR float The Total Shot Ratio of the home team.
awayTeamTSR float The Total Shot Ratio of the away team.

Link Parameters:

Field URL Description
match Match Information representation.
home_team Home Teams resource representation.
away_team Away Teams resource representation.
OPTIONS /v1/analytics/match/tsr

Returns documentation of the match Total Shot Ratio resource.