The Results method searches a specified collection and returns a corresponding basic object for each. See the Search API overview for a listing of all collections.
The query
parameter performs a fuzzy search on a number of different parameters, e.g. for the athletes index a search for Brownlee will search the article title, article excerpt and associated tags.
If you wish to search multiple collections for the best possible user experience it is suggested that you make, and present, individual queries of the separate collections such that you can set the parameters on each accordingly.
We don’t recommend to merge the results of several queries in a single results list because their ranking criteria are often non-comparable: rather display them in separated sections.
You may apply additional filters, dates and geo-searching parameters to your queries to refine search results.
Examples
Find all athletes with Gwen in their name.
curl --header "apikey: [[app:key]]" "https://api.triathlon.org/v1/search/athletes?query=gwen"
Restrict an athlete search to elite only athletes (those athletes with a current points list ranking).
curl --header "apikey: [[app:key]]" "https://api.triathlon.org/v1/search/athletes?filters=athlete_gender,male|elite,true"
List events that are closest to a certain location (to find events in the future add an applicable start_date
).
curl --header "apikey: [[app:key]]" "https://api.triathlon.org/v1/search/events?location=49.246292,-123.116226"