/index/search

From EveryTrail API Developer Documentation

Jump to: navigation, search

Contents

URL

/api/index/search

Semantics

Search for trips and guides on EveryTrail.com

Parameters

Parameter nameParameter formatRequiredDescription
qstringnoThe term to search.
activitiesarray of ints (comma separated)noa list of activities to search.
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
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)
guide_limitintnoThe maximum number of guides to return
trip_limitintnoThe maximum number of trips to return)
limitintnoThe maximum number of results to return (default is 20)
media_filter_modeintnoSee Media Filter Enumeration
min_duration (trips)intnoThe minimum duration of a trip in seconds
max_duration (trips)intnoThe maximum duration of a trip in seconds
durations (guides)bitmasknoA bitwise OR of the durations (see below), default is all
difficulties (guides)bitmasknoA bitwise OR of the difficulties (see below), default is all
options_whitelist (guides)bitmasknoA bitwise OR of the other options to include (see below), default is none
options_blacklist (guides)bitmasknoA bitwise OR of the other options to not include (see below), default is none
guide_partner_id (guides)intnoID of guide partner. Only guides created by this partner will be returned
  • 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

Limits

There are several different ways to specify the number of guides and trips returned:

  • if "limit" is set, the total number of returned items will never exceed that number
guide_limit settrip_limit setOutcome
00up to limit guides are returned, the remaining spots are filled with as many trips as possible
01up to limit guides are returned, the remaining spots are filled with up to trip_limit trips
10up to guide_limit guides are returned, the remaining spots are fulled with as many trips as possible
11up to guide_limit guides are returned, up to trip_limit trips are returned

Durations

  • 0x0: unknown
  • 0x1: less than 1 hour
  • 0x2: 1-3 hours
  • 0x4: half day
  • 0x8: full day
  • 0x16: multiple days

Difficulties

  • 0x0: unknown
  • 0x1: easy
  • 0x2: moderate
  • 0x4: strenuous

Other Options

Guides contain other option, such as dog friendly, family friendly, bikes allowed, etc.

  • The whitelist signals all options which MUST be present in the returned results (ie, kid friendly)
  • The blacklist signals all options with MUST NOT be present in the returned results (ie horses allowed on trail)

Success Response

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

Error Response

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

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

Error Codes

110 - The specified address could not be geocoded

Personal tools