---
title: "Export demographic data"
method: POST
path: "/api/v1/studies/{id}/demographic-export/"
tags: ["studies"]
---

# Export demographic data

`POST /api/v1/studies/{id}/demographic-export/`

Create and download a demographic export for a study. This endpoint allows you to export participant demographic data with optional study filter data.

**Filter Support**: This endpoint supports applying demographic filters to export data for participants who match specific criteria.

When filters are provided, the export includes both base demographic data (age, sex, country, etc.) and the filters.

When no filters are provided, the export includes only base demographic data for all participants who took the study, excluding any study-specific filter responses.

**Export Usage**: Please note that you may only select up to 15 filters per export. You are also limited to 2 different filter export requests.

You may download the same request as many times as you need. To check your current usage and see your latest export history, use the [Demographic Export History](https://docs.prolific.com/docs/api-docs/public/#tag/Studies/operation/GetDemographicExportHistory) endpoint.

**Basic Data Included**: The export includes the following data fields:
* Submission ID
* Participant ID
* Submission status
* Started date-time
  * Expressed in UTC
  * ISO 8601 formatted
* Completed date-time
  * Expressed in UTC
  * ISO 8601 formatted
* Time taken (in seconds)
* Age
* Sex
  * Participants were asked the following question: What is your sex, as recorded on legal/official documents?
* Ethnicity (simplified)
* First language
* Current country of residence
* Nationality
* Country of birth
* Student status
* Employment status
* Reviewed at date-time
  * Expressed in UTC
  * ISO 8601 formatted
* Completion code ('entered code')
* Total approvals

Learn more on [Exporting Prolific demographic data](https://researcher-help.prolific.com/en/article/b2943f).

## Path parameters

- `id` string, required

## Headers

- `Authorization` string, required

## Request body

- DemographicExportRequest
  - `filters` DemographicExportRequestFiltersItems[] — List of filters to apply to the demographic export. When filters are provided, the export includes both base demographic data and responses to the specified filters which were applied to the study. When empty, only base demographic data (age, sex, country, etc.) for all participants who took the study is exported, excluding study-specific filter responses.
    - 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

## Response `200`

Demographic data exported successfully

- object

## 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/5c53371c41a0/schema)
