API - Competition List (Skater)

Get a list of competitions in which a skater competed.

URL

Type URL
XML https://speedskatingresults.com/api/xml/skater_competitions.php
JSON https://speedskatingresults.com/api/json/skater_competitions.php

Parameters

Name Description
Skater

Skater ID (required)

A skater's ID can be found using the search table below. The skater ID can also be found as the s parameter on the URL for a skater's page. For example:

https://speedskatingresults.com/index.php?p=17&s=203

season Season start year (optional). For example, to retrieve competitions for the 2011-2012 season, specify the value 2011.
  1. To always retrieve the competitions for the current season, omit the season parameter.
  2. The 2006-2007 season is the first for which results are available from SpeedskatingResults.com

Skater IDs

XML

Element Description
competitions

The list of competitions

Attributes

  • skater - skater ID
  • season - season start year
competitionThe competition ID
nameThe competition's name
startdateThe competition's start date (YYYY-MM-DD)
enddateThe competition's end date (YYYY-MM-DD)
linkURL for the link to the competition results on SpeedskatingResults.com

Example

API Query: https://speedskatingresults.com/api/xml/skater_competitions?skater=1195&season=2012

<?xml version="1.0" encoding="utf-8" ?>
<competitions skater="1195" season="2012">
  <competition>
    <id>10572</id>
    <name>World Single Distances Championships 2013</name>
    <startdate>2013-03-21</startdate>
    <enddate>2013-03-24</enddate>
    <link>http://speedskatingresults.com/index.php?p=2&e=10572&s=1195</link>
  </competition>
  <competition>
    <id>10475</id>
    <name>Essent ISU World Cup</name>
    <startdate>2013-03-08</startdate>
    <enddate>2013-03-10</enddate>
    <link>http://speedskatingresults.com/index.php?p=2&e=10475&s=1195</link>
  </competition>
  <competition>
    <id>10310</id>
    <name>94th National Winter Sports Festival</name>
    <startdate>2013-02-19</startdate>
    <enddate>2013-02-21</enddate>
    <link>http://speedskatingresults.com/index.php?p=2&e=10310&s=1195</link>
  </competition>
  <competition>
    <id>9937</id>
    <name>World Sprint Championships 2013</name>
    <startdate>2013-01-26</startdate>
    <enddate>2013-01-27</enddate>
    <link>http://speedskatingresults.com/index.php?p=2&e=9937&s=1195</link>
  </competition>
  <competition>
    <id>9859</id>
    <name>Essent ISU World Cup</name>
    <startdate>2013-01-19</startdate>
    <enddate>2013-01-20</enddate>
    <link>http://speedskatingresults.com/index.php?p=2&e=9859&s=1195</link>
  </competition>
  <competition>
    <id>9528</id>
    <name>Korea - Sprint Championships 2013</name>
    <startdate>2012-12-22</startdate>
    <enddate>2012-12-23</enddate>
    <link>http://speedskatingresults.com/index.php?p=2&e=9528&s=1195</link>
  </competition>
  <competition>
    <id>9400</id>
    <name>Essent ISU World Cup</name>
    <startdate>2012-12-15</startdate>
    <enddate>2012-12-16</enddate>
    <link>http://speedskatingresults.com/index.php?p=2&e=9400&s=1195</link>
  </competition>
  <competition>
    <id>9308</id>
    <name>Essent ISU World Cup</name>
    <startdate>2012-12-08</startdate>
    <enddate>2012-12-09</enddate>
    <link>http://speedskatingresults.com/index.php?p=2&e=9308&s=1195</link>
  </competition>
  <competition>
    <id>9074</id>
    <name>Essent ISU World Cup</name>
    <startdate>2012-11-16</startdate>
    <enddate>2012-11-18</enddate>
    <link>http://speedskatingresults.com/index.php?p=2&e=9074&s=1195</link>
  </competition>
  <competition>
    <id>9004</id>
    <name>Korea - Single Distances Championships 2013</name>
    <startdate>2012-11-04</startdate>
    <enddate>2012-11-06</enddate>
    <link>http://speedskatingresults.com/index.php?p=2&e=9004&s=1195</link>
  </competition>
  <competition>
    <id>8804</id>
    <name>Time Trials</name>
    <startdate>2012-10-13</startdate>
    <enddate>2012-10-13</enddate>
    <link>http://speedskatingresults.com/index.php?p=2&e=8804&s=1195</link>
  </competition>
  <competition>
    <id>8776</id>
    <name>Time Trials</name>
    <startdate>2012-10-06</startdate>
    <enddate>2012-10-06</enddate>
    <link>http://speedskatingresults.com/index.php?p=2&e=8776&s=1195</link>
  </competition>
  <competition>
    <id>8753</id>
    <name>Fall Classic 2012</name>
    <startdate>2012-09-28</startdate>
    <enddate>2012-09-30</enddate>
    <link>http://speedskatingresults.com/index.php?p=2&e=8753&s=1195</link>
  </competition>
</competitions>

JSON

Key Description
skater skater ID
season season start year
competitions The list of competitions
idThe competition ID
nameThe competition's name
startdateThe competition's start date (YYYY-MM-DD)
enddateThe competition's end date (YYYY-MM-DD)
linkURL for the link to the competition results on SpeedskatingResults.com

Example

API Query: https://speedskatingresults.com/api/json/skater_competitions?skater=1195&season=2012

{
  "skater":1195, "season":2012,
  "competitions":[
    {"id":10572, "name":"World Single Distances Championships 2013", "startdate":"2013-03-21", "enddate":"2013-03-24", "link":"http://speedskatingresults.com/index.php?p=2&e=10572&s=1195"},
    {"id":10475, "name":"Essent ISU World Cup", "startdate":"2013-03-08", "enddate":"2013-03-10", "link":"http://speedskatingresults.com/index.php?p=2&e=10475&s=1195"},
    {"id":10310, "name":"94th National Winter Sports Festival", "startdate":"2013-02-19", "enddate":"2013-02-21", "link":"http://speedskatingresults.com/index.php?p=2&e=10310&s=1195"},
    {"id":9937, "name":"World Sprint Championships 2013", "startdate":"2013-01-26", "enddate":"2013-01-27", "link":"http://speedskatingresults.com/index.php?p=2&e=9937&s=1195"},
    {"id":9859, "name":"Essent ISU World Cup", "startdate":"2013-01-19", "enddate":"2013-01-20", "link":"http://speedskatingresults.com/index.php?p=2&e=9859&s=1195"},
    {"id":9528, "name":"Korea - Sprint Championships 2013", "startdate":"2012-12-22", "enddate":"2012-12-23", "link":"http://speedskatingresults.com/index.php?p=2&e=9528&s=1195"},
    {"id":9400, "name":"Essent ISU World Cup", "startdate":"2012-12-15", "enddate":"2012-12-16", "link":"http://speedskatingresults.com/index.php?p=2&e=9400&s=1195"},
    {"id":9308, "name":"Essent ISU World Cup", "startdate":"2012-12-08", "enddate":"2012-12-09", "link":"http://speedskatingresults.com/index.php?p=2&e=9308&s=1195"},
    {"id":9074, "name":"Essent ISU World Cup", "startdate":"2012-11-16", "enddate":"2012-11-18", "link":"http://speedskatingresults.com/index.php?p=2&e=9074&s=1195"},
    {"id":9004, "name":"Korea - Single Distances Championships 2013", "startdate":"2012-11-04", "enddate":"2012-11-06", "link":"http://speedskatingresults.com/index.php?p=2&e=9004&s=1195"},
    {"id":8804, "name":"Time Trials", "startdate":"2012-10-13", "enddate":"2012-10-13", "link":"http://speedskatingresults.com/index.php?p=2&e=8804&s=1195"},
    {"id":8776, "name":"Time Trials", "startdate":"2012-10-06", "enddate":"2012-10-06", "link":"http://speedskatingresults.com/index.php?p=2&e=8776&s=1195"},
    {"id":8753, "name":"Fall Classic 2012", "startdate":"2012-09-28", "enddate":"2012-09-30", "link":"http://speedskatingresults.com/index.php?p=2&e=8753&s=1195"}
  ]
}

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 API.

Competition List Example Page (XML)

Competition List 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: .9em;}
    table.results {margin: 1em; border-collapse: collapse; }
    table.results td {padding: .2em .5em; }
    table.records td.name {width: 20em; font-weight: bold;}
    table.records td.date {width: 10em; text-align: right;}
    a {color: navy; text-decoration: none; font-weight: bold;}
    a:visited {font-weight: normal;}
    a:hover {color: crimson;}
  </style>
  <title>API Example - Skater Results</title>
  <script type="text/javascript" src="jquery-1.7.2.min.js"></script>
  <script type="text/javascript">
  $(document).ready(function(){
    $.ajax({
      type: "GET",
      url: "https://speedskatingresults.com/api/xml/skater_competitions.php",
      data: "skater=1195&season=2012",
      dataType: "xml",
      success: function(xml) {
        $(xml).find('competition').each(function() {
          var name = $(this).find('name').text();
          var startdate = $(this).find('startdate').text();
          var enddate = $(this).find('enddate').text();
          var link = $(this).find('link').text();
          $('<tr></tr>').html('<td class="name"><a href="'+link+'">'+name+
            '</a></td><td class="date">'+startdate+
            '</td><td class="date">'+enddate+'</td>').appendTo('#events');
        });
      }
    });
  });
  </script>
</head>
<body>
  <h1>Sang-Hwa Lee (KOR) - Results 2012/2013</h1>
  <table id="events" class="results">
  </table>
  <p>Results from <a href="https://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: .9em;}
    table.results {margin: 1em; border-collapse: collapse; }
    table.results td {padding: .2em .5em; }
    table.records td.name {width: 20em; font-weight: bold;}
    table.records td.date {width: 10em; text-align: right;}
    a {color: navy; text-decoration: none; font-weight: bold;}
    a:visited {font-weight: normal;}
    a:hover {color: crimson;}
  </style>
  <title>API Example - Skater Results</title>
  <script type="text/javascript" src="jquery-1.7.2.min.js"></script>
  <script type="text/javascript">
  $(document).ready(function(){
    $.ajax({
      type: "GET",
      url: "https://speedskatingresults.com/api/json/skater_competitions.php",
      data: "skater=1195&season=2012",
      dataType: "json",
      success: function(data) {
        data.competitions.forEach(function(c) {
          $('<tr></tr>').html('<td class="name"><a href="'+c.link+'">'+c.name+
            '</a></td><td class="date">'+c.startdate+
            '</td><td class="date">'+c.enddate+'</td>').appendTo('#events');
        });
      }
    });
  });
  </script>
</head>
<body>
  <h1>Sang-Hwa Lee (KOR) - Results 2012/2013</h1>
  <table id="events" class="results">
  </table>
  <p>Results from <a href="https://speedskatingresults.com">SpeedskatingResults.com</a></p>
</body>
</html>

Native Language Names