const res = await fetch("https://api.openrevenue.com/api/v1/projects/example.com/timeseries?period=7d", {
headers: { Authorization: `Bearer ${OPENREVENUE_API_KEY}` },
})
const timeseries = await res.json()
curl "https://api.openrevenue.com/api/v1/projects/example.com/timeseries?period=7d" \
-H "Authorization: Bearer openrevenue_your_key"
{
"period": "7d",
"granularity": "day",
"data": [
{ "date": "2026-05-19T00:00:00.000Z", "pageviews": 18, "visitors": 7 },
{ "date": "2026-05-20T00:00:00.000Z", "pageviews": 22, "visitors": 9 },
{ "date": "2026-05-21T00:00:00.000Z", "pageviews": 15, "visitors": 5 }
]
}
Timeseries
Returns pageviews and unique visitors bucketed over time. Granularity is hourly for the 24h period and daily for all others.
GET
/
api
/
v1
/
projects
/
{domain}
/
timeseries
const res = await fetch("https://api.openrevenue.com/api/v1/projects/example.com/timeseries?period=7d", {
headers: { Authorization: `Bearer ${OPENREVENUE_API_KEY}` },
})
const timeseries = await res.json()
curl "https://api.openrevenue.com/api/v1/projects/example.com/timeseries?period=7d" \
-H "Authorization: Bearer openrevenue_your_key"
{
"period": "7d",
"granularity": "day",
"data": [
{ "date": "2026-05-19T00:00:00.000Z", "pageviews": 18, "visitors": 7 },
{ "date": "2026-05-20T00:00:00.000Z", "pageviews": 22, "visitors": 9 },
{ "date": "2026-05-21T00:00:00.000Z", "pageviews": 15, "visitors": 5 }
]
}
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. |
const res = await fetch("https://api.openrevenue.com/api/v1/projects/example.com/timeseries?period=7d", {
headers: { Authorization: `Bearer ${OPENREVENUE_API_KEY}` },
})
const timeseries = await res.json()
curl "https://api.openrevenue.com/api/v1/projects/example.com/timeseries?period=7d" \
-H "Authorization: Bearer openrevenue_your_key"
{
"period": "7d",
"granularity": "day",
"data": [
{ "date": "2026-05-19T00:00:00.000Z", "pageviews": 18, "visitors": 7 },
{ "date": "2026-05-20T00:00:00.000Z", "pageviews": 22, "visitors": 9 },
{ "date": "2026-05-21T00:00:00.000Z", "pageviews": 15, "visitors": 5 }
]
}
Was this page helpful?