> ## Documentation Index
> Fetch the complete documentation index at: https://www.openrevenue.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Export CSV

> Downloads analytics as a CSV file (Content-Type: text/csv). Sections include overview, pages, referrers, countries, browsers, and operating systems. Works with an API key.

**domain** `string` *required*

Your project's domain, e.g. `example.com`.

**period** `string`

Time period. See Periods on [Account API](https://www.openrevenue.com/docs/api/account-api.md#periods) page. Defaults to 30d.

**limit** `integer`

Max rows per section. Maximum 500, default 100.

## Response

**Content-Type** `text/csv`

Response body is CSV, not JSON.

**Content-Disposition** `string`

`attachment; filename="openrevenue-{domain}-{period}.csv"`.

## Errors

| Status | Error | Description |
| - | - | - |
| `401` | `Invalid or missing API key` | The Authorization header is missing or the Bearer token is invalid. |
| `404` | `Project not found` | No project with that domain exists for the authenticated user. |
| `429` | `Too many requests` | Rate limit exceeded. |

```javascript JavaScript theme={"theme":{"light":"one-light","dark":"one-dark-pro"}}
const res = await fetch("https://api.openrevenue.com/api/v1/projects/example.com/export?period=30d", {
  headers: { Authorization: `Bearer ${OPENREVENUE_API_KEY}` },
})

const csv = await res.text()
```

```bash cURL theme={"theme":{"light":"one-light","dark":"one-dark-pro"}}
curl "https://api.openrevenue.com/api/v1/projects/example.com/export?period=30d" \
  -H "Authorization: Bearer openrevenue_your_key" \
  -o openrevenue-example.com-30d.csv
```

```csv 200 theme={"theme":{"light":"one-light","dark":"one-dark-pro"}}
# OpenRevenue export — example.com — period 30d
# Generated 2026-05-25T10:00:00.000Z

# Overview
metric,value
visitors,35
pageviews,130
sessions,48
avg_duration_seconds,94

# Pages
path,pageviews,visitors
/,80,25
...
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.