Sportspower API

Sportspower.com is part of The Active Network, and its data is featured on active.com. Sportspower is the premiere highschool sports ranking engine ranking highschool lacrosse, football, softball, baseball and basketball.  The goal of the Sportspower API, then, is to return ranking data based on state-level divisions or nationally based on school size.  A typical use of this API, then, is to:

  1. Determine the geographic context for ranking data by querying the Playoff Group, Playoff Subgroups or Sportspower School Size Classification API for the relevant group ID (i.e. "60" for all very large highschools in the United States).
  2. Use the geographic context (group ID) to get a list of rankings for a given sport.

During the initial rollout, only highschool football (api.sportspower.com/football/) and basketball (api.sportspower.com/basketball/) is supported with lacrosse soon to follow.

API List

  1. Playoff Groups
  2. Playoff Subgroups
  3. Sportspower School Size Classification
  4. Rankings

Playoff Groups

Playoff groups are a means to segment states for larger sports.  The term playoff group is a generic term that describes how the state’s highschool playoff association groups schools for purposes of leveling the playing field.  In Pennsylvania, there is Class A – AAAA; in Connecticut, there’s Division L, LL, M, etc.

URL: http://api.sportspower.com/football/playoffgroups/hs/{state_abbreviation}?api_key={key}
Parameters

Method: GET

Sample Request - Returns a list of all highschool playoff groups in Pennsylvania

http://api.sportspower.com/football/playoffgroups/hs/pa?api_key=z3v7gaeygwry69dsmjacff9n

Sample Response

  1. <groups>  
  2.     <group>  
  3.         <id>126</id>  
  4.         <name>A</name>  
  5.     </group>  
  6.     <group>  
  7.         <id>125</id>  
  8.         <name>AA</name>  
  9.     </group>  
  10.     <group>  
  11.         <id>124</id>  
  12.         <name>AAA</name>  
  13.     </group>  
  14.     <group>  
  15.         <id>123</id>  
  16.         <name>AAAA</name>  
  17.     </group>  
  18.     <group>  
  19.         <id>1413</id>  
  20.         <name>Inter-Academic</name>  
  21.     </group>  
  22.     <group>  
  23.         <id>1414</id>  
  24.         <name>PCL</name>  
  25.     </group>  
  26. </groups>  

Playoff Subgroups

In some cases, the playoff groups are further segmented into smaller groups.  Playoff subgroup is a generic term; in Pennsylvania, there are districts, for example.

URL: http://api.sportspower.com/football/playoffsubgroups/{playoff_group_id}?api_key={key}

Parameters

  • playoff_group_id (mandatory): The id for the playoff group returned in the Playoff Group API response.
  • key (mandatory): the API access key provided by active.com.

Method: GET

Sample Request - all playoff subgroups for Pennsylvania Class AAAA

http://api.sportspower.com/football/playoffsubgroups/123?api_key=z3v7gaeygwry69dsmjacff9n

Sample Response

  1. <groups>  
  2.     <group>  
  3.         <id>295</id>  
  4.         <name>DISTRICT 1</name>  
  5.     </group>  
  6.     <group>  
  7.         <id>303</id>  
  8.         <name>DISTRICT 10</name>  
  9.     </group>  
  10.     <group>  
  11.         <id>304</id>  
  12.         <name>DISTRICT 11</name>  
  13.     </group>  
  14.     ...  
  15. </groups>  

Sportspower School Size Classification

The SportsPower School Size Classification is relatively static and is SportsPower’s way of normalizing school sizes from a nation-wide perspective.  This allows Sportspower to appropriately display nationwide rankings across similarly sized schools.

URL: http://api.sportspower.com/football/spclassifications/hs?api_key={key}

Parameters

  • key (mandatory): the API access key provided by active.com.

Sample Request - All Sportspower Highschool size classifications

http://api.sportspower.com/football/spclassifications/hs?api_key=z3v7gaeygwry69dsmjacff9n

Sample Response

  1. <groups>  
  2.     <group>  
  3.         <id>60</id>  
  4.         <name>Mega</name>  
  5.     </group>  
  6.     <group>  
  7.         <id>61</id>  
  8.         <name>Large</name>  
  9.     </group>  
  10.     <group>  
  11.         <id>62</id>  
  12.         <name>Mid</name>  
  13.     </group>  
  14.     <group>  
  15.         <id>63</id>  
  16.         <name>Small</name>  
  17.     </group>  
  18.     <group>  
  19.         <id>2544</id>  
  20.         <name>Other</name>  
  21.     </group>  
  22. </groups>  

Rankings

Sportspower has a complitcated team sports ranking algorithm that is used to rank teams on state and national level.  They are returned within the context of a group: playoff group, playoff subgroup, or SportsPower classification.  

URL: http://api.sportspower.com/football/rankings/hs/{group_id}?api_key={key}

Parameters

  • group_id  (mandatory): The ID for the Playoff Group, Subplayoff Group or Sportspower School Size Classification.  Note all group IDs are unique regardless of "type".  
  • key (mandatory): the API access key provided by active.com.

Method: GET

Sample Requests

Highschool football rankings for Pennsylvania class AAAA:
http://api.sportspower.com/football/rankings/hs/123?api_key=z3v7gaeygwry69dsmjacff9n

Highschool football rankings for subgroup "District 1" of Pennsylvania's AAAA class:
http://api.sportspower.com/football/rankings/hs/295?api_key=z3v7gaeygwry69dsmjacff9n

Highschool football rankings for all "mega"-sized highschools in the United States:
http://api.sportspower.com/football/rankings/hs/60?api_key=z3v7gaeygwry69dsmjacff9n

Highschool basketball rankings for all "mega"-sized highschools in the United States:
http://api.sportspower.com/basketball/rankings/hs/60?api_key=z3v7gaeygwry69dsmjacff9n

Sample Response

  1. <teams>  
  2.     <team>  
  3.         <id>2034</id>  
  4.         <organization>  
  5.             <id>12034</id>  
  6.             <name>Cedar Hill</name>  
  7.             <shortName>Cedar Hill</shortName>  
  8.             <state>  
  9.                 <abbreviation>TX</abbreviation>  
  10.                 <name>Texas</name>  
  11.             </state>  
  12.         </organization>  
  13.         <nickname>Longhorns</nickname>  
  14.         <powerRating>100.00</powerRating>  
  15.         <strengthOfSchedule>29.56</strengthOfSchedule>  
  16.         <winLossPercentage>100.00</winLossPercentage>  
  17.         <record>  
  18.             <wins>6</wins>  
  19.             <losses>0</losses>  
  20.             <ties>0</ties>  
  21.         </record>  
  22.         <url>http://www.sportspower.com/football/teams/high-school/football/texas/cedar-hill-longhorns/2034</url>  
  23.         <rank>1</rank>  
  24.     </team>  
  25.     <team>  
  26.         <id>380</id>  
  27.         <organization>  
  28.   
  29.             <id>10380</id>  
  30.             <name>Archbishop Moeller</name>  
  31.             <shortName>Archbishop Moeller</shortName>  
  32.             <state>  
  33.                 <abbreviation>OH</abbreviation>  
  34.                 <name>Ohio</name>  
  35.             </state>  
  36.         </organization>  
  37.         <nickname>Fighting Crusaders</nickname>  
  38.         <powerRating>99.60</powerRating>  
  39.         <strengthOfSchedule>47.68</strengthOfSchedule>  
  40.         <winLossPercentage>100.00</winLossPercentage>  
  41.         <record>  
  42.             <wins>7</wins>  
  43.             <losses>0</losses>  
  44.             <ties>0</ties>  
  45.         </record>  
  46.         <url>http://www.sportspower.com/football/teams/high-school/football/ohio/archbishop-moeller-fighting-crusaders/380</url>  
  47.         <rank>2</rank>  
  48.     </team>  
  49.     ...  
  50. </teams>