Update 11:52

We've added a new endpoint for touch events! See example here:

Touch events

It covers good and bad passess with player, receiving player and coordinates

Data Sources

Here you'll find a number of data sources you may wish to utilize as you build your project.

Stats.com have supplied us with some amazing Premier League data in a static format. It covers all the matches from a couple of weekends ago. You can access this data in three ways:

You'll be told how you can get the XML files on the day. Even if you don't want to directly access the XML files you'll still need them.

For both the REST API and to publish data to Pusher so you can build real-time front-end applications you'll need the Source of the Football API (built by X8) so you can run it locally.

How to Use the Football API

The Football API is a Ruby application that lets you access data via a RESTful API and stream the data via Pusher so you can simulate building real-time applications from .

Get the Code

You can clone get the code via GitHub.

Add the XML Files

Once you have the code locally you need to unzip the archive that contains the XML data source files into the db directory.

Running the REST API

Running the app will require:

bundle install
bundle exec rails s

Navigate to http://localhost:3000/api/leagues.json to check things work.

You can get an example of the API that it exposes via this interactive apiary guide

Running the Real-Time Event Feed

You can use a replay script to simulate a live match and publish match events via Pusher.

First you'll need a free Pusher account. So, Sign Up. Once you've signed up take a note of your application credentials.

You can check the data is being published on the Pusher website. Go into your app on your dashboard and check out your debug console. You should see the events triggered in realtime.

You can subscribe to the events in your client and use them within your application.

var pusher = new Pusher('YOUR_APP_KEY');
var livManUMatch = pusher.subscribe('match-1439948');
livManUMatch.bind('event', function(data) {
  // Update app

For example, you can replay Liverpool vs Manchester United action by action. In order to start the replay run script/replay and supply the ID of the match you want to simulate:

bundle exec ruby script/replay.rb 1439948
Here are the matches and their IDs:
ID Match
1439939 Aston Villa vs Swansea
1439950 Manchester City vs WBA
1439952 Newcastle vs Arsenal
1439958 Southampton vs Burnley
1439966 Tottenham vs Leicester
1439963 Stoke vs Crystal Palace
1439969 West Ham vs Sunderland
1439948 Liverpool vs Manchester United
1439955 QPR vs Everton
1439943 Hull vs Chelsea

A Simple Example App that Uses the API

You can see an early-stage example app here.