Team Event Minutes
On this football API documentation page, you can find out how you can get the minutes of the teams events in their last N matches.
Endpoint
Our other football API endpoints like: the one for match events or last team matches will give you respectively all the events in a given match or the data around the last several matches of a team. For statistical and match prediction purposes, this data might be insufficient. That is why we added the last matches team events API endpoint. Using this endpoint you can get the minutes of specific events as well as their count for a list of teams for up to 10 matches back in history. The response will not contain events if the match is currently in our live scores data.
Check this Football API endpoint in our postman collection. Download it now!
Parameters
| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| event_types | string | 1 | GOAL,GOAL_PENALTY | Comma separated list of event types that we want to get. You can see the full list on our match events football API endpoint |
| number | number | 1 | 10 | The number of latest matches that we want. This number needs to be between 1 and 10. |
| team_ids | string | 1 | 7,19 | Comma separated list of the id of the teams which event minutes we want to get |
Response
{
"success": true,
"data": {
"teams": [
{
"team_id": 7,
"matches": [
{
"match_id": 683244,
"events": [
{
"event_type": "GOAL",
"minute": 41
},
{
"event_type": "GOAL",
"minute": 43
},
{
"event_type": "GOAL",
"minute": 67
},
{
"event_type": "GOAL",
"minute": 90
}
]
},
{
"match_id": 682374,
"events": [
{
"event_type": "GOAL",
"minute": 15
},
{
"event_type": "GOAL",
"minute": 21
},
{
"event_type": "GOAL",
"minute": 50
},
{
"event_type": "GOAL",
"minute": 57
},
{
"event_type": "GOAL",
"minute": 61
},
{
"event_type": "GOAL",
"minute": 90
}
]
}
]
},
{
"team_id": 19,
"matches": [
{
"match_id": 683454,
"events": [
{
"event_type": "GOAL",
"minute": 19
},
{
"event_type": "GOAL",
"minute": 56
},
{
"event_type": "GOAL",
"minute": 90
}
]
},
{
"match_id": 681911,
"events": [
{
"event_type": "GOAL",
"minute": 37
},
{
"event_type": "GOAL",
"minute": 50
},
{
"event_type": "GOAL",
"minute": 87
}
]
}
]
}
]
}
}| Name | Type | Example | Description |
|---|---|---|---|
| teams | array | [] | List of the teams that you requested in the team_ids parameter |
| teams.matches | array | [] | List with the number of matches that you requested of that specific team. |
| teams.matches.events | array | [] | List of the events in the match for that team only. If there are no events of that type of that team the array will be empty. |
| teams.matches.events.event_type | string | GOAL | The type of the event that happened as per our events tuypes |
| teams.matches.events.minute | number | 56 | The minute in which the event happned. |
| teams.matches.match_id | number | 683244 | The id of the match to which the events belong |
| teams.team_id | number | 19 | The id of the team in question |
Important considerations
Missing events
If the events that you asked for are not related directly to the team in question it will not appear in the response of the endpoint. For example, in the match from the UEFA Nations League between France and Croatia there are no RED_CARD events so if you ask for that event you will see an empty events array.
Events of the opponent
In the same match 335680 Luka Modric scored from a penalty. If your event_types parameter contains the GOAL_PENALTY and the team_ids contains both the team IDs of France and Croatia, you will see that the events array of France is empty and there is a GOAL_PENALTY event in Croatia's data on minute 5.
Summing the events
Since the events of a given team appear only its data it is safe to sum the events of all matches of that team to arrive at the total. In the football API example from above it is safe to assume that Liverpool id=7 have scored 9 goals in total in the 2 matches listed.
OWN_GOAL
Even though own goals are scored by the opponent, own goals are counted in favor of the team that benefits from it. So you can get the list of all goals in favor of a team by providing the 3 goal types events event_types=GOAL,GOAL_PENALTY,OWN_GOAL. For example, if Harry Maguire scores an own goal in the goal of Manchester United id=19 his own goal will not appear in the list of event minutes for Manchester United with the all goals vent types. It will appear in the events of United's opponent goals.