Eredivisie Live Scores

FREEMIUM
By Simone | Updated 2 years ago | Sports

README

The <b>Eredivisie Live Scores</b> is out!
Give a look at the list of its unique features.
Have fun!

<b>The Eredivisie Ninja Team</b>
It’s possible to retrieve all the matches results calling the endpoint
<a href=“https://market.mashape.com/heisenbug/eredivisie-live-scores#season-matches-results”>/api/eredivisie</a>
You can call the API
-without submitting any parameter, to get all the matches for the day (if there isn’t any match for the day you will get a 500 server error, that it isn’t count as an API call)
-submitting the parameter date, to retrieve the matches for that date (in the format mmddyyyy)
-submitting the parameter team1, to retrieve the matches that the team has played at home (together with team2 return that very match)
-submitting the parameter team2, to retrieve the matches that the team has played away (together with team1 return that very match)
-submitting the parameter matchday, to retrieve the matches for that round

If matches are already played, the API will give you data about red cards number if any, referee, final and first half scores too, otherwise only the matches that will be played.

Take in mind that this API returns only final results ("time":"FT") or not already played matches, and the final ones only after a while the matches are really finished (usually after few minutes); if you need live updates you have to set thelive parameter to true (in this case time returns the minute for the match), if there isn’t any playing match for the parameters specified, the API give you the 500 error message ‘No games found’.
Take in mind that a live request can continue to give you the result even after a while, usually some hours, a match is finished; as soon as the API stop to give you the result for the match, you can get the result again removing the live parameter.
Using the endpoint API <a href=“https://market.mashape.com/heisenbug/eredivisie-live-scores#league-table”>/api/eredivisie/table</a> you will get the current table for the league.
The current table is compute considering all the finished games returned by the <a href="#wiki-matches-results">Matches results</a> API (the one with no live updates).
The API let you to restrict the games considered using the following three optional parameters
<code>from</code> to include all the games played from (default the first played game returned by the no live version of the season results API)
<code>to</code> to include all the games played till to (default the last played game return by the no live version of the season results API)
<code>mode</code> set to <b>home</b> to consider only home games, to <b>away</b> to consider only away games (default all games)
<code>time</code> to compute the table considering only the first half (FH) or the second half (SH). Default is full time (FT)

The JSON response give you data about the <code>team</code> name the game <code>played</code>, <code>win</code>, <code>loss</code>, <code>goalsFor</code>, <code>goalsAgainst</code> and <code>points</code>.
The API at the moment don’t take into account any penalization a team could have to compute the total points number.
It’s possible to get data about teams players and coaches for a game using one the following API
<a href=“https://market.mashape.com/heisenbug/eredivisie-live-scores#lineups-and-substitutes-for-a-match”>/api/eredivisie/formations</a>
The API requires two mandatory attributes, <code>team1</code> and <code>team2</code> to select the game of interest.
The result is a JSON object with two properties, <code>team1</code> and <code>team2</code>, where each team property is an object containing the <code>teamName</code> and the <code>players</code> properties, where the first one is the name of the team (equals to the one in the request) and the second one an object with the arrays <code>lineups</code> and <code>substitutes</code> with each array item equals to an object containing the <code>playerNumber</code>, that is the shirt number for the player and the <code>playerName</code> attribute.
Captain players are identified by the property <code>isCaptain</code>.

The lineups players are ordered from goalkeeper to forward, to get more insight on how players are on the pitch see the events <code>Module-Start</code> and <code>Module-Change</code> you can get from the <a href="#wiki-match-events">match events</a> request without forgetting the attribute <code>position</code> returned by the <a href="#wiki-player-statistics-for-a-match">player match statistics API</a>.

You can get the formations starting from 30 minutes before a match start using thelive parameter set to true, if the API give you the 500 error message, that means the game is already finished from a while or it’s not playing or not going to play.
Take in mind that a live request can continue to give you the result even after a while, usually some hours, a match is finished; as soon as the API stop to give you the result for the match, you can get the result again removing the live parameter.

The APIs can either respond with a 500 error if doesn’t exist a match for them team1 and team2 parameters in the request (values are case sensitive, use the <a href="#wiki-matches-results">matches results</a> requests to find out valid values to use).
It’s possible to get all the scorers for a match with a single API call.
There are two version for this API, one without live update <a href=“https://market.mashape.com/heisenbug/eredivisie-live-scores#match-scorers”>/api/eredivisie/scores</a> that get you the answer after a while the game is finished (usually after few minutes), and the other <a href=“https://market.mashape.com/heisenbug/eredivisie-live-scores#match-scorers-live”>/api/live/eredivisie/scorers</a> with live updates, that give you the answer while the match is still playing (check the <a href="#wiki-matches-results">matches results</a> API live version to know the games with goals).
All of the two versions require two mandatory parameters
<code>team1</code> that is the first team name of the match
and
<code>team2</code> that is the second team name for the match
(<u>the names are the ones returned by the <b>matches results</b> API</u>).

The JSON response contains the player name who scored the goal and the minute it was scored, more it can contains other attributes either that qualify better the kind of goal.
At the moment the attributes handled by the API are:
<code>isPenalty</code> true if the goal is scored from a penalty, default false
<code>isOwn</code> true if the goal is an own goal, default false
<code>isFromCorner</code> true if the goal is scored from a corner, default false
<code>isFreekick</code> true if the goal is scored from a free kick, default false
<code/>isLeftFoot</code> true if the goal is scored by left, default false
<code>isRightFoot</code> * true if the goal is scored by right, default false*
<code>isHead</code> true if the goal is scored by head, default false

The API give you an answer even if there isn’t any goal for a match, in that case the <code>goals</code> attribute will be an empty array.
The <a href=“https://market.mashape.com/heisenbug/eredivisie-live-scores#top-scorers”>/api/eredivisie/table/scorers</a> let you the get the top five scorers for the league.
The JSON result give you the player name, the number of goals scored in order from the first till the fifth and the number of those scored by penalty.
You can either use the optional parameters like
<code>player</code> to get the result only for the <i>player</i> name specified (useful to get the number of goals scored by those players that aren’t in top 5)
<code>team</code> *to get top five scorers only for the specified <i>team</i> *

If you specify an invalid player name or a player name that hasn’t scored any goal yet, you will get an empty response, that is:

{"scorers":[]}

The Eredivisie Live Scores API let you trace two different kind of events
Team events
Module-Start (tell you the team module, that is how players are on the pitch, as soon as the match start)
Module-Change (tell you each module change occurred during the match)
Players events
Yellow-Card
Red-Card
In and Out (substitutions)
Missed-Penalty (penalty failed)
Saved-Penalty (keeper save a penalty)
Saved-Goal (player avoid an already done goal, clearance off the line)
Shot-On-Post
Error-Goal (player error that lead to a goal)
Assist-Goal (when a player intentionally do an assist that lead to a goal)
Goal-Disallowed
Penalty-Won (the player that won the penalty)
Penalty-Commited (the player that committed a penalty foul)
Changed-Captain (the new captain player if the previous goes out)

All teams and players events give you the minute the event occurred,
teams events have a value attribute that get the value for the event (the team module),
players events instead a list of players name related to the event.

There are two version for the API, that is, with (<a href=“https://market.mashape.com/heisenbug/eredivisie-live-scores#match-events-live”>/api/live/eredivisie/match/events</a>) or without live updates (<a href=“https://market.mashape.com/heisenbug/eredivisie-live-scores#match-events”>/api/eredivisie/match/events</a>).
The version without live update get you the data only after a while the match is finished (usually within few minutes), the one with live updates instead get you real time data and stop to get you an answer after few minutes the game is finished (at that time you get the answer querying the no live version).

All the two API versions require two parameters
team1 that is the first team name
and
team2 that is the second team name
and returns all the events for the two teams.
The API requires two mandatory parameters
<code>team1</code> the first team name for the match
<code>team2</code> the second team name for the match.
In the JSON response you can find the following impressive amount of statistics for each team of the match selected:
<code>totalSaves touches aerialsWon passesTotal passesSuccessful cornersTotal cornersAccurate tackleSuccessful throwInsTotal</br>
aerialsTotal offensiveAerials defensiveAerials shotsOffTarget tacklesTotal dribblesLost shotsTotal shotsBlocked</br>
dribblesAttempted dribbledPast dispossessed foulsCommited shotsOnTarget offsidesCaught tackleUnsuccesful interceptions dribblesWon clearances possession</br>
goals foulsWon penatyWon penaltyCommited</code>
If a property is missing in the response its value is zero.

Take in mind that this API exists in two version, the one without live update <a href=“https://market.mashape.com/heisenbug/eredivisie-live-scores#match-statistics”>/api/eredivisie/match/stats</a> and the one with live update <a href=“https://market.mashape.com/heisenbug/eredivisie-live-scores#match-statistics-live”>/api/live/eredivisie/match/stats</a> with the second one one giving you real time statistics updates during the game and the first one giving you only the final statistics after a while the match is finished (when the first one stop to give you an answer).
It’s possible to get all the player statistics for a match using one of the two API version, the <a href=“https://market.mashape.com/heisenbug/eredivisie-live-scores#player-stats-for-a-match”>no live</a> and the <a href=“https://market.mashape.com/heisenbug/eredivisie-live-scores#player-stats-for-a-match-live”>live</a> one, with the first giving you the result only after a while the game is finished (usually within few minutes) and the second you giving you the result starting from the first minute match, until the match is over, that is with live updates.
The APIs require three mandatory parameters
<code>team1</code> the first team name for the match
<code>team2</code> the second team name for the match
<code>player</code> the player name for which you want to know statistics.

The result is a JSON format response containing player infos like age, weight, height and player match stats like dribble won, fouls committed.
The complete data list handle at the moment from the API follows:
player info
<code>isManOfTheMatch, shirtNo, name, weight, age, height, isFirstEleven, position</code>
player match stats
<code>totalSaves, touches, aerialsWon, passesTotal, passesSuccessful, cornersTotal, cornersAccurate, tackleSuccessful, <br>
throwInsTotal, aerialsTotal, offensiveAerials, defensiveAerials, shotsOffTarget, tacklesTotal, <br>
dribblesLost, shotsTotal, shotsBlocked, dribblesAttempted, dribbledPast, dispossessed, <br>
foulsCommited, shotsOnTarget, offsidesCaught, tackleUnsuccesful, interceptions, dribblesWon, <br>
clearances, possession, goals, foulsWon, penaltyWon, penaltyCommited</code>
If a property is missing in the response its value is zero.

For the <code>position</code> attribute you can get the following values:
GK = Goalkeeper
DM = Defensive Midfielder (1)
D = Defender (1)
M = Midfielder (1)
AM = Attacking Midfielder (1)
FW = Forward
Sub = substitute player

(1) the attribute value can have one letter more to specify better the field position, that is <code>C</code> for Center, <code>L</code> for Left and <code>R</code> for Right.
Missing players for a match
The API <a href=“https://market.mashape.com/heisenbug/eredivisie-live-scores#missing-players-for-a-match”>Missing players for a match</a> requires two mandatory parameters
<code>team1</code> and <code>team2</code>
and returns a response a few days before the match with continue updates till the start.
Even after a match is played, the API continue to give you the last answer.
The response returns for each team the player name who will miss with the reason.
If there is any doubt about the player will play the match, the reason will be inside a square bracket, otherwise the reason will be with no bracket.
Typical reasons are Injured, Suspended, Unfit, Other.

League players
The API <a href=“https://market.mashape.com/heisenbug/eredivisie-live-scores#league-players”>League players</a> requires only a mandatory parameter
<code>team</code>
and returns all the players for the team name specified.
In the response you will get
<code>playerName</code>
<code>age</code>
<code>position</code>
<code>isActive</code> that is if the player is still in the team or less.

Players details
The API <a href=“https://market.mashape.com/heisenbug/eredivisie-live-scores#player-details”>Player details</a> requires two mandatory parameters
<code>team</code>
<code>player</code>
and returns all data for the player name specified (the player name must by one returned by the previous API for that team name).
In the response you will get ah huge amount of data for the player, following a list of attribute you can find the the response (not all the attribute are applicable or available for all the players)
<code>completeName</code> you can find this when the player name is usually a nickname
<code>nameInCountry</code> you can find this when the player is named different in his country
<code>birthDate</code>
<code>birthPlace</code>
<code>nationalities</code>
<code>shirtNo</code>
<code>foot</code> right, left or both
<code>marketValue</code> the current value for the player, usually this value change during a season (ex. 2,00 Mill. € )
<code>playerAgent</code>
<code>inTeamSince</code>
<code>contractUntil</code>
<code>lastContractExtension</code>
<code>presences</code> in the current season
<code>asFirstEleven</code> presences in the current season in the first eleven
<code>minsPlayed</code> in the current season
<code>yellowCard</code>
<code>redCard</code>
<code>goal</code>
<code>goalOwn</code>
<code>formerNational</code> if the player has been a national but now no more
<code>currentNational</code>
<code>nationalPresences</code>
<code>nationalGoals</code>
<code>outfitter</code>
<code>twitter</code>
<code>facebook</code>
<code>instangram</code>
<code>isActive</code> that is if the player is still in the team or less.

You can query the API submitting the optional <code>honours</code> parameter (default false), in that case the API give you only the titles award by the players in his career.
<u>Take in mind that at the moment the API isn’t available for free subscription.</u>

Followers: 42
API Creator:
Rapid account: Simone
Simone
heisenbug
Log In to Rate API
Rating: 5 - Votes: 1