Searching Trips

From EveryTrail API Developer Documentation

Jump to: navigation, search

Contents

URL

/api/trip/search

Semantics

Search for trips on EveryTrail.com

Parameters

Parameter nameParameter formatRequiredDescription
qstringnoThe term to search. The entire string must be present in the title or description for a trip to be returned.
activitiesarray of ints (comma separated)noa list of activities to search. A trip must be listed as one of these activities in order to be returned.
latdoublenoThe latitude coordinate to search near
londoublenoThe longitude coordinate to search near
proximitydoublenoThe proximity (in miles) of the trip from the (lat,lon) location.
addressstringnoAn address to search near (when proximity is specified)
min_lengthdoublenoThe minimum length of a trip in meters
max_lengthdoublenoThe maximum length of a trip in meters
min_durationintnoThe minimum duration of a trip in seconds
max_durationintnoThe maximum duration of a trip in seconds
sortstringnoHow to sort the results (recent_popularity, trip_date, creation_date, votes, proximity*, trip_length. Default is recent popularity)
orderstringnoHow to order the results (DESC, ASC). Default is ASC)
limitintnoThe maximum number of results to return (default is 20)
startintnoThe index of the first trip to return from the result set. (default is 0)
media_filter_modeintnoSee Media Filter Enumeration
min_avg_ratingfloatnoAll trips returned must have an average rating of at least this
  • If you search based on proximity, you MUST include either lat AND lon, OR address
  • if you sort by proximity, you MUST include either lat AND lon, OR address

Success Response

<etTripSearchResponse status="success">
 
  <trips totalCount="" returnedCount="">
    ${tripXML}
  </trips>
</etTripSearchResponse>

${tripXML} - see Trip XML Format

Error Response

<etTripSearchResponse status="error">
  ${error response}
</etTripSearchResponse>

${error response}: See format in Error Reponse Format

Error Codes

110 - The specified address could not be geocoded

Personal tools