Your Search Results and HighFrequencySessions
For an introduction to HighFrequencySessions, please refer to this page.
The default behaviour of the Events API is to include iminTag[not]=HighFrequencySession in every call. As a result of this, a general Events API search will return neither swimming nor gym workout sessions. This is due to the sheer volume of these types of sessions in our Platform.
HighFrequencySessions include items provided by leisure operators that have either Swimming or Gym Workout as the activityPrefLabel.
If you are offering users the ability to search for Swimming and/or gym workout, and you are relying on the default behaviour of the Events API, i.e. your API calls include iminTag[not]=HighFrequencySession, then the number of sessions returned will be vastly reduced.
For example, the following API call will return a very smaller number of items that have Swimming as the activityPrefLabel:
https://search.imin.co/events-api/v2/event-series?mode=upcoming-sessions&geo[radial]=51.2422774,-0.7294026,50&limit=50&activityId=https%3A%2F%2Fopenactive.io%2Factivity-list%232750229d-b725-4171-9276-376be913957c
This is because iminTag[not]=HighFrequencySession is filtering out the large of swimming sessions contained in the Platform that would otherwise match the given parameters.
Please note that the absence of iminTag[not]=HighFrequencySession in the above API call does not mean it is not there. It just serves to illustrate the default behaviour of the Events API, i.e. filter the results to exclude swimming and gym workout sessions as standard. One way to check this is to look at view.id in the results of the above API call, which will make reference to iminTag%5Bnot%5D%3DHighFrequencySession even though it is not included it in the initial API call.
If you want to return all available swimming sessions, you will need to include iminTag=HighFrequencySession, i.e. exclude the [not] from the API call.
For example, the following API call will return tens of thousands of items that have Swimming as the activityPrefLabel:
https://search.imin.co/events-api/v2/event-series?mode=upcoming-sessions&geo[radial]=51.2422774,-0.7294026,50&limit=50&iminTag=HighFrequencySession&activityId=https%3A%2F%2Fopenactive.io%2Factivity-list%232750229d-b725-4171-9276-376be913957c
If you want to return swimming or gym workout sessions via the Events API, then you must include iminTag=HighFrequencySession along with the relevant activityId.
Conversely, if you include iminTag=HighFrequencySession in an API call along with an activityId that corresponds to something other than swimming or gym workout, e.g. football, then 0 items will be returned.
iminTag=HighFrequencySession can only be used exclusively when searching for swimming and/or gym workout.
Copy link