30

I'm mainly interested in soccer related statistics. There are quite a few different API's relating to soccer, but most of them are commercial and far, far out of my price range. I've looked at DBpedia, but a lot of their data is quite out of date.

3
  • 2
    Check out this newer question for World Cup 2014, it seems very promising: opendata.stackexchange.com/questions/1791/…
    – Ivar
    May 21, 2014 at 17:35
  • 1
    I have been collecting a list of soccer data sources at jokecamp.com/guide/2014/03/08/…
    – kampsj
    Aug 10, 2014 at 23:48
  • I would recommend xmlsoccer.com (xmlsoccer.com) - it’s pretty cheap (€10 per month) so it's not completely free, but it includes livescores, fixtures, results, odds, statistics etc. It also enables you to code for FREE against it using the Scottish Premier League as “demo-league” so you have unlimited time to develop your project. Full disclosure: I created it as a result of sitting in the same situation as you, and was a bit annoyed of lacking a reasonably priced API that was also fast and reliable. Best regards Michael
    – Michael
    Aug 5, 2017 at 20:09

19 Answers 19

11

Recently, the paper Linked Soccer Data was published. In it the authors describe how they combined various football-related datasets, such as http://fussballdaten.de/. Some of the data they covered can be viewed through this demo application.

The paper also mentions other relevant sources of football data, including the openfooty API.

8

If you agree that "the web is an API", you may scrape statistics from HTML pages. For instance, oddsportal.com has historical betting quotes.

I suppose this data is not open but maybe helpful for personal use/fun.

If you are using the programming language R, you might find this vignette on web scraping match data (PDF) helpful.

Today I found football-data.co.uk which provides a lot of statistics as CSV, for free (whatever that means).

1
  • 2
    That's what I've been doing, I was just hoping there might be an easier way out there. It's a shame this kind of thing doesn't exist. Aug 14, 2013 at 21:25
7

In Kaggle there is an "European Soccer Database" dataset.

25k+ matches and players stats for European Professional Football

https://www.kaggle.com/hugomathien/soccer

(download requires registration)

6

Check out the Equity in Athletics Disclosure website http://ope.ed.gov/athletics/ supported by the Office of Postsecondary Education (OPE), U.S. Department of Education (ED).

The downloadable data sets includes data such as: Participants by sport and gender, coaching staff and salaries, revenues and expenses by sport and "game day" and recruiting, and other supplemental information.

6

Doesn't seem to have soccer, but worth a look for other stats:

http://www.opensourcesports.com/

5

MLB has a Gameday API with baseball stats in XML form http://gd2.mlb.com/components/game/mlb/

It's described on this website http://gameday.timothyfisher.com/

3
  • 1
    This is interesting, and worth sharing... but I couldn't find anything that describes MLB's license or copyright on the data. It sounds like they've tolerated access to it for a few years. Oct 14, 2013 at 14:54
  • 1
    Looks like asker is specifically interested in soccer data though, not baseball.
    – Nicolas Raoul
    May 28, 2014 at 5:55
  • 1
    ahh the question was edited, before it was just sports stats
    – kim p
    May 28, 2014 at 19:01
4

football.db free open public domain football data
http://openfootball.github.io/
here's a python tool for fun
https://github.com/soccermetrics/soccermetrics-client-py

3

Last year, Manchester City FC opened up their collection of Opta Collected data. Here is a press release from Opta but the main site seems to have gone dark (or requires a specific old browser?).

2
3

Did you know about that one:

http://www.european-football-statistics.co.uk/index1.htm

Prof. Robert Simmons from Lancaster University (http://www.lancaster.ac.uk/lums/people/all/robert-simmons/) once introduced that to us in one of our M.Sc. Sport Management classes at the German Sport University Cologne.

3

FYI: I started the football.db project to collect open public domain football data. The public domain data sets are hosted on GitHub and also include ready-to-use pre-built single-file SQLite databases (e.g. worldcup.db, etc.) You can find a short intro article about the football.db project on the Open Knowledge Foundation (OKFN) Data Wrangler Blog titled "Using open football data - Get ready for the World Cup in Brazil 2014", for example. Cheers.

3

I use football-data.co.uk for 22 leagues, where a lot is provided, but some stats only for top leagues. If you want power rankings for particular teams, then football picks is also the option, but no API at the moment available. Of course you can combine knowldedge from livescore sites and then you can for instance build dataset of your own. Or you can go for opta sports and pay few thousands euros a month and you are perfectly equipped with everything! From what I tried, another APIs that should have been for free are either not working or not for free anymore. I hope this helps.

2

(Disclosure : I'm one of the founders of YouFoot)

YouFoot offers both huge amounts of data as well as API and apps (web and mobile). Currently access to our APIs are on a request basis. We look to make them public soon.

YouFoot is not only about distributing data but also about empowering people to collect complex sets of football data easily using only web or mobile apps. Our match commentary apps allow you to produce stats and live test commentary in over 15 languages simultaneously.

See this basic tutorial video for instance (it shows 3 different apps that can be used to enter the data): https://www.youtube.com/watch?v=AJAQKSbNbYI&feature=youtu.be

Example of player stats (with videos attached to actions): https://www.youtube.com/watch?v=LEJfCGIdKFk

YouFoot is used by hundreds of pro and amateur teams, federations and media for football coverage across the world. Note: In many cases the data is generated under Creative Common license.

Feel free to contact us if you need access to our APIs, we'll answer your request quickly : [email protected]

1
  • 1
    Doesn't fit the charter of Open Data. Jun 2, 2014 at 7:28
1

Note: The ESPN Developer APIs have been retired.


ESPN.com provides an API: Developer Center. You have to register as a developer.

Once set up, you can make requests for teams or athletes, among other request types. General overview is here.

  • The free quota is 3 Calls per second and 7,500 Calls per day.
  • You can use the API console to explore (once registered)
  • The URL will look something like this

    http://api.espn.com/:version/sports/:sportname/:leagueabbrev?apikey=:yourkey
    
0
1

I think that ESPN has discontinued their developer access.

Try fantasysportnet - http://fantasysportnet.com/data/home.jsp

They cover the major European football leagues … EPL, Bundesliga, Spanish league, Serie A, and provide stats through a simple API.

1

USA Soccer Teams data source in CSV with lat/lon locations

1

There's also the StatsBomb Open Data repository. on Github.

According to the company page for the Statsbomb dataset it contains new data for events, matches and lineups for major European soccer leagues (men + women).

You can download a static 250MB zip-file from there; and of course this will get stale in a matter of weeks, as new games are played all the time. Supposedly if you register by giving them you email address they'll notify you of updates. (I didn't register).

The zip file will expand to 2.6 GB on disk . Most of its is "events" data (passes, tackles, etc). Content inside folders lineups/ and matches/ are < 10MB.

An introductory set of scripts on how to process them can be found here on github. However, although the repo title contains "foundations", the R code (base R) is not that simple.

0

Another Kaggle dataset is

FIFA 18 Complete Player Dataset

17k+ players, 70+ attributes extracted from the latest edition of FIFA

Complete Dataset including :

  • Player personal attributes (Nationality, Club, Photo, Age, Value etc.)

  • Player performance attributes (Overall, Potential, Aggression, Agility etc.)

  • Player preferred position and ratings at all positions.

0

There is an unofficial API for recent World Cups

https://worldcup.sfg.io/

This is an API for the World Cup(2014,2018) and Women's World Cup(2015,2019) that scrapes current match results and outputs match data as JSON. No guarantees are made as to its accuracy, but we will do our best to keep it up to date. For example responses, including events such as goals, substitutions, and cards, see the GitHub page.

One match looks like this:

[
   {
      "venue":"Paris",
      "location":"Parc des Princes",
      "status":"completed",
      "time":"full-time",
      "fifa_id":"300438238",
      "weather":{
         "humidity":"78",
         "temp_celsius":"15",
         "temp_farenheit":"47",
         "wind_speed":"32",
         "description":"Cloudy"
      },
      "attendance":"45261",
      "officials":[
         "Claudia UMPIERREZ",
         "Luciana MASCARANA",
         "Monica AMBOYA",
         "Melissa BORJAS",
         "Mauro VIGLIANO",
         "Felisha MARISCAL",
         "Jose Maria SANCHEZ",
         "Mariana DE ALMEIDA"
      ],
      "stage_name":"First Stage",
      "home_team_country":"France",
      "away_team_country":"Korea Republic",
      "datetime":"2019-06-07T19:00:00Z",
      "winner":"France",
      "winner_code":"FRA",
      "home_team":{
         "country":"France",
         "code":"FRA",
         "goals":4,
         "penalties":0
      },
      "away_team":{
         "country":"Korea Republic",
         "code":"KOR",
         "goals":0,
         "penalties":0
      },
      "home_team_events":[
         {
            "id":1,
            "type_of_event":"goal",
            "player":"Eugenie LE SOMMER",
            "time":"9'"
         },
         {
            "id":2,
            "type_of_event":"goal",
            "player":"Griedge MBOCK BATHY",
            "time":"27'"
         },
         {
            "id":3,
            "type_of_event":"goal",
            "player":"Wendie RENARD",
            "time":"35'"
         },
         {
            "id":4,
            "type_of_event":"goal",
            "player":"Wendie RENARD",
            "time":"45'+3'"
         },
         {
            "id":5,
            "type_of_event":"goal",
            "player":"Wendie RENARD",
            "time":"45'+2'"
         },
         {
            "id":10,
            "type_of_event":"substitution-out",
            "player":"Delphine CASCARINO",
            "time":"70'"
         },
         {
            "id":11,
            "type_of_event":"substitution-in",
            "player":"Valerie GAUVIN",
            "time":"70'"
         },
         {
            "id":12,
            "type_of_event":"substitution-out",
            "player":"Amel MAJRI",
            "time":"74'"
         },
         {
            "id":13,
            "type_of_event":"substitution-in",
            "player":"Eve PERISSET",
            "time":"74'"
         },
         {
            "id":14,
            "type_of_event":"goal",
            "player":"Amandine HENRY",
            "time":"85'"
         },
         {
            "id":15,
            "type_of_event":"substitution-out",
            "player":"Gaetane THINEY",
            "time":"86'"
         },
         {
            "id":16,
            "type_of_event":"substitution-in",
            "player":"Grace GEYORO",
            "time":"86'"
         }
      ],
      "away_team_events":[
         {
            "id":6,
            "type_of_event":"substitution-out",
            "player":"KANG Yumi",
            "time":"52'"
         },
         {
            "id":7,
            "type_of_event":"substitution-in",
            "player":"KANG Chaerim",
            "time":"52'"
         },
         {
            "id":8,
            "type_of_event":"substitution-out",
            "player":"LEE Youngju",
            "time":"69'"
         },
         {
            "id":9,
            "type_of_event":"substitution-in",
            "player":"LEE Mina",
            "time":"69'"
         },
         {
            "id":17,
            "type_of_event":"substitution-out",
            "player":"JUNG Seolbin",
            "time":"86'"
         },
         {
            "id":18,
            "type_of_event":"substitution-in",
            "player":"YEO Minji",
            "time":"86'"
         }
      ],
      "home_team_statistics":{
         "country":"France",
         "attempts_on_goal":21,
         "on_target":8,
         "off_target":8,
         "blocked":5,
         "woodwork":null,
         "corners":13,
         "offsides":2,
         "ball_possession":60,
         "pass_accuracy":87,
         "num_passes":619,
         "passes_completed":540,
         "distance_covered":103,
         "balls_recovered":null,
         "tackles":10,
         "clearances":7,
         "yellow_cards":0,
         "red_cards":0,
         "fouls_committed":11,
         "tactics":"4-3-3",
         "starting_eleven":[
            {
               "name":"Sarah BOUHADDI",
               "captain":false,
               "shirt_number":16,
               "position":"Goalie"
            },
            {
               "name":"Wendie RENARD",
               "captain":false,
               "shirt_number":3,
               "position":"Defender"
            },
            {
               "name":"Marion TORRENT",
               "captain":false,
               "shirt_number":4,
               "position":"Defender"
            },
            {
               "name":"Amandine HENRY",
               "captain":true,
               "shirt_number":6,
               "position":"Midfield"
            },
            {
               "name":"Eugenie LE SOMMER",
               "captain":false,
               "shirt_number":9,
               "position":"Forward"
            },
            {
               "name":"Amel MAJRI",
               "captain":false,
               "shirt_number":10,
               "position":"Defender"
            },
            {
               "name":"Kadidiatou DIANI",
               "captain":false,
               "shirt_number":11,
               "position":"Forward"
            },
            {
               "name":"Elise BUSSAGLIA",
               "captain":false,
               "shirt_number":15,
               "position":"Midfield"
            },
            {
               "name":"Gaetane THINEY",
               "captain":false,
               "shirt_number":17,
               "position":"Midfield"
            },
            {
               "name":"Griedge MBOCK BATHY",
               "captain":false,
               "shirt_number":19,
               "position":"Defender"
            },
            {
               "name":"Delphine CASCARINO",
               "captain":false,
               "shirt_number":20,
               "position":"Forward"
            }
         ],
         "substitutes":[
            {
               "name":"Solene DURAND",
               "captain":false,
               "shirt_number":1,
               "position":"Goalie"
            },
            {
               "name":"Eve PERISSET",
               "captain":false,
               "shirt_number":2,
               "position":"Defender"
            },
            {
               "name":"Aissatou TOUNKARA",
               "captain":false,
               "shirt_number":5,
               "position":"Defender"
            },
            {
               "name":"Sakina KARCHAOUI",
               "captain":false,
               "shirt_number":7,
               "position":"Defender"
            },
            {
               "name":"Grace GEYORO",
               "captain":false,
               "shirt_number":8,
               "position":"Midfield"
            },
            {
               "name":"Emelyne LAURENT",
               "captain":false,
               "shirt_number":12,
               "position":"Forward"
            },
            {
               "name":"Valerie GAUVIN",
               "captain":false,
               "shirt_number":13,
               "position":"Forward"
            },
            {
               "name":"Charlotte BILBAULT",
               "captain":false,
               "shirt_number":14,
               "position":"Midfield"
            },
            {
               "name":"Viviane ASSEYI",
               "captain":false,
               "shirt_number":18,
               "position":"Forward"
            },
            {
               "name":"Pauline PEYRAUD-MAGNIN",
               "captain":false,
               "shirt_number":21,
               "position":"Goalie"
            },
            {
               "name":"Julie DEBEVER",
               "captain":false,
               "shirt_number":22,
               "position":"Defender"
            },
            {
               "name":"Maeva CLEMARON",
               "captain":false,
               "shirt_number":23,
               "position":"Midfield"
            }
         ]
      },
      "away_team_statistics":{
         "country":"Korea Republic",
         "attempts_on_goal":4,
         "on_target":1,
         "off_target":2,
         "blocked":1,
         "woodwork":null,
         "corners":1,
         "offsides":0,
         "ball_possession":40,
         "pass_accuracy":74,
         "num_passes":305,
         "passes_completed":227,
         "distance_covered":105,
         "balls_recovered":null,
         "tackles":15,
         "clearances":17,
         "yellow_cards":0,
         "red_cards":0,
         "fouls_committed":11,
         "tactics":"4-3-3",
         "starting_eleven":[
            {
               "name":"KIM Minjung",
               "captain":false,
               "shirt_number":18,
               "position":"Goalie"
            },
            {
               "name":"HWANG Boram",
               "captain":false,
               "shirt_number":4,
               "position":"Defender"
            },
            {
               "name":"KIM Doyeon",
               "captain":false,
               "shirt_number":5,
               "position":"Defender"
            },
            {
               "name":"CHO Sohyun",
               "captain":true,
               "shirt_number":8,
               "position":"Midfield"
            },
            {
               "name":"JI Soyun",
               "captain":false,
               "shirt_number":10,
               "position":"Forward"
            },
            {
               "name":"JUNG Seolbin",
               "captain":false,
               "shirt_number":11,
               "position":"Forward"
            },
            {
               "name":"KANG Yumi",
               "captain":false,
               "shirt_number":12,
               "position":"Midfield"
            },
            {
               "name":"LEE Youngju",
               "captain":false,
               "shirt_number":15,
               "position":"Midfield"
            },
            {
               "name":"JANG Selgi",
               "captain":false,
               "shirt_number":16,
               "position":"Defender"
            },
            {
               "name":"LEE Geummin",
               "captain":false,
               "shirt_number":17,
               "position":"Forward"
            },
            {
               "name":"KIM Hyeri",
               "captain":false,
               "shirt_number":20,
               "position":"Defender"
            }
         ],
         "substitutes":[
            {
               "name":"KANG Gaae",
               "captain":false,
               "shirt_number":1,
               "position":"Goalie"
            },
            {
               "name":"LEE Eunmi",
               "captain":false,
               "shirt_number":2,
               "position":"Defender"
            },
            {
               "name":"JEONG Yeonga",
               "captain":false,
               "shirt_number":3,
               "position":"Defender"
            },
            {
               "name":"LIM Seonjoo",
               "captain":false,
               "shirt_number":6,
               "position":"Defender"
            },
            {
               "name":"LEE Mina",
               "captain":false,
               "shirt_number":7,
               "position":"Midfield"
            },
            {
               "name":"MOON Mira",
               "captain":false,
               "shirt_number":9,
               "position":"Midfield"
            },
            {
               "name":"YEO Minji",
               "captain":false,
               "shirt_number":13,
               "position":"Forward"
            },
            {
               "name":"SHIN Damyeong",
               "captain":false,
               "shirt_number":14,
               "position":"Defender"
            },
            {
               "name":"LEE Sodam",
               "captain":false,
               "shirt_number":19,
               "position":"Midfield"
            },
            {
               "name":"JUNG Boram",
               "captain":false,
               "shirt_number":21,
               "position":"Goalie"
            },
            {
               "name":"SON Hwayeon",
               "captain":false,
               "shirt_number":22,
               "position":"Forward"
            },
            {
               "name":"KANG Chaerim",
               "captain":false,
               "shirt_number":23,
               "position":"Midfield"
            }
         ]
      },
      "last_event_update_at":"2019-06-07T23:33:26Z",
      "last_score_update_at":"2019-06-07T23:33:26Z"
   }
]
0

A little bit of self-promotion but I think this goes directly towards this topic. After struggling to find a good summary of all the data sources out there, free or freemium or paid or premium, I started making a list, evaluating the different source, categorizing them and wrapping it all up nicely in the following article I wrote:

Soccer analytics data: Beginners Guide

And yes, I do discuss free/open data sources out there.

Not the answer you're looking for? Browse other questions tagged or ask your own question.