Searching by Activity
Allowing the end user to easily search by activity type is very useful. A lot of the time we get asked if there is a way to reduce the number of activities returned by our API to make the search functionality on the front end more intuitive - this is because when an API call returns tens to hundreds of thousands of items, there can be a lot of different activity types from the Activity List returned. It is, however, possible to reduce the number of activities returned in the following three ways:
The easiest way to reduce the number of activities that appear in after a search is to use a smaller radius in
geo[radial]. This can be achieved by asking the end user upfront where they want to focus their search. Once you have the coordinates, you can restrict the radius and receive a more manageable number of results.
Another way is to filter on
imin:facets listed at the bottom of the API results to only show those top concepts listed in https://activity-list.openactive.io/en/hierarchical_concepts.html; or
The final way to filter on
imin:facet.imin:index.activity.imin:item.imin:resultCountin order to show the e.g. top 10
prefLabels with the highest number of associated items.