Livescore

Modified on Thu, 18 Apr 2024 at 05:26 PM

The livescore element holds all scores and statistics:

XML

<Livescore>
  <Scoreboard>
    <Status>2</Status>
    <CurrentPeriod>10</CurrentPeriod>
    <Time>1320</Time>
    <Results>
      <Position>1</Position>
      <Value>0</Value>
    </Results>
    <Results>
      <Position>2</Position>
      <Value>0</Value>
    </Results>
  </Scoreboard>
  <Periods>
    <Type>10</Type>
    <IsFinished>false</IsFinished>
    <IsConfirmed>false</IsConfirmed>
    <Results>
      <Position>1</Position>
      <Value>0</Value>
    </Results>
    <Results>
      <Position>2</Position>
      <Value>0</Value>
    </Results>
    <Incidents />
    <SubPeriods />
    <SequenceNumber>0</SequenceNumber>
  </Periods>
  <Statistics>
    <Type>1</Type>
    <Results>
      <Position>1</Position>
      <Value>2</Value>
    </Results>
    <Results>
      <Position>2</Position>
      <Value>2</Value>
    </Results>
    <Incidents />
  </Statistics>
  <Statistics>
    <Type>6</Type>
    <Results>
      <Position>1</Position>
      <Value>1</Value>
    </Results>
    <Results>
      <Position>2</Position>
      <Value>0</Value>
    </Results>
    <Incidents />
  </Statistics>
  <Statistics>
    <Type>7</Type>
    <Results>
      <Position>1</Position>
      <Value>0</Value>
    </Results>
    <Results>
      <Position>2</Position>
      <Value>0</Value>
    </Results>
    <Incidents />
  </Statistics>
  <Statistics>
    <Type>8</Type>
    <Results>
      <Position>1</Position>
      <Value>0</Value>
    </Results>
    <Results>
      <Position>2</Position>
      <Value>0</Value>
    </Results>
    <Incidents />
  </Statistics>
  <Statistics>
    <Type>10</Type>
    <Results>
      <Position>1</Position>
      <Value>0</Value>
    </Results>
    <Results>
      <Position>2</Position>
      <Value>0</Value>
    </Results>
    <Incidents />
  </Statistics>
  <LivescoreExtraData>
    <Name>Turn</Name>
    <Value>0</Value>
  </LivescoreExtraData>
</Livescore>

Json

{
  "Scoreboard": {
    "Status": 2,
    "CurrentPeriod": 10,
    "Time": "1320",
    "Results": [
      {
        "Position": "1",
        "Value": "0"
      },
      {
        "Position": "2",
        "Value": "0"
      }
    ]
  },
  "Periods": [
    {
      "Type": 10,
      "IsFinished": false,
      "IsConfirmed": false,
      "Results": [
        {
          "Position": "1",
          "Value": "0"
        },
        {
          "Position": "2",
          "Value": "0"
        }
      ],
      "Incidents": null,
      "SubPeriods": null,
      "SequenceNumber": 0
    }
  ],
  "Statistics": [
    {
      "Type": 1,
      "Results": [
        {
          "Position": "1",
          "Value": "2"
        },
        {
          "Position": "2",
          "Value": "2"
        }
      ],
      "Incidents": null
    },
    {
      "Type": 6,
      "Results": [
        {
          "Position": "1",
          "Value": "1"
        },
        {
          "Position": "2",
          "Value": "0"
        }
      ],
      "Incidents": null
    },
    {
      "Type": 7,
      "Results": [
        {
          "Position": "1",
          "Value": "0"
        },
        {
          "Position": "2",
          "Value": "0"
        }
      ],
      "Incidents": null
    },
    {
      "Type": 8,
      "Results": [
        {
          "Position": "1",
          "Value": "0"
        },
        {
          "Position": "2",
          "Value": "0"
        }
      ],
      "Incidents": null
    },
    {
      "Type": 10,
      "Results": [
        {
          "Position": "1",
          "Value": "0"
        },
        {
          "Position": "2",
          "Value": "0"
        }
      ],
      "Incidents": null
    }
  ],
  "LivescoreExtraData": [
    {
      "Name": "Turn",
      "Value": "0"
    }
  ]
}



Scoreboard Model

ElementData TypeDescription
StatusintThe current status of the match.
CurrentPeriodintThe current period or stage of the match.
Time
intThe time elapsed in the current period or stage of the match.
Represented in seconds.
ResultsArrayAn array containing results specific to the match
LivescoreExtraData
ArrayAn array of extra data


Results  Model

SourceData TypeDescription
PositionstringThe position or team identifier associated with the result.
In 2-participant events, the positions will be 1 (home) or 2 (away)
For outright events, the positions will represent the initial position of the participant
Value
intThe value or score associated with the respective position or team.

Periods Model

AttributesData TypeDescription
TypeenumThe type of the period. Describe the nature of the period within the context of the sport (e.g., first half, second half).
IsFinishedboolIndicates whether the period is finished or not
IsConfirmedboolIndicates whether the period and its scores are confirmed
Periods.ResultsArrayAn array containing period-specific results.
SubPeriods
ArrayRelevant for tennis only, subperiod is the game inside a set. 
SequenceNumber
intA sequence number assigned to the period for ordering purposes.
IncidentsArrayAn array of incidents related to this period.

Note: Delivering the IsFinished as true and the IsConfirmed as false means we couldn't validate the final result of the specific period


Incident Model

Every period element may contain a list of incidents (e.g. goals that were scored). Incidents will appear as long as we have the information.

Note: Incidents may be sent after a final status had been received.

AttributesData TypeDescription
PeriodenumThe type of period, in which the incident had occurred
IncidentTypeenum
The type of the incident (Values here)
SecondsboolTime of incident occurrence
ParticipantPositionint
In 2-participant events, the positions will be 1 (home) or 2 (away)

For outright events, the positions will represent the initial position of the participant
PlayerIdIntThe unique identifier of the player responsible for the incident 
PlayerNamestringThe name of the player responsible for the incident
Incident.ResultsArrayAn array containing results specific to the incident



For Cricket Only - SubPeriods represent the number of Runs made within the last Over in addition the number of Overs played so far will be shown under SequenceNumber - as can be seen in the following example Here

Note: SequanceNumber is only relevant for Cricket at the moment.



Statistics Model

AttributesData TypeDescription
TypeenumThe type of statistical data provided.
Statistics.Resultsenum
An array containing statistical results categorized by the type.
IncidentsArray
An array of incidents related to this statistic type





Livescore important notes


  1. Periods, scores, statistics, and time MAY be reverted due to mistakes made by the data providers.
  2. The current total score of the event can be found under the Scoreboard element. The score for every individual period can found within the Period elements.
    Note: Every period contains the score relevant to that period alone
  3. As a part of our data quality improvement, new periods and statistical types may be added all the time. Make sure your system is dynamic enough to cope with unidentified types.
  4. A loss of coverage will occur if we are not able to provide data for an event due to technical difficulties or faulty data.
    Note: Should a loss of coverage occur – all bets will be suspended.
  5. There are several events that we are offering live up to 30 minutes before the event’s actual start time. Those events will be sent with the status “9”, which indicates that the event is about to start. The status is the attribute of the Scoreboard element.
  6. The period type “80” stands for “BreakTime”. This period applies to ANY break during the live event. The type of the break will be in the Description attribute of the Scoreboard element, as seen below:
<Scoreboard Status="2" CurrentPeriod="80" Description=”1” Time="2700">
  <Score Position="1">2</Score>
  <Score Position="2">1</Score>
</Scoreboard>

Football

  • Time
    • Time direction will be ascending until the end of the half.
    • During halftime, the time will always be 2700 seconds.
    • During overtime halftime, the time will always be 6300 seconds.
    • When the event is finished (without overtime), the time will always be 5400 seconds.
    • When the event is finished (after overtime), the time will always be 7200 seconds.
    • During penalties, there will be no time available.

Basketball

  • Time
    • Time direction will always be descending.
    • At the end of every period, the time will be set to 0.
  • Periods
    • During NCAA events (College male basketball), the periods will show as halves (10 – 1st Half, 20 – 2nd Half) instead of quarters as usual.

Tennis

  • Periods
    • When the Tennis match is finished, the period “60” (Game period) will be removed as it is no longer relevant.
    • The serving player will appear under the ExtraData element, within the “Turn” key. The possible values are 1 or 2 (according to the participant's position).



Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article