Active.com API
Introduction
The Active.com API gives developers easy access to Active.com's broad array of activity data. It is centered around the concept of "assets", where events, races, tournaments, facilities, classes, leagues are all considered assets. Each asset has a unique ID, and data about a given asset can be retrieved with this ID.
With this API, developers can search for all half marathons coming up over the next few months in San Diego, California. Or they can get a list of tennis tournaments happening in New York over the summer. They can dive in to get detailed information about the Bay to Breakers, including the event director's race description, latitude and longitude for the starting point of the race, and fees. And after the Bay to Breakers happens, the Active.com API can be used to query user reviews of the race.
All of the Active.com APIs are read-only and return public data. As a result, no security measures (SSL, Oauth) are required. Race Registrations are done online on Active.com
Interact with the Active APIs -- discover, test, debug live calls all in one place. Test out I/O Docs here
Searching for Things to Do
We're interested in getting a list of all of the half marathons happening around San Diego, California, in 2010. So we'll issue the following request to the Active.com Search API:
http://api.amp.active.com/search?k=&f=activities&v=xml&l=San+Diego,+CA,+US&r=50&s=relevance&m=meta:startDate:daterange:01/01/2010..12/31/2010+meta:channel%3DRunning+meta:splitMediaType%3DEvent+meta:splitMediaType%3DHalf%2520Marathon&api_key=wuhmn9ye94xn3xnteudxsavw
(for illustrative purposes, most results have been ommitted)
<search>
<time>0.264066</time>
<totalResults>22</totalResults>
<fromNum>1</fromNum>
<toNum>22</toNum>
<page>1</page>
<results>
<result>
<num>1</num>
<mime/>
<url>http://www.active.com/running/coronado-to-imperial-beach-san-diego-ca/
silver-strand-half-marathon-and-5k-2010
</url>
<url_encoded>http://www.active.com/running/coronado-to-imperial-beach-san-diego-ca/
silver-strand-half-marathon-and-5k-2010
</url_encoded>
<title>Silver Strand Half Marathon & 5K | Coronado to Imperial Beach
(San <b>...</b>
</title>
<language>en</language>
<abstract/>
<meta>
<eventDate>2010-11-14T07:00:00-08:00</eventDate>
<location>Start - Sunset Park, Coronado / Finish - Imperial Beach
Pier, IB
</location>
<tag>
<value>event:10</value>
<value>Running:10</value>
</tag>
<eventLongitude>-117.1785</eventLongitude>
<endDate>2010-11-14</endDate>
<locationName>Start - Sunset Park, Coronado / Finish - Imperial Beach
Pier, IB
</locationName>
<lastModifiedDateTime>2010-08-29 17:15:07.68</lastModifiedDateTime>
<splitMediaType>
<value>Event</value>
<value>5K</value>
<value>Half Marathon</value>
</splitMediaType>
<endTime>7:00:00</endTime>
<city>Coronado to Imperial Beach (San Diego)</city>
<google-site-verification/>
<startTime>7:00:00</startTime>
<eventId>1821997</eventId>
<description/>
<longitude>-117.1785</longitude>
<substitutionUrl>1821997</substitutionUrl>
<eventLatitude>32.68801</eventLatitude>
<eventState>California</eventState>
<sortDate>2000-11-14</sortDate>
<keywords>Event</keywords>
<dma>San Diego</dma>
<seourl>http://www.active.com/running/coronado-to-imperial-beach-san-diego-ca/
silver-strand-half-marathon-and-5k-2010
</seourl>
<country>United States</country>
<category>Activities</category>
<market>San Diego</market>
<assetTypeId>3BF82BBE-CF88-4E8C-A56F-78F5CE87E4C6</assetTypeId>
<contactName>Koz Enterprises</contactName>
<eventZip>92118</eventZip>
<UpdateDateTime>9/1/2010 6:09:21 PM</UpdateDateTime>
<latitude>32.68801</latitude>
<startDate>2010-11-14</startDate>
<state>California</state>
<mediaType>
<value>Event</value>
<value>Event\5K</value>
<value>Event\Half Marathon</value>
</mediaType>
<estParticipants>5000</estParticipants>
<assetId> 59a293ed-f662-45d6-b4c6-a1f3f077c676 </assetId>
<participationCriteria>All</participationCriteria>
<onlineDonationAvailable>0</onlineDonationAvailable>
<assetName> Silver Strand Half Marathon & 5K </assetName>
<zip>92118</zip>
<eventURL>http://www.kozenterprises.com</eventURL>
<contactPhone>858-268-1250</contactPhone>
<contactEmail>info@kozenterprises.com</contactEmail>
<onlineMembershipAvailable>0</onlineMembershipAvailable>
<trackbackurl>http://www.active.com/running/coronado-to-imperial-beach-san-diego-ca/
silver-strand-half-marathon-and-5k-2010
</trackbackurl>
<onlineRegistrationAvailable>1</onlineRegistrationAvailable>
<image1>http://www.active.com/images/events/hotrace.gif</image1>
<lastModifiedDate>2010-08-29</lastModifiedDate>
<channel>
<value>More Sports\Inline Skating</value>
<value>Running</value>
</channel>
</meta>
</result>
<result>
<num>10</num>
<mime/>
<url>http://www.active.com/running/la-jolla-ca/la-jolla-half-marathon-2010</url>
<url_encoded>http://www.active.com/running/la-jolla-ca/
la-jolla-half-marathon-2010
</url_encoded>
<title>La Jolla Half Marathon | La Jolla, California 92037 | Sunday <b>...</b></title>
<language>en</language>
<abstract>Active partnered with ESPN. United States.
United Kingdom Ireland France Italy Spain<br>
Sweden Germany Portugal Netherlands Austria Australia New Zealand. <b>...</b> </abstract>
<meta>
<eventDate>2010-04-25T07:30:00-07:00</eventDate>
<location>Del Mar to La Jolla</location>
<tag>
<value>event:10</value>
<value>Running:10</value>
</tag>
<eventLongitude>-117.2588</eventLongitude>
<endDate>2010-04-25</endDate>
<lastModifiedDateTime>2010-07-14 14:15:35.46</lastModifiedDateTime>
<splitMediaType>
<value>Event</value>
<value>5K</value>
<value>Half Marathon</value>
</splitMediaType>
<locationName>Del Mar to La Jolla</locationName>
<endTime>7:30:00</endTime>
<city>La Jolla</city>
<google-site-verification/>
<startTime>7:30:00</startTime>
<eventId>1733302</eventId>
<description/>
<longitude>-117.2588</longitude>
<substitutionUrl>1733302</substitutionUrl>
<eventLatitude>32.84334</eventLatitude>
<sortDate>2000-04-25</sortDate>
<eventState>California</eventState>
<eventResults>http://results.active.com/pages/page.jsp?
eventID=1733302&pubID=3
</eventResults>
<keywords>Event</keywords>
<eventAddress>Starts at the Del Mar Fairgrounds - Finishes at La Jolla Cove</eventAddress>
<country>United States</country>
<category>Activities</category>
<assetTypeId>EA4E860A-9DCD-4DAA-A7CA-4A77AD194F65</assetTypeId>
<eventZip>92037</eventZip>
<UpdateDateTime>9/1/2010 6:09:21 PM</UpdateDateTime>
<latitude>32.84334</latitude>
<startDate>2010-04-25</startDate>
<state>California</state>
<mediaType>
<value>Event</value>
<value>Event\5K</value>
<value>Event\Half Marathon</value>
</mediaType>
<assetId> 3a1b52e7-9d67-42f2-9bb8-f4c624a0d280 </assetId>
<participationCriteria>Adult</participationCriteria>
<onlineDonationAvailable>false</onlineDonationAvailable>
<assetName> La Jolla Half Marathon </assetName>
<zip>92037</zip>
<contactPhone>858-454-0777</contactPhone>
<contactEmail>support@runinfo.com</contactEmail>
<onlineMembershipAvailable>false</onlineMembershipAvailable>
<trackbackurl>http://www.active.com/running/la-jolla-ca/
la-jolla-half-marathon-2010
</trackbackurl>
<onlineRegistrationAvailable>true</onlineRegistrationAvailable>
<image1>http://www.active.com/images/events/hotrace.gif</image1>
<lastModifiedDate>2010-07-14</lastModifiedDate>
<channel>
<value>Running</value>
</channel>
</meta>
</result>
</results>
</search>
Each result element contains metadata about half marathons in San Diego, CA, including the assetId which can be used to query other Active.com APIs for additional metadata. The Active.com Search API is documented in detail on the Active.com Search API Reference page.
Getting a Bit More Detail
We're interested in knowing more about the La Jolla Half Marathon, so we query the Active.com Asset Details API using the assetId of that race, 3a1b52e7-9d67-42f2-9bb8-f4c624a0d280:
<event> <assetID>3a1b52e7-9d67-42f2-9bb8-f4c624a0d280</assetID> <eventID>1733302</eventID> <eventName>La Jolla Half Marathon</eventName> <eventDate>2010-04-25T07:30:00-07:00</eventDate> <eventLocation>Del Mar to La Jolla</eventLocation> <eventAddress>Starts at the Del Mar Fairgrounds - Finishes at La Jolla Cove</eventAddress> <eventCity>La Jolla</eventCity> <eventState>California</eventState> <eventZip>92037</eventZip> <eventCountry>USA</eventCountry> <usatSanctioned>false</usatSanctioned> <regOnline>true</regOnline> <eventCloseDate>2010-04-10T23:59:00-07:00</eventCloseDate> <eventFees>Half Marathon $55.00 until 2/5 and $65 after <br>5K (Run & Stride) $25.00 </eventFees> <currencyCode>USD</currencyCode> <eventTypeID>7</eventTypeID> <eventType>Event, Race</eventType> <hasEventResults>true</hasEventResults> <hasMetaResults>true</hasMetaResults> <showMap>true</showMap> <longitude>-117.2588</longitude> <latitude>32.84334</latitude> <eventContactEmail>support@runinfo.com</eventContactEmail> <eventContactPhone>858-454-0777</eventContactPhone> <displayCloseDate>true</displayCloseDate> <excludedFromEmailing>true</excludedFromEmailing> <metaEventName>La Jolla Half Marathon</metaEventName> <metaEventID>1065</metaEventID> <category>Activities</category> <mediaTypes> <mediaType>Event</mediaType> <mediaType>Event\5K</mediaType> <mediaType>Event\Half Marathon</mediaType> </mediaTypes> <channels> <channel> <channelName>Running</channelName> <primaryChannel>true</primaryChannel> </channel> </channels> <eventCategories/> <eventDetails/> <eventDonationLinks/> <eventSanctions/> <eventUrl>http://www.lajollahalfmarathon.com</eventUrl> <registrationSearchUrl>http://www.active.com/search_reg.cfm? event_id=1733302&sr_id=25508 </registrationSearchUrl> <resultsUrl>http://results.active.com/pages/page.jsp?pubID=3&eventID=1733302</resultsUrl> <eventDetailsPageUrl>http://www.active.com/page/Event_Details.htm? event_id=1733302 </eventDetailsPageUrl> <eventContactUrl>http://www.active.com/event_contact.cfm?event_id=1733302</eventContactUrl> </event>
Checkout the Active.com Asset Details Reference for a good overview of this API.
People's Reviews
We understand that this race has already happened, which is fine, since we're really interested in user reviews of the La Jolla Half Marathon. So we make a call to the Reviews API to find out what people thought of the race: http://api.amp.active.com/reviews/asset/3a1b52e7-9d67-42f2-9bb8-f4c624a0d280?api_key=r9t3wekmg8gdcwd6a5sweauq:
(for illustrative purposes, most reviews have been ommitted)
<asset>
<assetID>3a1b52e7-9d67-42f2-9bb8-f4c624a0d280</assetID>
<avgRating>3.4</avgRating>
<totalRatings>35</totalRatings>
<totalReviews>44</totalReviews>
<hasUserReviewed>false</hasUserReviewed>
<reviews>
<review>
<attachmentCount>0</attachmentCount>
<body>
<body>
<p>This was my first half marathon and it was challenging but it was great!
There was plenty of water and the views were amazing. I did
notice before the race that a lot of people had their chips folded
in half instead of in a loop, which probably ruined the chip. Maybe that
could be why some people did not get their time? </p>
</body>
</body>
<dateReviewed>2010-04-30T11:35:02.615-07:00</dateReviewed>
<forumThreadID>74685</forumThreadID>
<ID>745861</ID>
<imageCount>0</imageCount>
<rating>
<assetID>3a1b52e7-9d67-42f2-9bb8-f4c624a0d280</assetID>
<averageRating>3.416666</averageRating>
<dateRated>2010-04-30T18:35:02.2-07:00</dateRated>
<numberOfRatings>36</numberOfRatings>
<rating>5</rating>
<ratingID>49913</ratingID>
<userID>81feabb4-3574-4a06-bd47-3db3ad4c6b73</userID>
</rating>
<subject>Re: La Jolla Half Marathon Reviews</subject>
<user>
<ausDisplayName>Marinor</ausDisplayName>
<ausID>81feabb4-3574-4a06-bd47-3db3ad4c6b73</ausID>
<avatar>http://community.active.com/people/Marinor/avatar/48.png</avatar>
</user>
</review>
<review>
<attachmentCount>0</attachmentCount>
<body>
<body>
<p>I am working towards the Triple Crown and this was my second 1/2
marathon ever. I finished in an alright time and my results actually
were recorded, but I am totally bummed that I dropped/lost my medal
near the fruit station. Anyone know who I can contact about getting
a replacement medal?</p>
</body>
</body>
<dateReviewed>2010-04-27T20:31:51.754-07:00</dateReviewed>
<forumThreadID>74685</forumThreadID>
<ID>744821</ID>
<imageCount>0</imageCount>
<rating>
<assetID>3a1b52e7-9d67-42f2-9bb8-f4c624a0d280</assetID>
<averageRating>3.416666</averageRating>
<dateRated>2010-04-28T03:31:51.643-07:00</dateRated>
<numberOfRatings>36</numberOfRatings>
<rating>3</rating>
<ratingID>49705</ratingID>
<userID>7833dac4-a7bb-48a8-90e9-34e307d1549d</userID>
</rating>
<subject>Re: La Jolla Half Marathon Reviews</subject>
<user>
<ausDisplayName>MACS Momma</ausDisplayName>
<ausID>7833dac4-a7bb-48a8-90e9-34e307d1549d</ausID>
<avatar>http://community.active.com/people/MACS Momma/avatar/48.png</avatar>
</user>
</review>
</reviews>
</asset>
The Reviews API is extensively documented on the Active.com Asset Reviews API Reference page.
Documentation
- Active.com Search API Reference
- Active.com Popular Activities Search API Reference
- Active.com Asset Details API Reference
- Active.com Asset Reviews API Reference
- Active.com Widgets
Interested in Camping? Then check out the Active.com Camping API! Or how about high school sports rankings? Then take a look at the Sportspower API.
Docs Navigation
- Active.com API
- Active.com Camping API
- Active.com Widgets
- Active.com Search API Reference
- Active.com Popular Activities Search API Reference
- Active.com Asset Details API Reference
- Active.com Asset Reviews API Reference
- Active.com Campground Search API Reference
- Active.com Campground Details API Reference
- Active.com Campsite Search API Reference
- ActiveGolf.com API
0 Comments
New comments are not being accepted at this time.