# Activities and Concept Collections

{% hint style="info" %}
Before using these query parameters, please refer to [Activities and Collections](https://docs.imin.co/platform-products/search/imin-events-api/concepts/activities-and-collections) for an introduction.
{% endhint %}

## Activities

### `-Id` and `-PrefLabel`

There are two query parameters that can be used to filter sessions by specific activities:

1. `activityId={id}`; and<br>
2. `activityPrefLabel={prefLabel}`.

When filtering by either `activityId` or `activityPrefLabel`, the items returned will depend where the activity features in the concept hierarchy. For example, when searching for a parent activity, e.g. Dance Aerobics, the items returned will include that parent activity **and all of its children**. However, when searching for a child activity at the bottom of the concept hierarchy, e.g. Funky HAU2, **only those items will be returned**.

{% hint style="success" %}
We recommend using the `activityId` parameter in the first instance as the `prefLabel` is liable to be changed in the future by the [OpenActive Activity List](https://www.openactive.io/activity-list/activity-list.jsonld), whereas the `id`s will always stay the same.
{% endhint %}

#### Example

The following two API calls will both return results for yoga:

1. <https://search.imin.co/events-api/v2/event-series?mode=upcoming-sessions&geo[radial]=51.430052,-0.501664,100&limit=50&activityId=https%3A%2F%2Fopenactive.io%2Factivity-list%23bf1a5e00-cdcf-465d-8c5a-6f57040b7f7e><br>
2. <https://search.imin.co/events-api/v2/event-series?mode=upcoming-sessions&geo[radial]=51.430052,-0.501664,100&limit=50&activityPrefLabel=Yoga>

{% hint style="warning" %}
When using `activityId={id}`to search, you must encode the URL to remove special characters.
{% endhint %}

{% hint style="warning" %}
The `prefLabel` search is case sensitive, so `activityPrefLabel=dance%20aerobics` will not return any results.
{% endhint %}

{% hint style="info" %}
Both the `activityId` and `activityPrefLabel` parameters can be used for multiple values. Please see [Filters](https://docs.imin.co/platform-products/search/imin-events-api/filters/..#same-filter-multiple-values) for more information.
{% endhint %}

## Concept Collections

### `collectionId`

To return sessions that form part of specific collections, the query parameter `activityConceptCollectionId={collectionId}` can be used.

#### Example

The following will return all activities that are included in the Cardio Collection (found [here](https://activity-list.openactive.io/en/collections/_cardio.html)):

<https://search.imin.co/events-api/v2/event-series?mode=upcoming-sessions&geo[radial]=51.430052,-0.501664,100&limit=50&activityConceptCollectionId=https%3A%2F%2Fdata.emduk.org%2Fcollections%2Fcardio.jsonld>
