Football isn’t the most important topic in life, but it is a close call! Just imagine you’re stuck somewhere and cannot watch the match of your favourite team. You will end up constantly updating the match statistics with the following disappointment that nothing has changed. Luckily, there are a couple of powerful APIs with football statistics available which you can use to create a nice bot providing you with match updates.

In the last few weeks, I worked on integrating APIs for football statistics. I published the source code on GitHub. I focused on two APIs: Fastest Live Scores and openLigaDB

Fastest Live Scoresopen Liga DB
Free
No registration
Bundesliga included
Number of leagues~150~400

So far, the voting would be in strong favor for openLigaDB because it is free and covers more leagues. However, we are not interested in all leagues. As football fans, you would typically have a single team you cheer for. As I live in the beautiful city of Darmstadt, my team of choice are the Lilien. The purpose of this post is not to do a scientifically sound evaluation, but rather to show the subjective opinion of a bot developer.

The title was taken from a joint work with Tobias Horsmann about the evaluation of Part-of-Speech Taggers (Fast or Accurate? A Comparative Evaluation of PoS Tagger Models). Back then, we evaluated taggers based on how fast they process text and how good the resulting output is. In terms of football statistics, this translates to how fast the access to the API is and how soon after a goal the score is updated.

For the following analysis, data from the match between Werder Bremen and FC Augsburg were collected. This is mainly due to the higher number of goals which was not the case for the match between Darmstadt 89 and Eintracht Frankfurt a day earlier.

Access speed to the API highly depends on the implementation. The need for authentication for Fastest Live Scores is most likely to affect the request speed.

Fastest Live Scoresopen Liga DB
Minimum98846
Maximum216882
Standard deviation1975
Median128352
Mean131053

All values are shown in milliseconds. There seems to be a significant difference between both APIs, but analysis has shown that the implementation for Fastest Live Scores is incredibly inefficient. Basically, it loads the entire match day with nine matches and then searches for the desired team. The amount of information provided by the API is also much larger than for openLigaDB.

Access time of a couple of seconds would not make any difference for most of the bots. These bots are usually designed in a way that they access the API roughly every 20 to 120 seconds. It is much more important how fast the score is updated. The following table shows the time of the goal and the delay of both APIs for each goal.

GoalMinute of matchFastest Live Scoresopen Liga DB
1:045+2 minutes+ 0 minutes+ 2 minutes
1:152 minutes+ 0 minutes+ 1 minute
1:273 minutes+ 0 minutes+ 3 minutes

Fastest Live Scores has this name for reason. It really provides the fastest live score. It is hard to claim a winner as the two APIs have a different focus. Fastest Live Scores is not exactly cheap but returns the current score much faster than openLigaDB which is incredibly easy to integrate. To sum up, the choice of API for your bot really depends on how fast the score needs to be updated and how much you want to pay for it.

The people behind Fastest Live Scores pointed out that they have the advantage of collecting statistics from crowd sourcing instead of crawling media sites or adding it manually. It’s definitely very important that there is not only a single option and crowd sourcing is a perfect choice in domains with motivated consumers.

What’s next? It’s the decade of the chatbots and if they are really supposed to behave like humans, they should be able to talk about football – a lot! Let’s start building some football bots!