# Raw export

Download every event a site recorded on the days you pick, as CSV on Insight or Parquet on Foresight, with one API call.

A raw export holds every event a site recorded on the days you pick, one row per event. Owners, admins and editors download one under **Import and export** in the site's settings, and an API key gets the same file with one call. CSV comes with Insight and Foresight, and Parquet with Foresight.

`GET https://api.ultanimus.com/v1/sites/{id}/export`

`{id}` is the site ID, such as `ult_fxpitz4w7h`, or the site's domain. Every API key can export.

## Request

- `from` (string): The first day, such as `2026-10-01`, in the site's time zone.
- `to` (string): The last day, included. A range covers at most five years.
- `format` (string): `csv`, `parquet` or `zip`.

```bash
curl --compressed --fail -o events.csv \
  "https://api.ultanimus.com/v1/sites/YOUR_SITE_ID/export?from=2026-10-01&to=2026-10-31&format=csv" \
  -H "Authorization: Bearer $API_KEY"
```

The CLI does the same in one command, and keeps nothing when an export stops partway: `ultanimus export --from 2026-10-01 --to 2026-10-31`. See [Export events](/docs/cli#export-events).

`--compressed` lets the server send the CSV gzipped, about an eighth of its size. Parquet is already compressed. `--fail` keeps an error out of the file: without it, curl saves the error's JSON as `events.csv`.

## The file

The columns come in this order: `ts`, `name`, `visitor_id`, `session_id`, `platform`, `app_version`, `hostname`, `pathname`, `entry_page`, `referrer`, `source`, `channel`, `utm_source`, `utm_medium`, `utm_campaign`, `utm_content`, `utm_term`, `country`, `region`, `city`, `latitude`, `longitude`, `browser`, `browser_version`, `os`, `os_version`, `device`, `screen_width`, `language` and `props`.

- Rows come in time order. `ts` is UTC, to the millisecond, such as `2026-10-01 08:00:00.000`.
- `visitor_id` and `session_id` are the numbers the dashboard counts with. A visitor ID comes from a salt that changes every day, or from a hash of your own user ID when the site sends one. Neither is the user ID itself, which is never stored.
- `source`, `channel`, `entry_page` and the `utm_*` tags belong to the visit, so every event of a visit carries the same ones.
- `latitude` and `longitude` have one decimal, about 11 km, and are 0 when the location is unknown.
- `props` holds the event's properties. CSV writes them as one JSON object, such as `{"plan":"pro"}`, and Parquet keeps them as a map.
- Parquet files use zstd and row groups of 100,000 events.

On the 40,026 events of our test site, the CSV was 9.2 MB, 1.2 MB as sent compressed, and the Parquet file 0.5 MB.

## Daily totals

`format=zip` returns daily totals instead of events, on every plan. It is a ZIP of CSV files in Plausible's import layout, with one row per day for each page, source, location, device and event, and the days you imported counted in. [Import and export](/docs/dashboard/import#export-daily-totals) has the details.

## Limits

An organization runs one export at a time and at most 50 a day. An export that runs for an hour stops, so split a very large range into several. If an export fails partway, the connection closes before the end of the file. curl and browsers then report a failed download instead of keeping a file that stops partway.

| Status | Code | When |
|---|---|---|
| 403 | `ULT-1203` | The organization is on Glance, or asks for Parquet on Insight. |
| 422 | `ULT-1900` | A day or the format is missing or wrong. |
| 429 | `ULT-1340` | Another export of the organization is running, or the server is running all it can. `Retry-After` says when to try again. |
| 429 | `ULT-1902` | The organization has used its 50 exports for the day. |
| 504 | `ULT-9001` | The export hit a time or memory limit. Pick a shorter range. |

The organization's audit log records each export, with who ran it, the days and the format.
