- Previous:
- Up:
- Next: Active.com Search API Reference
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, 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.
For example, details about the La Jolla Half Marathon 2010, with assetId 3a1b52e7-9d67-42f2-9bb8-f4c624a0d280, can be retrieved through a call to http://api.amp.active.com/resource/assetservice/asset/3a1b52e7-9d67-42f2-9bb8-f4c624a0d280?api_key=u2hcu6p5qvwksr54gdz9rppz (note the api_key is a demo key):
<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>
All of the Active.com APIs are read-only and return public data. As a result, no security measures (SSL, Oauth) are required.
Searching for Assets
Developers primarily use the Active.com API to locate assets matching a set of criteria. It may be of interest, for example, to get a list of running activities happening within 10 miles of Solana Beach, CA, http://api.amp.active.com/search?k=running&f=activities&v=xml&l=Solana+Beach%2C+CA%2C+US&r=10&s=relevance&m=meta%3AstartDate%3Adaterange%3Atoday..+meta%3Achannel%3DRunning+meta%3AsplitMediaType%3DEvent&api_key=wuhmn9ye94xn3xnteudxsavw:
<search>
<time>0.166914</time>
<totalResults>12</totalResults>
<fromNum>1</fromNum>
<toNum>12</toNum>
<page>1</page>
<results>
<result>
<num>1</num>
<mime/>
<url>http://www.active.com/running/solana-beach-ca/playa-del-run-beach-festival-solana-beach-2010</url>
<url_encoded>http://www.active.com/running/solana-beach-ca/playa-del-run-beach-festival-solana-beach-2010</url_encoded>
<title>Playa del <b>Run</b> Beach Festival: Solana Beach | Solana Beach <b>...</b></title>
<language>en</language>
<abstract><b>...</b> Playa del <b>Run</b> Beach Festival: Solana Beach. Based on 0 reviews. <b>...</b> Recent Reviews Playa<br> del <b>Run</b> Beach Festival: Solana Beach reviews. Get Directions. Start Address. <b>...</b> </abstract>
<meta>
<eventDate>2010-08-15T08:00:00-07:00</eventDate>
<location>Fletcher Cove</location>
<tag>
<value>event:10</value>
<value>Running:10</value>
</tag>
<eventLongitude>-117.2555</eventLongitude>
<endDate>2010-08-15</endDate>
<lastModifiedDateTime>2010-07-08 15:15:11.83</lastModifiedDateTime>
<splitMediaType>
<value>Event</value>
<value>5K</value>
</splitMediaType>
<locationName>Fletcher Cove</locationName>
<endTime>8:00:00</endTime>
<city>Solana Beach</city>
<google-site-verification/>
<startTime>8:00:00</startTime>
<eventId>1819930</eventId>
<description/>
<longitude>-117.2555</longitude>
<substitutionUrl>1819930</substitutionUrl>
<sortDate>2000-08-15</sortDate>
<eventState>California</eventState>
<eventLatitude>33.00323</eventLatitude>
<keywords>Event</keywords>
<eventAddress>123 W Plaza Street</eventAddress>
<country>United States</country>
<category>Activities</category>
<assetTypeId>EA4E860A-9DCD-4DAA-A7CA-4A77AD194F65</assetTypeId>
<eventZip>92075</eventZip>
<UpdateDateTime>7/13/2010 7:13:55 PM</UpdateDateTime>
<latitude>33.00323</latitude>
<startDate>2010-08-15</startDate>
<state>California</state>
<mediaType>
<value>Event</value>
<value>Event\5K</value>
</mediaType>
<assetId> a29be184-3cb1-4dd4-922f-1cccf483beb8 </assetId>
<participationCriteria>All</participationCriteria>
<onlineDonationAvailable>false</onlineDonationAvailable>
<assetName> Playa del Run Beach Festival: Solana Beach </assetName>
<zip>92075</zip>
<contactPhone>310-821-7898</contactPhone>
<contactEmail>brennan@genericevents.com</contactEmail>
<onlineMembershipAvailable>false</onlineMembershipAvailable>
<longitude>-117.2555</longitude>
<trackbackurl>http://www.active.com/running/solana-beach-ca/playa-del-run-beach-festival-solana-beach-2010</trackbackurl>
<onlineRegistrationAvailable>true</onlineRegistrationAvailable>
<image1>http://www.active.com/images/events/hotrace.gif</image1>
<lastModifiedDate>2010-07-08</lastModifiedDate>
<latitude>33.003235000000004</latitude>
<channel>
<value>Running</value>
<value>Swimming</value>
</channel>
</meta>
</result>
<result>
<num>2</num>
<mime/>
<url>http://www.active.com/running/encinitas-ca/summer-run-series-7-2010</url>
<url_encoded>http://www.active.com/running/encinitas-ca/summer-run-series-7-2010</url_encoded>
<title>Summer <b>Run</b> Series #7 | Encinitas, California 92024 | Monday <b>...</b></title>
<language>en</language>
<abstract><b>...</b> <b>Run</b> Series is a 10 Week series of FREE sponsored fun <b>runs</b> from our <b>...</b> you the chance<br> to test their products out during the <b>run</b>, as well as <b>...</b> Similar <b>Running</b> Events. <b>...</b> </abstract>
<meta>
<eventDate>2010-08-09T18:00:00-07:00</eventDate>
<location>Movin Shoes, Encinitas</location>
<endDate>2010-08-09</endDate>
<eventLongitude>-117.2794</eventLongitude>
<lastModifiedDateTime>2010-06-13 13:15:01.907</lastModifiedDateTime>
<splitMediaType>
<value>Event</value>
<value>Long Course</value>
</splitMediaType>
<locationName>Movin Shoes, Encinitas</locationName>
<endTime>18:00:00</endTime>
<city>Encinitas</city>
<google-site-verification/>
<startTime>18:00:00</startTime>
<eventId>1871016</eventId>
<description/>
<longitude>-117.2794</longitude>
<substitutionUrl>1871016</substitutionUrl>
<sortDate>2000-08-09</sortDate>
<eventState>California</eventState>
<eventLatitude>33.05208</eventLatitude>
<keywords>Event</keywords>
<eventAddress>897 S. Coast Hwy 101</eventAddress>
<country>United States</country>
<category>Activities</category>
<assetTypeId>EA4E860A-9DCD-4DAA-A7CA-4A77AD194F65</assetTypeId>
<eventZip>92024</eventZip>
<UpdateDateTime>7/13/2010 7:13:55 PM</UpdateDateTime>
<latitude>33.05208</latitude>
<startDate>2010-08-09</startDate>
<state>California</state>
<mediaType>
<value>Event</value>
<value>Event\Long Course</value>
</mediaType>
<assetId> 19ed8915-d46f-4bb4-ad65-0196e4182332 </assetId>
<participationCriteria>All</participationCriteria>
<onlineDonationAvailable>false</onlineDonationAvailable>
<assetName> Summer Run Series #7 </assetName>
<zip>92024</zip>
<contactPhone>760-634-2353</contactPhone>
<contactEmail>seasiderunners@yahoo.com</contactEmail>
<onlineMembershipAvailable>false</onlineMembershipAvailable>
<longitude>-117.279404</longitude>
<trackbackurl>http://www.active.com/running/encinitas-ca/summer-run-series-7-2010</trackbackurl>
<onlineRegistrationAvailable>false</onlineRegistrationAvailable>
<lastModifiedDate>2010-06-13</lastModifiedDate>
<latitude>33.052080000000004</latitude>
<channel>
<value>Running</value>
<value>Triathlon</value>
</channel>
</meta>
</result>
...
</results>
</search>
Each result element contains an extensive list of metadata about the assets matching the search criteria, including the assetId which can be used to query other Active.com APIs for additional metadata. The Active.com Search API is extensively documented on the Active.com Search API Reference page.
Asset Metadata
If we were interested in additional metadata about the first asset in the search response, the Playa Del Run Beach Festival in Solana Beach (assetId a29be184-3cb1-4dd4-922f-1cccf483beb8), such as the event organizer's contact information or event fees, we'd query the Active.com Asset Details API as demonstrated in the Introduction. This API is extensively documented on the Active.com Asset Details API Reference page.
The Active.com API also exposes asset reviews. A call to http://api.amp.active.com/reviews/asset/a29be184-3cb1-4dd4-922f-1cccf483beb8?api_key=r9t3wekmg8gdcwd6a5sweauq returns reviews for the Playa Del Run Beach Festival:
<asset> <assetID>a29be184-3cb1-4dd4-922f-1cccf483beb8</assetID> <avgRating>0</avgRating> <totalRatings>0</totalRatings> <totalReviews>0</totalReviews> <hasUserReviewed>false</hasUserReviewed> <reviews/> </asset>
In this case there are no reviews for this asset as, at the time of this writing, the Playa Del Run Beach Festival occurs in the future. Future activities commonly don't have reviews associated with them. Activities that have already happened, by contrast, tend to have a number of reviews, as is the case for the La Jolla Half Marathon, 2010, http://api.amp.active.com/reviews/asset/3a1b52e7-9d67-42f2-9bb8-f4c624a0d280?api_key=r9t3wekmg8gdcwd6a5sweauq:
<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 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.
- Previous:
- Up:
- Next: Active.com Search API Reference
Docs Navigation
- Active.com API
- Active.com Search API Reference
- Active.com Asset Details API Reference
- Active.com Asset Reviews API Reference
- Active.com Widgets
- Active.com Camping API
- Active.com Campground Search API Reference
- Active.com Campground Details API Reference
- Active.com Campsite Search API Reference
- Sportspower API

Comments
New comments are not being accepted at this time.