---
title: "Get top pages by sessions or visitors, optionally restricted to entry or exit pages"
method: GET
path: "/v0/top_pages"
tags: ["Query"]
---

# Get top pages by sessions or visitors, optionally restricted to entry or exit pages

`GET /v0/top_pages`

## Request

- Base URL: `https://api.formo.so`
- URL: `https://api.formo.so/v0/top_pages`
- Auth: HTTP bearer

Returns the most visited pages with traffic metrics. Pass `mode=entry` to restrict to the first page of each session (with `bounce_rate`) or `mode=exit` for the last page (with `exit_rate`). Default `mode=all` returns project-wide page metrics with anon-per-session visitor counts.

## Query parameters

- `date_from` string, date
- `date_to` string, date
- `filters` string
- `page_scope` 'page' | 'session'
- `limit` integer
- `offset` integer
- `mode` 'all' | 'entry' | 'exit'

## Response `200`

Top pages

- AnalyticsResponse: Analytics endpoint response. The `data` array contains the rows; the exact row shape depends on the endpoint. `meta` carries column type information for rendering, `rows` is the row count, and `statistics` holds query timing metadata.
  - `data` object[]
  - `meta` object[]
    - `name` string
    - `type` string
  - `rows` integer
  - `rows_before_limit_at_least` integer
  - `statistics` object

## Other responses

- `401`: Invalid API key
- `403`: Insufficient permissions

---

[API](https://skmtc.dev/formo/apis/formo-public-api.md) · [All operations](https://skmtc.dev/formo/apis/formo-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/formo/apis/formo-public-api/revisions/67ada57df63c?raw)
