API - World Records

Retrieve the current world records.

URL

Type URL
XML http://speedskatingresults.com/api/xml/world_records.php
JSON http://speedskatingresults.com/api/json/world_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.

age

Age category (optional) - jr (junior) or sr (senior)

If specified, limits the returned records to those for juniors or seniors.

distance

Distance (optional)

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

XML

Element Description
wrs The list of world records
record

A world record

Attributes

  • 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/xml/world_records?gender=m&age=sr

<?xml version="1.0" encoding="utf-8" ?>
<wrs>
<record gender="m" age="sr">
  <distance>500</distance>
  <time>34,03</time>
  <date>2007-11-09</date>
  <location>Salt Lake City (USA)</location>
  <skater>
    <id>130</id>
    <familyname>Wotherspoon</familyname>
    <givenname>Jeremy</givenname>
    <country>CAN</country>
  </skater>
</record>
<record gender="m" age="sr">
  <distance>1000</distance>
  <time>1.06,42</time>
  <date>2009-03-07</date>
  <location>Salt Lake City (USA)</location>
  <skater>
    <id>265</id>
    <familyname>Davis</familyname>
    <givenname>Shani</givenname>
    <country>USA</country>
  </skater>
</record>
<record gender="m" age="sr">
  <distance>1500</distance>
  <time>1.41,04</time>
  <date>2009-12-11</date>
  <location>Salt Lake City (USA)</location>
  <skater>
    <id>265</id>
    <familyname>Davis</familyname>
    <givenname>Shani</givenname>
    <country>USA</country>
  </skater>
</record>
<record gender="m" age="sr">
  <distance>3000</distance>
  <time>3.37,28</time>
  <date>2005-11-05</date>
  <location>Calgary (CAN)</location>
  <skater>
    <id>317</id>
    <familyname>Ervik</familyname>
    <givenname>Eskil</givenname>
    <country>NOR</country>
  </skater>
</record>
<record gender="m" age="sr">
  <distance>5000</distance>
  <time>6.03,32</time>
  <date>2007-11-17</date>
  <location>Calgary (CAN)</location>
  <skater>
    <id>831</id>
    <familyname>Kramer</familyname>
    <givenname>Sven</givenname>
    <country>NED</country>
  </skater>
</record>
<record gender="m" age="sr">
  <distance>10000</distance>
  <time>12.41,69</time>
  <date>2007-03-10</date>
  <location>Salt Lake City (USA)</location>
  <skater>
    <id>831</id>
    <familyname>Kramer</familyname>
    <givenname>Sven</givenname>
    <country>NED</country>
  </skater>
</record>
</wrs>

JSON

Key Description
records The collection of world 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/world_records?gender=m&age=sr

{
  "records":[
    {"gender":"m", "age":"sr", "distance":500, "time":"34,03", "date":"2007-11-09", "location":"Salt Lake City (USA)", "skater":{"id":130, "familyname":"Wotherspoon", "givenname":"Jeremy", "country":"CAN"}},
    {"gender":"m", "age":"sr", "distance":1000, "time":"1.06,42", "date":"2009-03-07", "location":"Salt Lake City (USA)", "skater":{"id":265, "familyname":"Davis", "givenname":"Shani", "country":"USA"}},
    {"gender":"m", "age":"sr", "distance":1500, "time":"1.41,04", "date":"2009-12-11", "location":"Salt Lake City (USA)", "skater":{"id":265, "familyname":"Davis", "givenname":"Shani", "country":"USA"}},
    {"gender":"m", "age":"sr", "distance":3000, "time":"3.37,28", "date":"2005-11-05", "location":"Calgary (CAN)", "skater":{"id":317, "familyname":"Ervik", "givenname":"Eskil", "country":"NOR"}},
    {"gender":"m", "age":"sr", "distance":5000, "time":"6.03,32", "date":"2007-11-17", "location":"Calgary (CAN)", "skater":{"id":831, "familyname":"Kramer", "givenname":"Sven", "country":"NED"}},
    {"gender":"m", "age":"sr", "distance":10000, "time":"12.41,69", "date":"2007-03-10", "location":"Salt Lake City (USA)", "skater":{"id":831, "familyname":"Kramer", "givenname":"Sven", "country":"NED"}}
  ]
}

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.

World Records Example Page (XML)

World 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 - World 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/world_records.php",
      data: "age=sr",
      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('#wrs');
        });
      }
    });
  });
  </script>
</head>
<body>
  <h1>World Records</h1>
  <table id="wrs" class="records">
  </table>
  <p><a href="http://speedskatingresults.com/index.php?p=9">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 - World 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/world_records.php",
      data: "age=sr",
      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('#wrs');
        });
      }
    });
  });
  </script>
</head>
<body>
  <h1>World Records</h1>
  <table id="wrs" class="records">
  </table>
  <p><a href="http://speedskatingresults.com/index.php?p=9">Records</a> from
    <a href="http://speedskatingresults.com">SpeedskatingResults.com</a></p>
</body>
</html>
SpeedskatingResults.com on Facebook