Searching Trips
From EveryTrail API Developer Documentation
Contents |
URL
/api/trip/search
Semantics
Search for trips on EveryTrail.com
Parameters
| Parameter name | Parameter format | Required | Description |
|---|---|---|---|
| q | string | no | The term to search. The entire string must be present in the title or description for a trip to be returned. |
| activities | array of ints (comma separated) | no | a list of activities to search. A trip must be listed as one of these activities in order to be returned. |
| lat | double | no | The latitude coordinate to search near |
| lon | double | no | The longitude coordinate to search near |
| proximity | double | no | The proximity (in miles) of the trip from the (lat,lon) location. |
| address | string | no | An address to search near (when proximity is specified) |
| min_length | double | no | The minimum length of a trip in meters |
| max_length | double | no | The maximum length of a trip in meters |
| min_duration | int | no | The minimum duration of a trip in seconds |
| max_duration | int | no | The maximum duration of a trip in seconds |
| sort | string | no | How to sort the results (recent_popularity, trip_date, creation_date, votes, proximity*, trip_length. Default is recent popularity) |
| order | string | no | How to order the results (DESC, ASC). Default is ASC) |
| limit | int | no | The maximum number of results to return (default is 20) |
| start | int | no | The index of the first trip to return from the result set. (default is 0) |
| media_filter_mode | int | no | See Media Filter Enumeration |
| min_avg_rating | float | no | All 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
