5 ms·
Show HN: World Cup API for 2018
- daw___ 8y agoI tried loading over HTTPS and got the following error: This server could not prove that it is worldcup.sfg.io; its security certificate is from *.herokuapp.com. This may be caused by a misconfiguration or an attacker intercepting your connection.
- sorenso 8y agoI have the same issue. Can't use inside my Preact component running on a https site.
- llamataboot 8y agoI'll look into HTTPS, heroku says it is configured fine for worldcup.sfg.io, browser says it isn't, browser wins :)
- ealexhudson 8y agoTimezones look wrong. This is the stamp for today's match: 2018-06-14T17:00:00.000-05:00 Moscow is GMT+3, and kick-off is 18h local time (i.e. 15h GMT). Not sure what combination of stuff has gone wrong there!
- rurban 8y agoYes, the minutely update seems to be off by 2 hrs at least. The first match is already 3:0, but the API still has 0:0
- dblooman 8y agoAnyone got a lambda based slack bot for WC?
- rblanch 8y agoYou can try this https://guessthewinner.blinch.site/ https://guessthewinner.blinch.site/ (I built it) You can read about it here: https://medium.com/@blinch/what-did-i-learn-while-building-a-product-for-offices-watching-the-world-cup-6e32220bfae4 https://medium.com/@blinch/what-did-i-learn-while-building-a... Help me share it, this is my first response in HN
- bdz 8y agoKinda unrelated but does anyone know where do Google get the win probability numbers from on the match pages? Is it something scientific or some "social" numbers (like which team is more popular, more searches etc.)
- apeacox 8y agoI suppose through some kind of machine learning, given the fact that they have a miriad of data of any kind. It might look like a funny experiment/excercise for someone at Google.
- SlashmanX 8y agoI believe they use the ELO Ratings[0]. they have the Win Probability on their website[1]. [0] - https://en.wikipedia.org/wiki/World_Football_Elo_Ratings https://en.wikipedia.org/wiki/World_Football_Elo_Ratings [1] - http://eloratings.net/fixtures http://eloratings.net/fixtures
- tome 8y agoYou could very easily source it from betting markets.
- thom 8y agoA popular method is described in this paper: http://web.math.ku.dk/~rolf/teaching/thesis/DixonColes.pdf http://web.math.ku.dk/~rolf/teaching/thesis/DixonColes.pdf
- Ylodi 8y agohttp://worldcup.sfg.io/matches/country?fifa_code=cro http://worldcup.sfg.io/matches/country?fifa_code=cro Internal Server Error? I was expecting 404 in the worst case, but parameter case conversion (upper to low and vice versa) would be a better solution.
- philbarr 8y agoThis looks great! The background page says you were scraping the data from websites. Are you still doing that? If so: - did you ask permission? Did you feel you had to? - do you have problems with sites accidentally/deliberately breaking your parsing code?
- tallytarik 8y agoNice! I built a World Cup IRC bot back in 2014 but couldn't find a reliable API. In the end I found the only way I could get realtime results was by streaming from the official Twitter page, as they posted live match updates in a (reasonably) predictable format. All the best with your API this World Cup!
- deanclatworthy 8y agoHas anyone made a dashboard out of this? Would like to put something on our displays at the office but no time to do it myself!
- secstate 8y agoYou can try: pip install worldcup And then: watch -n 60 worldcup today And just make the font in the terminal window huge :)
- zimpenfish 8y agoAt least on my server, I needed to run pip2 install worldcup # didn't like Python3 watch -cn 60 worldcup today # -c for colours Also the time handling seems wrong - it claims Russia vs Saudia Arabia will be "9 hours from now" except it kicks off in 2.5 hours...
- llamataboot 8y agoyup, all events and goals should happen in real time starting tomorrow, first day is always a mess because it is a scraper and FIFA is using a new CMS this year. Thought I had it worked, but had to make some sig changes to account for lots of JS. Events and status changes and goals should all update in realtime now.
- oo0shiny 8y agoI know this was ages ago, but I've created a daily dashboard for today's games using this API: http://worldcupgames.today/ http://worldcupgames.today/
- Double_a_92 8y agoIs there no official API?
- sschueller 8y agoThere probably is but with FIFA you most definitely have to pay. https://www.optasports.com/ https://www.optasports.com/
- jetti 8y agoThere are definitely other APIs for commercial use that don't rely on scraping but the problem is that they aren't free. Sports data can get very expensive.
- llamataboot 8y agoThey are expensive, hence a free one
- wklm 8y agothere's an api used by the official mobile app. https://api.fifa.com/worldcup/ https://api.fifa.com/worldcup/ If someone has reversed it and could share any documentation, pls write in comments
- dmlittle 8y agoI couldn't find any documentation but here's the list of match endpoints: https://news.ycombinator.com/item?id=17330254 https://news.ycombinator.com/item?id=17330254
- sschueller 8y agohttp://worldcup.sfg.io/matches http://worldcup.sfg.io/matches The time zone seems off. I get "datetime": "2018-06-14T17:00:00.000-05:00" for the first match. It should however be 17:00 for CEST (UTC +2)
- llamataboot 8y agoTime zones are always a pain, I'll check into it now that I got all the events working!
- jayflux 8y agoI’ve been using https://www.football-data.org https://www.football-data.org which is also an API for the World Cup, does anyone know the pros and cons of the 2?
- m4tthumphrey 8y agoSlightly related: My friends have created https://wcfixtures.football https://wcfixtures.football. For some reason they only made it work on mobile. We did a similar one back in 2014 but I was not involved in this one. I imagine they use https://www.football-data.org https://www.football-data.org or scape themselves.
- code_boy_code 8y agoForgot to say thank you for this. I had a look at this yesterday and I love it. So clean. - pass on my thanks to your dev friends.
- thom 8y agoWhoScored and the StatsZone app are both wonderful to scrape if anybody wanted to poke around harder for more detailed data.
- ZuLuuuuuu 8y agoNice, is there an end point to get the champion?
- chunkyslink 8y agoThere are a quite a few problems with this. We are 31 minutes into the first game (Russia vs Saudi A) and it is 1 - nil. This feed (although updated each minute) is not reflecting the score. Also the current game endpoint is empty. As one poster has pointed out the timezone setting are wrong which could be why.
- llamataboot 8y agonope, was just problems with scraping data -- can't scrape data until it exists (FIFA is using a new CMS for World Cup 2018 that uses a fair amount of JS), and I couldn't get all the events that are used to mark a match officially completed. Should be working now for the next games. First day is always a bit of a mess.
- 0b01 8y agoIt's 'Colombia' not ,Columbia'
- llamataboot 8y agoHi all -- Sorry for not updating sooner -- FIFA changed things significantly from 2014 and I had to do a bunch of updating to the scraper to use headless chrome to pull in updates via JS to get all the events working again. Everything should be working in real time for tomorrow's games. Real time goals, matches marked completed after they are officially over, and an event stream of goals, subs, and cards. Sorry for delay, hard to scrape data until it actually exists, and besided the 50+ emails I got in the past few months asking me to make it work for 2018, I was the only one making PRs ;) Should be good to go for tomorrow, please file a github issue if you see any problems.
- garyjob 8y agoHey guys, I just created an API with my App for WhoScored. Its currently running very 15mins. https://getdata.io/data-sources/5470-football-statistics-football-live-scores-whoscored-com https://getdata.io/data-sources/5470-football-statistics-foo... Will update again once I got another API setup for StatsZone when ready. By the way, how often do you guys need data refresh for? Once I get some feedback I could tweak my app to increase the number of frequency. Also please do ping me if you want to register your webhooks. My app only supports only one webhook per API at the moment. I will try to get it properly extended so that all your webhooks can get registered. My email address is garyjob@getdata.io
- garyjob 8y agoI don't see any match related data from StatsZone at the moment, but I have created an API for the world cup related news articles that are being published on the site. https://getdata.io/data-sources/5471-fifa-world-cup-fourfourtwo-world-cup-news https://getdata.io/data-sources/5471-fifa-world-cup-fourfour... I will check again to see if there are any new data once the match starts and then create an API for those too.
- manuw 8y agoNice. Build a little py script for work. :] https://gist.github.com/int9h/83373326174ce8dab25a333a9c36f0d3 https://gist.github.com/int9h/83373326174ce8dab25a333a9c36f0...
- dmlittle 8y agoThe FIFA API is hard to understand but has all of the info as well. Here's a list of all matches in the group stages; I don't believe the round of 16 matches have been generated yet. https://gist.github.com/dmlittle/9733711dcfa638b304884198d759deba https://gist.github.com/dmlittle/9733711dcfa638b304884198d75...