const res = await fetch("https://api.openrevenue.com/api/v1/projects/example.com/pages?period=7d&limit=5", {
headers: { Authorization: `Bearer ${OPENREVENUE_API_KEY}` },
})
const pages = await res.json()
curl "https://api.openrevenue.com/api/v1/projects/example.com/pages?period=7d&limit=5" \
-H "Authorization: Bearer openrevenue_your_key"
{
"period": "7d",
"data": [
{ "path": "/", "pageviews": 80, "visitors": 25 },
{ "path": "/contact/", "pageviews": 14, "visitors": 6 },
{ "path": "/work-folio/", "pageviews": 8, "visitors": 5 }
]
}
Pages
Returns the top pages for the project ranked by pageviews, along with unique visitor counts per page.
GET
/
api
/
v1
/
projects
/
{domain}
/
pages
const res = await fetch("https://api.openrevenue.com/api/v1/projects/example.com/pages?period=7d&limit=5", {
headers: { Authorization: `Bearer ${OPENREVENUE_API_KEY}` },
})
const pages = await res.json()
curl "https://api.openrevenue.com/api/v1/projects/example.com/pages?period=7d&limit=5" \
-H "Authorization: Bearer openrevenue_your_key"
{
"period": "7d",
"data": [
{ "path": "/", "pageviews": 80, "visitors": 25 },
{ "path": "/contact/", "pageviews": 14, "visitors": 6 },
{ "path": "/work-folio/", "pageviews": 8, "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/pages?period=7d&limit=5", {
headers: { Authorization: `Bearer ${OPENREVENUE_API_KEY}` },
})
const pages = await res.json()
curl "https://api.openrevenue.com/api/v1/projects/example.com/pages?period=7d&limit=5" \
-H "Authorization: Bearer openrevenue_your_key"
{
"period": "7d",
"data": [
{ "path": "/", "pageviews": 80, "visitors": 25 },
{ "path": "/contact/", "pageviews": 14, "visitors": 6 },
{ "path": "/work-folio/", "pageviews": 8, "visitors": 5 }
]
}
Was this page helpful?