BikeReg.com Event Search API

This returns event search results similar to the event calendar in JSON format.

Endpoint

Requests should be GET requests directed to http://www.BikeReg.com/api/search.

Parameters

All parameters are passed via query string and are optional. Parameter names are case-sensitive. Results are limited to the first 100 matches and ordered chronologically ascending.

Parameter Notes
name A string of characters to search for in the event name, i.e. "Gloucester"
region A region to restrict the search to. Legal values for this are the set of choices in the "Event Location" drop down box on the event search page above the first set of dashes, i.e. "New England" is valid but "American Samoa" is not.
states A comma-separated list of two-character state abbreviations to restrict the search to, i.e. "ME,NH,VT"
loc A base location for the search. If this is included, results will have a "distance" property that represents how far away each result is from the given point. Points should be specified in the format "lat|long".
distance Restricts search results to those within distance miles of loc. If loc is not specified, this has no effect.
eventtype A comma-separated list of event types to restrict the search to. Legal values for this are the set of choices in the "Event Type" drop down box on the event search page above the first set of dashes, i.e. "MTB Races" is valid but "BUMPS Hillclimb Series" is not.
permit An exact USAC permit # to match, i.e. "2014-2735"
startpage The page of results to start with, counting by 100. i.e. a startpage of "2" will return the 200-300th results for that search, if they exist.
year Restricts search to results within a given calendar year (i.e. "2014"). If all date parameters are absent (year, startdate, enddate), results will include all future events.
startDate The date to start the search from. Any event ending on or after this date will be included. If all date parameters are absent (year, startdate, enddate), results will include all future events.
endDate The date to end the search at. Any event starting on or before on or after this date will be included. If all date parameters are absent (year, startdate, enddate), results will include all future events.

You can also make a request for a specific event by supplying an event ID. This ID is in the url of the "who's registered" page, or in any event-director administration page for that event. If you supply an event ID, all other parameters are ignored. Searching by a single event ID is the only way to get a value reported in the "TotalRegistrations" field of the response.

Parameter Notes
eventID The ID of the event to look up.

Response

The response is a JSON-formatted object with two properties, "ResultCount" and "MatchingEvents." We assume you can figure out what they are.