Get top pages

Read the Top Pages report: pages, entry pages or exit pages.

GET https://cotlet.dev/api/v1/plausible/top-pages

read

Returns the rows of the report tab you pick, most visited first, with visitors and pageviews per page path. Each row is a page path, not a full URL. The report has no filter by goal or source in this tool.

Parameters

Parameters: get_top_pages
NameTypeDescription
site string required string Domain of the site as the Sites page lists it, e.g. acme-shop.example.
view string string pages (default), entry_pages or exit_pages.
from string string First day of the date range, YYYY-MM-DD. Default: the last 30 days.
to string string Last day of the date range, YYYY-MM-DD. Default: today.
limit integer integer Rows to return, most visited first. Default 10.

Request

cURL
curl "https://cotlet.dev/api/v1/plausible/top-pages?site=site" \
  -H "Authorization: Bearer $COTLET_API_KEY"
Python
result = client.call("plausible", "get_top_pages", {"site":"site"})
Node.js
const result = await cotlet.call('plausible', 'get_top_pages', {"site":"site"});
CLI
cotlet call plausible get_top_pages --data '{"site":"site"}'

Example response

JSON

{
  "site": "acme-shop.example",
  "view": "pages",
  "rows": [
    {
      "page": "/pricing",
      "visitors": 1180,
      "pageviews": 1640
    },
    {
      "page": "/blog/launch-notes",
      "visitors": 902,
      "pageviews": 960
    },
    {
      "page": "/signup",
      "visitors": 455,
      "pageviews": 520
    }
  ]
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.