API - Olympic Records

Retrieve the current Olympic records.

URL

Type URL
XML http://speedskatingresults.com/api/xml/olympic_records.php
JSON http://speedskatingresults.com/api/json/olympic_records.php

Parameters

Name Description
gender

Gender (optional) - f (female) or m (male)

If specified, limits the returned records to those for ladies or men.

distance

Distance (optional)

When the distance parameter is omitted, the Olympic records for all distances are returned. Specify a value (500, 1000, 1500, 3000, 5000 or 10000) for the distance parameter to retrieve the Olympic record for that distance only.

XML

Element Description
ors The list of Olympic records
record

An Olympic record

Attributes

  • gender - f (ladies' record) or m (men's record)
distanceRace distance
timeFinishing time
dateRace date (YYYY-MM-DD)
locationRace location
skaterThe record holder
idThe skater's ID
familynameThe skater's family name
givennameThe skater's given name
countryThe skater's IOC country code

Example

API Query: http://speedskatingresults.com/api/xml/olympic_records?gender=f

<?xml version="1.0" encoding="utf-8" ?>
<ors>
<record gender="f" age="sr">
  <distance>500</distance>
  <time>37,30</time>
  <date>2002-02-13</date>
  <location>Salt Lake City (USA)</location>
  <skater>
    <id>136</id>
    <familyname>Lemay Doan</familyname>
    <givenname>Catriona</givenname>
    <country>CAN</country>
  </skater>
</record>
<record gender="f" age="sr">
  <distance>1000</distance>
  <time>1.13,83</time>
  <date>2002-02-17</date>
  <location>Salt Lake City (USA)</location>
  <skater>
    <id>251</id>
    <familyname>Witty</familyname>
    <givenname>Chris</givenname>
    <country>USA</country>
  </skater>
</record>
<record gender="f" age="sr">
  <distance>1500</distance>
  <time>1.54,02</time>
  <date>2002-02-20</date>
  <location>Salt Lake City (USA)</location>
  <skater>
    <id>194</id>
    <familyname>Friesinger-Postma</familyname>
    <givenname>Anni</givenname>
    <country>GER</country>
  </skater>
</record>
<record gender="f" age="sr">
  <distance>3000</distance>
  <time>3.57,70</time>
  <date>2002-02-10</date>
  <location>Salt Lake City (USA)</location>
  <skater>
    <id>201</id>
    <familyname>Pechstein</familyname>
    <givenname>Claudia</givenname>
    <country>GER</country>
  </skater>
</record>
<record gender="f" age="sr">
  <distance>5000</distance>
  <time>6.46,91</time>
  <date>2002-02-23</date>
  <location>Salt Lake City (USA)</location>
  <skater>
    <id>201</id>
    <familyname>Pechstein</familyname>
    <givenname>Claudia</givenname>
    <country>GER</country>
  </skater>
</record>
</ors>

JSON

Key Description
records The collection of olympic records
gender f (ladies' record) or m (men's record)
age sr (senior) or jr (junior) record
distanceRace distance
timeFinishing time
dateRace date (YYYY-MM-DD)
locationRace location
skaterThe record holder
idThe skater's ID
familynameThe skater's family name
givennameThe skater's given name
countryThe skater's IOC country code

Example

API Query: http://speedskatingresults.com/api/json/olympic_records?gender=f

{
  "records":[
    {"gender":"f", "age":"sr", "distance":500, "time":"37,28", "date":"2014-02-11", "location":"Sochi (RUS)", "skater":{"id":1195, "familyname":"Lee", "givenname":"Sang-Hwa", "country":"KOR"}},
    {"gender":"f", "age":"sr", "distance":1000, "time":"1.13,83", "date":"2002-02-17", "location":"Salt Lake City (USA)", "skater":{"id":251, "familyname":"Witty", "givenname":"Chris", "country":"USA"}},
    {"gender":"f", "age":"sr", "distance":1500, "time":"1.53,51", "date":"2014-02-16", "location":"Sochi (RUS)", "skater":{"id":29285, "familyname":"ter Mors", "givenname":"Jorien", "country":"NED"}},
    {"gender":"f", "age":"sr", "distance":3000, "time":"3.57,70", "date":"2002-02-10", "location":"Salt Lake City (USA)", "skater":{"id":201, "familyname":"Pechstein", "givenname":"Claudia", "country":"GER"}},
    {"gender":"f", "age":"sr", "distance":5000, "time":"6.46,91", "date":"2002-02-23", "location":"Salt Lake City (USA)", "skater":{"id":201, "familyname":"Pechstein", "givenname":"Claudia", "country":"GER"}}
  ]
}

Example Web Page

The sample web page provides a very basic example of how XML data may be retrieved from SpeedskatingResults.com. It makes use of the jQuery library to handle the the interaction with the XML API.

Olympic Records Example Page (XML)

Olympic Records Example Page (JSON)

HTML Code (XML)

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  <style type="text/css" media="screen">
    body {font-family: 'Lucida Grande', Verdana, Arial, sans-serif; padding: 5px;
      font-size: 10pt;}
    table.records {margin: 1em; border-collapse: collapse; }
    table.records td {padding: .2em .5em; }
    table.records td.distance {width: 8em; font-weight: bold;}
    table.records td.time {width: 5em; text-align: right;}
    table.records td.date {}
    table.records td.location {width: 10em;}
    table.records td.skater {width: 15em;}
    a {color: navy; text-decoration: none; font-weight: bold;}
    a:visited {font-weight: normal;}
    a:hover {color: crimson;}
  </style>
  <title>API Example - Olympic Records</title>
  <script type="text/javascript" src="jquery-1.7.2.min.js"></script>
  <script type="text/javascript">
  $(document).ready(function(){
    $.ajax({
      type: "GET",
      url: "http://speedskatingresults.com/api/xml/olympic_records.php",
      dataType: "xml",
      success: function(xml) {
        $(xml).find('record').each(function() {
          var recordClass = ($(this).attr('gender') == "m") ? "Men" : "Ladies";
          var distance = $(this).find('distance').text()+"m";
          var time = $(this).find('time').text();
          var date = $(this).find('date').text();
          var location = $(this).find('location').text();
          var skater = $(this).find('givenname').text() + " " +
            $(this).find('familyname').text() +
            " (" + $(this).find('country').text() + ")";
          $('<tr></tr>').html('<td class="distance">'+recordClass+' '+distance+
            '</td><td class="time">'+time+'</td><td class="date">'+date+
            '</td><td class="location">'+location+
            '</td><td class="skater">'+skater+'</td>').appendTo('#ors');
        });
      }
    });
  });
  </script>
</head>
<body>
  <h1>Olympic Records</h1>
  <table id="ors" class="records">
  </table>
  <p><a href="http://speedskatingresults.com/index.php?p=10">Records</a> from
    <a href="http://speedskatingresults.com">SpeedskatingResults.com</a></p>
</body>
</html>

HTML Code (JSON)

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  <style type="text/css" media="screen">
    body {font-family: 'Lucida Grande', Verdana, Arial, sans-serif; padding: 5px;
      font-size: 10pt;}
    table.records {margin: 1em; border-collapse: collapse; }
    table.records td {padding: .2em .5em; }
    table.records td.distance {width: 8em; font-weight: bold;}
    table.records td.time {width: 5em; text-align: right;}
    table.records td.date {}
    table.records td.location {width: 10em;}
    table.records td.skater {width: 15em;}
    a {color: navy; text-decoration: none; font-weight: bold;}
    a:visited {font-weight: normal;}
    a:hover {color: crimson;}
  </style>
  <title>API Example - Olympic Records</title>
  <script type="text/javascript" src="jquery-1.7.2.min.js"></script>
  <script type="text/javascript">
  $(document).ready(function(){
    $.ajax({
      type: "GET",
      url: "http://speedskatingresults.com/api/json/olympic_records.php",
      dataType: "json",
      success: function(data) {
        data.records.forEach(function(r) {
          var recordClass = (r.gender == "m") ? "Men" : "Ladies";
          var distance = r.distance + "m";
          var skater = r.skater.givenname + " " + r.skater.familyname;
      
          $('<tr></tr>').html('<td class="distance">'+recordClass+' '+distance+
            '</td><td class="time">'+r.time+
            '</td><td class="date">'+r.date+
            '</td><td class="location">'+r.location+
            '</td><td class="skater">'+skater+'</td>').appendTo('#ors');
        });
      }
    });
  });
  </script>
</head>
<body>
  <h1>Olympic Records</h1>
  <table id="ors" class="records">
  </table>
  <p><a href="http://speedskatingresults.com/index.php?p=10">Records</a> from
    <a href="http://speedskatingresults.com">SpeedskatingResults.com</a></p>
</body>
</html>
SpeedskatingResults.com on Facebook