Skip to main content

GET /api/pages

Returns the top 10 URLs ranked by pageview count for the given domain and optional date range. Only $pageview events are counted.
Results are hard-limited to 10 entries. There is no pagination parameter.

Query parameters

domain
string
required
The domain to query (e.g. example.com). Must match the d field sent in event payloads exactly.
from
string
Start of the date range, inclusive. ISO 8601 date string (YYYY-MM-DD). If omitted, results cover all time up to to.
to
string
End of the date range, inclusive. ISO 8601 date string (YYYY-MM-DD). If omitted, results cover all time from from.

Response

Returns a JSON array of page stat objects, ordered by pageviews descending.
url
string
The full URL of the page as recorded in the event payload.
pageviews
number
Number of $pageview events recorded for this URL in the requested window.
Response shape
[
  { "url": "https://example.com/",        "pageviews": 5210 },
  { "url": "https://example.com/pricing", "pageviews": 2140 },
  { "url": "https://example.com/blog",    "pageviews": 1380 }
]
StatusMeaning
200 OKQuery succeeded (empty array if no data)
400 Bad Requestdomain query parameter is missing
500 Internal Server ErrorDatabase query failed

Examples

curl "https://your-iris-host/api/pages?domain=example.com&from=2025-01-01&to=2025-01-31"

Build docs developers (and LLMs) love