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()
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
# 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
...
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.
GET
/
api
/
v1
/
projects
/
{domain}
/
export
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()
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
# 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
...
Time period. See Periods on Account API page. Defaults to 30d.
Response
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. |
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()
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
# 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
...
Was this page helpful?