Beijing 2022 Olympic (unofficial) API + schedule + mark individual events into your calendar + search

Winter Olympics is about to start soon, so during staying at home to keep myself sane and my brain focused I did a toolkit that may help lot of you. All the information will be presented at http://sebastianszwarc.pl/beijing2022/ but here I share summary.

Olypi - unofficial olympic API

All request should be made to http://sebastianszwarc.pl:9000, it's possible to make requests using SSL but browsers by default rejects user-generated certificates, so in that case you have to confirm manually you trust the certifcate before you make SSL request - they should be done to https://sebastianszwarc.pl:9999 instead.

Available endpoints:

  1. '/olypi/now'

returns all the events currently held.

  1. '/olypi/venues'

returns information about all the arenas

  1. '/olypi/sports'

returns ids of all the sports with their english and polish name

  1. '/olypi/events'

returns complete schedule of all the events.

  1. '/olypi/athletes

returns information about all athletes

  1. /olypi/athletes/:country
    returns all the athletes from selected country where :country is 3-letters abbreviaton.

It is now possible to filter athletes endpoint by adding ?sportid=<number> so e.g. to get all polish ski jumpers the endpoint is /olypi/athletes/POL?sportid=13 and to find all athletes competes in curling you do /olypi/athletes/?sportid=5

iCloud calendar for Beijing 2022

to subscribe copy and paste into your browser (I'm currently adding events to it so don't be surprised by notifications)

webcal://p60-caldav.icloud.com/published/2/Mjc4OTI3NzE5Mjc4OTI3N-csb0hk4CnoQ_NWGa9g-iF1qw7xjQWcpOyIIidpXOE6ttfPaQU1eQqeUJKr7bvKZo5diZA0DqW_-rPWbOodQDI

Indyvidual ICS files

On http://sebastianszwarc.pl/beijing2022/ you will find ICS files for all 531 events sorted by sport. Download ics file and if you click on it it create event in calendar of your choice. This will be updated after Opening Ceremony.

Spreadsheet with detailed schedule is available here

CHANGELOG:

14.02

  • added option “starting soon”
  • you can support me by buying green tea :slight_smile:
    9.02
  • fixed problems with SSL
  • new filtering options

8.02
I added live schedule update on the page (works on Firefox, not sure with Chrome/Safari may shows some errors about vallidity of certificate in Express JS, but it is valid, feedback welcome)
For best results better to access the page with http://
7.02

  • completed events on the page are marked with line-through + ability to hide them
3 Likes

I updated the page with single events calendar files and documentation.

lol I was wondering where my events came from on my calendar. You used the same ical sub as the Tokyo olympics :wink:

1 Like

Haha yes :slight_smile: sorry for the surprise and lot of notifications in last few days :frowning: it seemed viable solution for Olympics fans to not search another calendar and subscribe again. And I prefer to have all the historical data in calendar :slight_smile:
UPDATE: added changelog

SSL problems fixed - you may now freely see what is currently live refresed every minute. Also new filtering options added to the athletes ?sportid=<number>

@chDVRuser I don't understand why are you posting it in this thread? do you want to discourage me to do stuff for community and say that I am a fool because devs do a better job?

No ,just thought people would want to know. Post removed.