---
title: Exporting your data
description: Export everything UsherStats holds for your sites, raw records and daily totals, from the dashboard or the API.
nav: Data export
---
# Exporting your data

Your data is yours. UsherStats keeps it for as long as your account exists and lets you take all of it out at any
time, on every plan.

## What you can export

- **Raw records**, as UsherStats keeps them:
  - **pageviews**: each confirmed pageview, with its page, source, country, device, scroll depth and time on page;
  - **events**: each event and goal, with its name, label and value, and A/B exposures;
  - **requests**: each request your server or proxy recorded, with the crawler or browser it came from and what bot
    protection decided.
- **Daily totals** behind the dashboards.
- **Settings**: sites, hostnames, goals, experiments and bot protection rules.

Raw records are newline-delimited JSON, compressed with gzip, one file per site, kind and hour: the same rows the
archive keeps, so an export is complete rather than a summary.

## How

- In the dashboard: **Settings → Export**, choose the sites and the date range.
- Through the API, with a token that has the `export:read` scope. The routes are in the API reference
  (`GET /v1/openapi.json`); see [API and tokens](api-and-tokens.md).

## Limits

- An export answers with download links that work for an hour, and only while whoever made the export can still
  export the site: removing a member, revoking a token or deleting the site ends its links.
- The exported files are kept for a day, then removed; export again for a fresh copy.
- A site can be exported 5 times an hour, and a workspace 20 times an hour.
- A date range of up to a month lists exactly its days of raw records; a longer one lists up to 20,000 files and says
  when it stopped short, so take a long history a range at a time.

## Deleting data

A site's data can be deleted, or given a retention period after which older records are removed, in the site's
settings. Closing your account deletes all of its sites' data. Export first if you want to keep a copy.
