Hacker News new | past | comments | ask | show | jobs | submit login
World Cup data in JSON (sfg.io)
141 points by llamataboot on June 17, 2014 | hide | past | favorite | 51 comments



Ugh I struggled to find something like this before I manually built the DB for http://wcfixtures.co.uk Dammit!


Likewise for http://sturob.com/wc14/

We should aim to do better at collaborating on this sort of thing - before the tournament starts.


I've much enjoyed your illustration throughout the group matches. Interestingly, I've shared it with others and they all fell silent. But once I explained it to them they liked it a lot and shared it with others. Who also fell silent. For many people it seems it's too much information/impenetrable. For me it was a puzzle to solve (as I wasn't current on current round-robin protocol). Really good work. Keep it up and see you in 4 years!


That's a great picture. High information density but easy to read.


Alex and sturob, those are both gorgeous, guys!


I loved the 9x9 grid for displaying group matches.


I love your site design!


Agreed. It is really unique. Nice work.


This is the best world cup site by far! Thanks a lot for sharing!


Awesome design!


Care to share some stats on visits and where they come from? I love the site!


Great site, but timezone is 8 hrs off for me.


It was built for UK users (.co.uk), I wasn't up for researching the TV channels of every country!


Yeah I get that it's co.uk, but with one small adjustment (just displaying the local timezone in JS) it could be used by people all over the world :)

No need for researching TV channels, the games are broadcast instantly in every country.


Well, it is a .co.uk site.


But there is this thing called timezone support. Even JS can handle it.


But, we have an official API! http://live.mobileapp.fifa.com/api/wc/matches

More details on my last submission here on HN.


T's and C's on FIFA's site are pretty clear:

  (i)            FIFA Content

  5.1          All FIFA Content, including FIFA feeds, is owned by, or 
     licensed to, FIFA. FIFA Content is provided to You “AS IS” and may
     not be used, reproduced, distributed, transmitted, broadcast, 
     displayed, sold, licensed or otherwise exploited for any other 
     purposes than their access and usage on the FIFA Digital Platforms.
     For that sole and exclusive purpose, FIFA grants to You a limited,
     revocable, non-exclusive license to access and use the FIFA Digital
     Platforms privately for non-commercial purposes, in accordance with
     these Terms.
"FIFA Digital Platforms" is defined as the website and their App.

So... doesn't really sound like an "official API" in the sense of being something you could use to create your own world-cup data-based apps or web sites...


Is there any documentation for that api, from the url it looks that they created it specifically for their official mobile app only?


I haven't found any documentation and, indeed, it was created for their mobile app.

What I have heard from a guy on Twitter is that if you get the number of the match then you can: http://live.mobileapp.fifa.com/api/wc/match/300186492/en

Also if you put /blog at the end of that URL you get the latest news regarding that match.


And the obligatory blog post about building it! http://softwareforgood.com/soccer-good/


Somewhat off topic... Your blog looks great, but that's a questionable choice of header font on the service page, especially when used as all caps :)


Thanks for the feedback. I just threw something up in a few minutes. I'll try to get something better looking up tonight with the caveat that I'm not a designer. Maybe I can get some of my co-workers to design an awesome looking splash page for me.


Looks great now! :)


Refreshed the design this morning, might be easier on your eyes :)


Created a small bash script to display the current match scores as part of the terminal prompt : https://gist.github.com/abiyani/34f25dc8ed2a862517e7

Sample output: abiyani@vaio:~ [BEL-2-1-ALG, RUS-1-1-KOR, BRA-0-0-MEX]


http://www.kimonolabs.com/worldcup/docs Kimonolabs seems to have one a world cup api too


I'm using http://www.optasports.com/ for the worldcup livefeed . Their Sports API is insanely accurate (and expensive).


Yes, I heard that one is expensive. Just out of interest, what are you using it for?


Pretty jealous. I need to get my site together in order to play around with the Opta historical stuff, I'm working on letting people back test betting strategies.


I have looked into the code, why do you sometimes use the old hash syntax with the hashrocket and sometimes the new (>= 1.9) one?


Trying to build a Hubot script that broadcasts goals.

How can I know if a goal was scored? Save the last call and compare?

At what rate should I call the API?



This is beautiful. I was looking for an API to do just this exact thing the other day. Thank you sir.


I'm not sure that I understand the motivation or need for this. Can you not get match info from your local news feeds?

Perhaps I'm spoiled, because every match is free: cbc.ca/sports-content/soccer/brazil2014/video/


Sure, but what if you want to do something with that data? The point of an API is that it is easily consumable. I explained a bit about why I built it in my blog post, but mainly it was 1) for fun and learning (I've never built an API before) 2) to keep the stats updated on a site that I built for my friends for our world cup draft and 3) to be able to use our company Hubot to ask about scores throughout the day...but mostly for fun and learning!


Good answers, thanks.


I'd add the Kimono Labs has done something quite similar with their World Cup API http://www.kimonolabs.com/worldcup/explorer


There's something funky going on with your homepage.

1.) Open homepage

2.) Click the /matches endpoint link. Json displays

3.) Click back button.

Expected: The homepage displays.

Actual: The URL changes back to the homepage URL, but the matches JSON is still displayed.

Browser: Safari 7.0.4


Can replicate for any of the endpoint links, not just /matches.

Chrome Windows Version 35.0.1916.153


Found the same here. Chrome 35.0.1916.153 on Windows


http://www.live-footballontv.com/

Is where I got for football fixtures for the UK, albeit not JSON.


I love this! Looks like HN might be slowing your server down (around 800ms to grab matches). You should try puma or unicorn instead of webrick.


I didn't expect it to be quite so popular all of the sudden. :)Looking at switching it over to Unicorn...

EDIT: switched to unicorn. Please keep me updated about speed issues and I can turn it up


It would be nice to have an endpoint to get a list of teams, though I guess that data is pretty static.


That is there too, sorry forgot to document it, just use /teams


How can I do an AJAX request to your site? Or should I create my own server?


You can create your own server, but I am looking into adding CORS support this evening or accepting a pull request that does.


cross site requests should work fine now


great stuff.


Oh cool. Can we have the problems fifa caused in brasil in JSON as well?




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: