# List all filters GET https://api.prolific.com/api/v1/filters/ List all filters that can be applied to your filter sets or studies. Reference: https://beta-docs.prolific.com/api-reference/filters/get-filters ## OpenAPI Specification ```yaml openapi: 3.1.1 info: title: List all filters version: endpoint_filters.GetFilters paths: /api/v1/filters/: get: operationId: get-filters summary: List all filters description: List all filters that can be applied to your filter sets or studies. tags: - - subpackage_filters parameters: - name: detailed in: query description: >- Include extra information required to sort and categorise filters in the Prolific app. This is not required for API use. Default false. required: false schema: type: string - name: workspace_id in: query description: >- The workspace ID for the workspace you are creating a study or filterset in. This is used to get contextual data such as previous studies and participant groups. required: false schema: type: string - name: filter_tag in: query description: Can be used to return only Custom Group filters. required: false schema: type: string - name: Authorization in: header description: Header authentication of the form `undefined ` required: true schema: type: string responses: '200': description: List of filters content: application/json: schema: $ref: '#/components/schemas/FilterList' '400': description: Error content: {} components: schemas: FilterListAttributesType: type: string enum: - value: select - value: range SelectFilterListAttributesDataType: type: string enum: - value: ChoiceID - value: ParticipantID - value: StudyID - value: ParticipantGroupID SelectFilterListResponse: type: object properties: filter_id: type: string description: >- The ID of the filter, based on a slugified version of the title at the time the filter was created. title: type: string description: The title of the filter. description: type: string description: A description of the filter. type: $ref: '#/components/schemas/FilterListAttributesType' description: The filter type. question: type: string description: The question asked of participants to generate this filter. choices: type: object additionalProperties: description: Any type description: >- An object containing all the filter's possible responses as key-value pairs, with sequential integer IDs or database ObjectIDs as the keys and the text of the response as the values. data_type: $ref: '#/components/schemas/SelectFilterListAttributesDataType' description: >- The format of the keys in the choices object. If the keys are strings representing sequential integers, the data format is integer. If the keys are database ObjectIDs, the type of ID is specified. SelectFilterListDetailedResponse: type: object properties: filter_id: type: string description: >- The ID of the filter, based on a slugified version of the title at the time the filter was created. title: type: string description: The title of the filter. description: type: string description: A description of the filter. type: $ref: '#/components/schemas/FilterListAttributesType' description: The filter type. question: type: string description: The question asked of participants to generate this filter. choices: type: object additionalProperties: description: Any type description: >- An object containing all the filter's possible responses as key-value pairs, with sequential integer IDs or database ObjectIDs as the keys and the text of the response as the values. data_type: $ref: '#/components/schemas/SelectFilterListAttributesDataType' description: >- The format of the keys in the choices object. If the keys are strings representing sequential integers, the data format is integer. If the keys are database ObjectIDs, the type of ID is specified. researcher_help_text: type: - string - 'null' description: >- Some help text to be displayed to researchers in the prescreening modal. participant_help_text: type: - string - 'null' description: >- Some help text to be displayed to participants in the About You section. category: type: - string - 'null' description: >- The category the filter is displayed in in About You and the prescreening modal. subcategory: type: - string - 'null' description: >- The sub-category the filter is displayed in in the prescreening modal. display_order: type: - integer - 'null' description: >- The order in which the filter is displayed within its sub-category in the prescreening modal. tags: type: - array - 'null' items: type: string description: >- Some additional tags that can be used to display the filter in a specific way, e.g. recommended, new, expiring. RangeFilterListAttributesMin: oneOf: - type: integer - type: number format: double - type: string RangeFilterListAttributesMax: oneOf: - type: integer - type: number format: double - type: string RangeFilterListAttributesDataType: type: string enum: - value: date - value: integer - value: float RangeFilterListResponse: type: object properties: filter_id: type: string description: >- The ID of the filter, based on a slugified version of the title at the time the filter was created. title: type: string description: The title of the filter. description: type: string description: A description of the filter. type: $ref: '#/components/schemas/FilterListAttributesType' description: The filter type. question: type: string description: The question asked of participants to generate this filter. min: $ref: '#/components/schemas/RangeFilterListAttributesMin' description: The minimum valid value of the range. max: $ref: '#/components/schemas/RangeFilterListAttributesMax' description: The maximum valid value of the range. data_type: $ref: '#/components/schemas/RangeFilterListAttributesDataType' description: >- The data type of the range. - If the data type is integer, the lower and upper values must be integers. Example: `70`. - If the data type is date, the lower and upper values must be ISO8601 dates. Example: `2025-07-11`. - If the data type is float, the lower and upper values can be provided as floats or integers. Returned values will be floats. Example: `70.5` or `80.0`. RangeFilterListDetailedResponse: type: object properties: filter_id: type: string description: >- The ID of the filter, based on a slugified version of the title at the time the filter was created. title: type: string description: The title of the filter. description: type: string description: A description of the filter. type: $ref: '#/components/schemas/FilterListAttributesType' description: The filter type. question: type: string description: The question asked of participants to generate this filter. min: $ref: '#/components/schemas/RangeFilterListAttributesMin' description: The minimum valid value of the range. max: $ref: '#/components/schemas/RangeFilterListAttributesMax' description: The maximum valid value of the range. data_type: $ref: '#/components/schemas/RangeFilterListAttributesDataType' description: >- The data type of the range. - If the data type is integer, the lower and upper values must be integers. Example: `70`. - If the data type is date, the lower and upper values must be ISO8601 dates. Example: `2025-07-11`. - If the data type is float, the lower and upper values can be provided as floats or integers. Returned values will be floats. Example: `70.5` or `80.0`. researcher_help_text: type: - string - 'null' description: >- Some help text to be displayed to researchers in the prescreening modal. participant_help_text: type: - string - 'null' description: >- Some help text to be displayed to participants in the About You section. category: type: - string - 'null' description: >- The category the filter is displayed in in About You and the prescreening modal. subcategory: type: - string - 'null' description: >- The sub-category the filter is displayed in in the prescreening modal. display_order: type: - integer - 'null' description: >- The order in which the filter is displayed within its sub-category in the prescreening modal. tags: type: - array - 'null' items: type: string description: >- Some additional tags that can be used to display the filter in a specific way, e.g. recommended, new, expiring. FilterListResultsItems: oneOf: - $ref: '#/components/schemas/SelectFilterListResponse' - $ref: '#/components/schemas/SelectFilterListDetailedResponse' - $ref: '#/components/schemas/RangeFilterListResponse' - $ref: '#/components/schemas/RangeFilterListDetailedResponse' FilterList: type: object properties: results: type: array items: $ref: '#/components/schemas/FilterListResultsItems' _links: type: object additionalProperties: description: Any type meta: type: object additionalProperties: description: Any type ``` ## SDK Code Examples ```python Custom groups import requests url = "https://api.prolific.com/api/v1/filters/" querystring = {"filter_tag":"custom-group"} headers = {"Authorization": ""} response = requests.get(url, headers=headers, params=querystring) print(response.json()) ``` ```javascript Custom groups const url = 'https://api.prolific.com/api/v1/filters/?filter_tag=custom-group'; const options = {method: 'GET', headers: {Authorization: ''}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go Custom groups package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.prolific.com/api/v1/filters/?filter_tag=custom-group" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby Custom groups require 'uri' require 'net/http' url = URI("https://api.prolific.com/api/v1/filters/?filter_tag=custom-group") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["Authorization"] = '' response = http.request(request) puts response.read_body ``` ```java Custom groups HttpResponse response = Unirest.get("https://api.prolific.com/api/v1/filters/?filter_tag=custom-group") .header("Authorization", "") .asString(); ``` ```php Custom groups request('GET', 'https://api.prolific.com/api/v1/filters/?filter_tag=custom-group', [ 'headers' => [ 'Authorization' => '', ], ]); echo $response->getBody(); ``` ```csharp Custom groups var client = new RestClient("https://api.prolific.com/api/v1/filters/?filter_tag=custom-group"); var request = new RestRequest(Method.GET); request.AddHeader("Authorization", ""); IRestResponse response = client.Execute(request); ``` ```swift Custom groups import Foundation let headers = ["Authorization": ""] let request = NSMutableURLRequest(url: NSURL(string: "https://api.prolific.com/api/v1/filters/?filter_tag=custom-group")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ``` ```python List of Filters import requests url = "https://api.prolific.com/api/v1/filters/" headers = {"Authorization": ""} response = requests.get(url, headers=headers) print(response.json()) ``` ```javascript List of Filters const url = 'https://api.prolific.com/api/v1/filters/'; const options = {method: 'GET', headers: {Authorization: ''}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go List of Filters package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.prolific.com/api/v1/filters/" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby List of Filters require 'uri' require 'net/http' url = URI("https://api.prolific.com/api/v1/filters/") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["Authorization"] = '' response = http.request(request) puts response.read_body ``` ```java List of Filters HttpResponse response = Unirest.get("https://api.prolific.com/api/v1/filters/") .header("Authorization", "") .asString(); ``` ```php List of Filters request('GET', 'https://api.prolific.com/api/v1/filters/', [ 'headers' => [ 'Authorization' => '', ], ]); echo $response->getBody(); ``` ```csharp List of Filters var client = new RestClient("https://api.prolific.com/api/v1/filters/"); var request = new RestRequest(Method.GET); request.AddHeader("Authorization", ""); IRestResponse response = client.Execute(request); ``` ```swift List of Filters import Foundation let headers = ["Authorization": ""] let request = NSMutableURLRequest(url: NSURL(string: "https://api.prolific.com/api/v1/filters/")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ``` ```python List of Detailed Filters import requests url = "https://api.prolific.com/api/v1/filters/" headers = {"Authorization": ""} response = requests.get(url, headers=headers) print(response.json()) ``` ```javascript List of Detailed Filters const url = 'https://api.prolific.com/api/v1/filters/'; const options = {method: 'GET', headers: {Authorization: ''}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go List of Detailed Filters package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.prolific.com/api/v1/filters/" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby List of Detailed Filters require 'uri' require 'net/http' url = URI("https://api.prolific.com/api/v1/filters/") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["Authorization"] = '' response = http.request(request) puts response.read_body ``` ```java List of Detailed Filters HttpResponse response = Unirest.get("https://api.prolific.com/api/v1/filters/") .header("Authorization", "") .asString(); ``` ```php List of Detailed Filters request('GET', 'https://api.prolific.com/api/v1/filters/', [ 'headers' => [ 'Authorization' => '', ], ]); echo $response->getBody(); ``` ```csharp List of Detailed Filters var client = new RestClient("https://api.prolific.com/api/v1/filters/"); var request = new RestRequest(Method.GET); request.AddHeader("Authorization", ""); IRestResponse response = client.Execute(request); ``` ```swift List of Detailed Filters import Foundation let headers = ["Authorization": ""] let request = NSMutableURLRequest(url: NSURL(string: "https://api.prolific.com/api/v1/filters/")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```