---
title: "Count participants"
method: POST
path: "/api/v1/eligibility-count/"
tags: ["filters"]
---

# Count participants

`POST /api/v1/eligibility-count/`

Count how many participants meet all the given filters.
Only participants that pass **every one** of the filters are counted.
Zero means that there are less than 25 participants. We do not show lower numbers to protect the privacy of the participants.

To see a list of filters that may be passed to this endpoint, see the documentation for filters.

## Headers

- `Authorization` string, required

## Request body

- RequirementsCountRequest
  - `filters` RequirementsCountRequestFiltersItems[], required — List of filters to apply to the count. This parameter uses the new, simplified filters schema for interacting with eligibility.
    - union
      - SelectFilter
        - `filter_id` string, required — ID of the "select" type filter.
        - `selected_values` string[], required — This schema applies for filters of the `select` type, as defined in the [filter list response](\#tag/Filters/paths/~1api~1v1~1filters~1/get). Array of IDs matching the response IDs, from the `select` filter's `choices` (see response linked above). String format should match the `data_type` of the `select` filter's `choices` (see response linked above).
        - `weightings` object — Ratios to control the distribution of participants across the selected values. Integer percentages, floats, and exact quantities are valid inputs.
      - RangeFilter
        - `filter_id` string, required — ID of the "range" type filter.
        - `selected_range` RangeFilterSelectedRange, required — This schema applies for filters of the `range` type, as defined in the [filter list response](\#tag/Filters/paths/~1api~1v1~1filters~1/get). A dictionary with two possible objects, 'lower' and 'upper'. At least one must be present and a non-null value. The expected data type for these values is defined by the `range` filter's `data_type` (see response linked above). If the data_type is a date, string format should be a parseable ISO8601 date string. Date values should be provided as a string in ISO 8601 format. Leaving a value as null will result in that bound being set to the lowest or highest possible value, depending on whether it is the upper or lower bound.
          - `lower` union — Your selected lower bound for the range.
            - integer
            - string
            - number, double
          - `upper` union — Your selected upper bound for the range.
            - integer
            - string
            - number, double
        - `weightings` object — Ratios to control the distribution of participants across the selected values. Integers and exact quantities are valid inputs.
      - CompositeFilter
        - `filter_id` 'and' | 'or', required — Composite filter group operator. Use `and` when every child filter must match, or `or` when at least one child filter must match.
        - `selected_filters` CompositeFilterSelectedFiltersItems[], required — Child filters in this group. Children can be select filters, range filters, or supported nested composite groups.
          - union
            - SelectFilter
              - …
            - RangeFilter
              - …
            - CompositeFilter — recursive
  - `workspace_id` string — The ID of the workspace you will be creating a study in. Due to US tax laws, non US residents may not participate in studies created by US researchers. For this reason, we use the country specified in the workspace to determine eligibility. If you do not specify a workspace ID, we will use the current workspace ID of the user making the request. Your eligibility count may not be accurate if you do not specify a workspace ID.
  - `organisation_id` string — The ID of the workspace you will be creating a filterset in.

## Response `200`

Count

- RequirementsCount
  - `count` number, double, required — Number of participants passing all the requirements

## Other responses

- `400` — Error

---

[API](https://skmtc.net/prolific/apis/api-reference.md) · [All operations](https://skmtc.net/prolific/apis/api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/prolific/api-reference/versions/dc6f073a9827/schema)
