Match Event Data (MLS) API

This endpoint returns an entire MLS Soccer match event data session in the form of sequential timestamped packets covering the MLS match. The endpoint can be filtered by the specific MLS fixtureId for that match and returns each phase of the match action along with the preceding connected match event (for example a pass assist leading to a shot on goal).

Key information within the response is as follows:

  • Name of the competition

  • Competition & Season Id

  • Action type

  • Clock time

  • Direction of play

  • Period (1st or 2nd Half)

  • XY coordinate position of match event

  • Target Player details including shirt number and Id (if applicable)

  • XY coordinate of target player

  • (Preceding) Passing/Shooting player details including shirt number and Id

  • Team name and details

  • Competition name and details

Endpoint URLs

https://dde-api.data.imgarena.com/soccer/fixture/{fixture_id}/events

Polling Frequency

We recommend the following frequency for your REST requests to ensure that you have the most up-to-date information at all times:

Frequency

Every 30 seconds for media usage

Required Headers

Key

Value

Accept

application/vnd.imggaming.dde.api+json;version=1

Content-Type

application/json

Authorization

Bearer eyvhaoudfgpdfgo*

*Authorization header includes a truncated Bearer token, contact IMG for your auth token if you do not have.

Request Parameters

This endpoint currently takes a fixture_id in the url header to fetch the correct MLS fixture.

Response Model

Action Id object

Field Name

Type

Description

actionId

alpha numeric

actionId is a composite key of matchId , eventId and actionType

actionTypeId

int

The ID of the actionType (Pass, Shot..)

actionTypeMetadata

string

Type of metadata contained in packet (Pass, Shot, Save..)

clockTime

dateTime

The clock time within the match fixture (001:39:23) means 1 minute 39 seconds into the match

competitionId

alpha numeric

The ID of the competition (i.e. MLS or MLS Cup)

directionOfPlay

string

Determined at start of period of play (first half, second half, etc)

Specifies what direction the team is playing - whether rightToLeft or leftToRight

eventId

number

The ID of the event within the match

eventTime

UTC dateTime

The timestamp of the event which differs from clockTime, for example:

(2024-02-22T01:10:28.953Z)

fixtureId

alpha numeric

The MLS Fixture ID

isSuccessful

boolean

Setting isSuccessful conditionally if the action resulted in a successful completion (successful pass, successful shot on goal)

messageId

alpha numeric

messageId is a unique ID for each produced packet

metadata object { }

object array

This is an array consisting if detailed contextual meta data explaining the action, player and position of the event, wtih details such as type of event (pass, shot, save), distance of (pass, shot), current player position of event, player details, target the pass/shot was aimed for.

targetPosition

Key Value Pair Object Array

The XY position of the target of this action

Parent action Id object

Field Name

Type

Description

parentActionId

string

One EventId may map to several packets, this field maps to the predecessor packet

The first packet will have no parentActionId

For example SuccessfulShot will create two SPS packets shot and goal

shot will have no parent

goal parent will map to shot actionId

period

string

(first half, second half)

player object { }

object array

This is an array consisting of high level data around the player who provided the preceding action, including name, id, shirt number

seasonId

alpha numeric

The ID of the MLS season

stageId

alpha numeric

The stage ID within the season/event (Semi final of cup), (last game of the regular season)

team object { }

object array

This is an array consisting of high level data around the team in possession

teamPossessionPhaseId

int

This describes the phase of play and is an incrementing value according ballPossessionPhase

Not necessarily inline with time the event occurred

Actions List (Described in 'actionTypeMetadata' object)

All Event Action types that are returned from the endpoint

    pass
    launch
    shot
    duel
    offside
    cornerAwarded
    freeKickAwarded
    throwInAwarded
    throwInTaken
    goalKickAwarded
    offsideFor
    card
    dribble
    tackle
    interception
    clearance
    cross
    
    goalkeeperCollection
    goalkeeperPunch
    goalkeeperCatch
    goalkeeperDrop
    goalkeeperSave
    goalkeeperPenaltyFaced
    goalkeeperThrow
    
    varPending
    varDecision

    bigChance 
    
    playerOn 
    playerOff
    substitution
    playStopped
    playResumed
    penaltyAwarded
    penaltyTaken

    goal
    ownGoal
    
    aerial
    dispossessed
    ballTouch
    ballRecovery
    block
    badTouch
    
    lineup
    clock
    addedTime
    postMatchChecks
    startPeriod
    endPeriod
    startFixture     
    endFixture

Sample Response Extracts

{
  "actionId": "ffd223fc-b185-3b16-9483-f6ec5655aa1f",
  "actionTypeId": "13",
  "actionTypeMetadata": "pass",
  "clockTime": "000:21:48",
  "competitionId": "be0b9007-03c3-463b-b22b-27cd871c9b6d",
  "directionOfPlay": "rightToLeft",
  "eventId": 610200000031,
  "eventTime": "2024-02-22T01:10:28.953Z",
  "fixtureId": "15f25cc4-6abb-4e31-bb60-d8bc27e8229f",
  "isSuccessful": true,
  "messageId": "cef80a50-efb7-47eb-8b99-3dffceabd2d0",
  "metadata": {
    "pass": {
      "actionContext": null,
      "direction": -2.16,
      "distance": 11.34,
      "isAssist": null,
      "period": "first",
      "position": { "X": 0.46, "Y": 0.91 },
      "targetPlayer": {
        "externalId": "MLS-OBJ-0000OR",
        "firstName": "Julian",
        "fullName": "Julian Gressel",
        "id": "7f0fd1f1-a97a-4a2b-8485-747922953850",
        "lastName": "Gressel",
        "shirtNumber": 24
      },
      "targetPosition": { "X": 0.44, "Y": 0.75 }
    }
  },
  "parentActionId": null,
  "period": "first",
  "player": {
    "externalId": "MLS-OBJ-0000A9",
    "firstName": "DeAndre",
    "fullName": "DeAndre Yedlin",
    "id": "636986b6-722f-4757-9efa-109aea914b89",
    "lastName": "Yedlin",
    "shirtNumber": 2
  },
  "seasonId": "d2f17733-371f-4d06-b207-07989ce96eee",
  "stageId": "7c574987-6ff0-4c0b-809c-1d66f20dc5a3",
  "team": {
    "externalId": "MLS-CLU-000008",
    "id": "734bfa38-5ed7-4dcd-90e4-b957e58a7db2",
    "name": "Inter Miami CF"
  },
  "teamPossessionPhaseId": 31
},
{
  "actionId": "80ab1098-a543-3658-b622-5bc8bc12d11d",
  "actionTypeId": "14",
  "actionTypeMetadata": "shot",
  "clockTime": "082:55:47",
  "competitionId": "be0b9007-03c3-463b-b22b-27cd871c9b6d",
  "directionOfPlay": "rightToLeft",
  "eventId": 610200001226,
  "eventTime": "2024-02-22T02:54:07.718Z",
  "fixtureId": "15f25cc4-6abb-4e31-bb60-d8bc27e8229f",
  "isSuccessful": true,
  "messageId": "d9d1c6c3-f0b4-4cf5-9dce-508be62bce8d",
  "metadata": {
    "shot": {
      "assistPlayer": {
        "externalId": "MLS-OBJ-000528",
        "firstName": "Luis",
        "fullName": "Luis Suarez",
        "id": "8e6bbe99-6ab3-409e-ace1-91877f54c5f8",
        "lastName": "Suarez",
        "shirtNumber": 9
      },
      "attemptType": "On target",
      "ballPosition": null,
      "blockersPosition": null,
      "bodyPart": "Right foot",
      "extras": ["Assist"],
      "patternOfPlay": "Regular play",
      "position": { "X": 0.1, "Y": 0.4 },
      "xG": 0.2093
    }
  },
  "parentActionId": null,
  "period": "second",
  "player": {
    "externalId": "MLS-OBJ-0003CX",
    "firstName": "Diego",
    "fullName": "Diego Gomez",
    "id": "7790e4c7-2c24-4f47-ab2e-8f0df9e81116",
    "lastName": "Gomez",
    "shirtNumber": 20
  },
  "seasonId": "d2f17733-371f-4d06-b207-07989ce96eee",
  "stageId": "7c574987-6ff0-4c0b-809c-1d66f20dc5a3",
  "team": {
    "externalId": "MLS-CLU-000008",
    "id": "734bfa38-5ed7-4dcd-90e4-b957e58a7db2",
    "name": "Inter Miami CF"
  },
  "teamPossessionPhaseId": 1226
},
{
  "actionId": "c6022b38-6791-3ec7-b642-a7ff5481e99e",
  "actionTypeId": "47",
  "actionTypeMetadata": "goal",
  "clockTime": "082:55:47",
  "competitionId": "be0b9007-03c3-463b-b22b-27cd871c9b6d",
  "directionOfPlay": "leftToRight",
  "eventId": 610200001226,
  "eventTime": "2024-02-22T02:54:07.718Z",
  "fixtureId": "15f25cc4-6abb-4e31-bb60-d8bc27e8229f",
  "isSuccessful": null,
  "messageId": "8be56b41-5257-4539-babb-1131cffe9c84",
  "metadata": {
    "goal": {
      "assistPlayer": {
        "externalId": "MLS-OBJ-000528",
        "firstName": "Luis",
        "fullName": "Luis Suarez",
        "id": "8e6bbe99-6ab3-409e-ace1-91877f54c5f8",
        "lastName": "Suarez",
        "shirtNumber": 9
      },
      "ballPosition": null,
      "blockersPosition": null,
      "bodyPart": "Right foot",
      "extras": ["Assist"],
      "patternOfPlay": "Regular play",
      "position": { "X": 0.1, "Y": 0.4 }
    }
  },
  "parentActionId": "80ab1098-a543-3658-b622-5bc8bc12d11d",
  "period": "second",
  "player": {
    "externalId": "MLS-OBJ-0003CX",
    "firstName": "Diego",
    "fullName": "Diego Gomez",
    "id": "7790e4c7-2c24-4f47-ab2e-8f0df9e81116",
    "lastName": "Gomez",
    "shirtNumber": 20
  },
  "seasonId": "d2f17733-371f-4d06-b207-07989ce96eee",
  "stageId": "7c574987-6ff0-4c0b-809c-1d66f20dc5a3",
  "team": {
    "externalId": "MLS-CLU-000008",
    "id": "734bfa38-5ed7-4dcd-90e4-b957e58a7db2",
    "name": "Inter Miami CF"
  },
  "teamPossessionPhaseId": 1226
},

Last updated