GET List top website pages

Base URL: https://server-url-from-token-page.endpoint. Version: 1.2.0.

GET /api/v1/public/website/top-pages — List top website pages

Read-only operation

Ranks the most-visited pages for one account when accountId is supplied, or across the authenticated workspace when it is omitted. Select either a named duration or an explicit from/to range. When no window is supplied, a bounded default window is used.

This endpoint supports GET only and does not accept a request body. Authentication is accepted only through Authorization: Bearer <token>; the bearer token determines the workspace.

Unknown, nested, object-valued, or unexpectedly repeated scalar query parameters are rejected. Successful responses omit null-valued properties and null array entries.

GET URLs can appear in client and intermediary logs. Never place credentials or secrets in query parameters. Responses are marked Cache-Control: private, no-store.

Parameters

accountId (query, string, optional)

Optional account id. When supplied, ranks pages for that account. When omitted, ranks pages across the authenticated workspace.

  • Pattern: ^[a-fA-F0-9]{24}$
duration (query, TODAY | YESTERDAY | THIS_WEEK | LAST_WEEK | THIS_MONTH | LAST_MONTH | LAST_7_DAYS | LAST_30_DAYS | LAST_3_MONTHS | ALL_TIME, optional)

Named time window. Do not combine duration with from or to. When no duration or explicit range is supplied, the endpoint defaults to LAST_3_MONTHS. Allowed values: TODAY, YESTERDAY, THIS_WEEK, LAST_WEEK, THIS_MONTH, LAST_MONTH, LAST_7_DAYS, LAST_30_DAYS, LAST_3_MONTHS, ALL_TIME.

  • Default: "LAST_3_MONTHS"
from (query, string:date-time, optional)

Inclusive explicit range start in RFC 3339 date-time form. Do not combine with duration.

to (query, string:date-time, optional)

Optional exclusive range end in RFC 3339 date-time form. An event exactly at to is excluded. Requires from and must be later than from.

take (query, integer, optional)

Maximum rows returned in this page. Integer from 1 through 50. Defaults to 10.

  • Default: 10
  • Minimum: 1
  • Maximum: 50
skip (query, integer, optional)

Number of matching rows skipped before this page. Integer from 0 through 1000. Defaults to 0.

  • Default: 0
  • Minimum: 0
  • Maximum: 1000
X-Request-Id (header, string, optional)

Optional caller correlation id. The server generates one when omitted and always returns the resolved value.

X-Trace-Id (header, string, optional)

Optional distributed trace id for cross-system request correlation.

X-Client-Name (header, string, optional)

Optional caller-defined client label for request diagnostics.

JSON response schema
{
  "$ref": "#/components/schemas/PublicWebsiteTopPagesResponse",
  "components": {
    "schemas": {
      "PublicWebsiteTopPagesResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicWebsiteTopPage"
            }
          },
          "metadata": {
            "type": "object",
            "properties": {
              "count": {
                "type": "integer",
                "minimum": 0
              },
              "timezone": {
                "type": "string"
              },
              "duration": {
                "type": "string"
              },
              "dateRange": {
                "type": "object",
                "properties": {
                  "from": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "to": {
                    "type": "string",
                    "format": "date-time"
                  }
                },
                "required": [
                  "from"
                ],
                "additionalProperties": false
              },
              "sampled": {
                "type": "boolean"
              },
              "sampleReason": {
                "type": "string"
              },
              "visitScanLimit": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "count",
              "timezone",
              "duration"
            ],
            "additionalProperties": false
          },
          "pagination": {
            "$ref": "#/components/schemas/PublicEndpointPagination"
          }
        },
        "required": [
          "data",
          "metadata",
          "pagination"
        ],
        "additionalProperties": false
      },
      "PublicWebsiteTopPage": {
        "type": "object",
        "properties": {
          "pageKey": {
            "type": "string"
          },
          "pagePath": {
            "type": "string"
          },
          "pageTitle": {
            "type": "string"
          },
          "pageUrl": {
            "type": "string"
          },
          "pageViews": {
            "type": "integer",
            "minimum": 0
          },
          "sessions": {
            "type": "integer",
            "minimum": 0
          },
          "totalTimeOnPage": {
            "type": "number",
            "format": "double"
          },
          "avgTimeOnPage": {
            "type": "number",
            "format": "double"
          },
          "totalVisitLength": {
            "type": "number",
            "format": "double"
          },
          "avgVisitLength": {
            "type": "number",
            "format": "double"
          },
          "firstSeenAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastSeenAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "pageKey",
          "pageViews",
          "sessions",
          "totalTimeOnPage",
          "avgTimeOnPage",
          "totalVisitLength",
          "avgVisitLength"
        ],
        "additionalProperties": false
      },
      "PublicEndpointPagination": {
        "type": "object",
        "properties": {
          "skip": {
            "type": "integer",
            "minimum": 0
          },
          "take": {
            "type": "integer",
            "minimum": 1
          },
          "returned": {
            "type": "integer",
            "minimum": 0
          },
          "hasMore": {
            "type": "boolean"
          },
          "nextSkip": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "skip",
          "take",
          "returned",
          "hasMore"
        ],
        "additionalProperties": false,
        "description": "Offset pagination for the current page."
      }
    }
  }
}

Responses

200: Successful response. Repeated entity context is returned through reference maps where applicable.
X-Request-Id (header, string, optional)

Request correlation id supplied by the caller or generated by the server.

Cache-Control (header, private, no-store, optional)

Prevents browsers and shared intermediaries from storing authenticated report data.

RateLimit-Policy (header, value, optional)

Response header

RateLimit-Limit (header, value, optional)

Response header

RateLimit-Remaining (header, value, optional)

Response header

RateLimit-Reset (header, value, optional)

Response header

200 response example
{
  "data": [
    {
      "pageKey": "/pricing",
      "pagePath": "/pricing",
      "pageViews": 10,
      "sessions": 7,
      "totalTimeOnPage": 800,
      "avgTimeOnPage": 80,
      "totalVisitLength": 900,
      "avgVisitLength": 90
    }
  ],
  "metadata": {
    "count": 1,
    "timezone": "Europe/Stockholm",
    "duration": "LAST_30_DAYS"
  },
  "pagination": {
    "skip": 0,
    "take": 10,
    "returned": 1,
    "hasMore": false
  }
}
400: Invalid website input.
X-Request-Id (header, string, optional)

Request correlation id supplied by the caller or generated by the server.

Cache-Control (header, private, no-store, optional)

Prevents browsers and shared intermediaries from storing authenticated report data.

400 response schema
{
  "$ref": "#/components/schemas/ErrorResponse",
  "components": {
    "schemas": {
      "ErrorResponse": {
        "type": "object",
        "required": [
          "message",
          "code"
        ],
        "properties": {
          "message": {
            "type": "string"
          },
          "code": {
            "type": "string"
          }
        },
        "additionalProperties": false
      }
    }
  }
}
400 response example
{
  "message": "The website request is invalid.",
  "code": "INVALID_RESOURCE_REQUEST"
}
401: Missing, invalid, expired, or unauthorized credential.
X-Request-Id (header, string, optional)

Request correlation id supplied by the caller or generated by the server.

Cache-Control (header, private, no-store, optional)

Prevents browsers and shared intermediaries from storing authenticated report data.

401 response schema
{
  "$ref": "#/components/schemas/ErrorResponse",
  "components": {
    "schemas": {
      "ErrorResponse": {
        "type": "object",
        "required": [
          "message",
          "code"
        ],
        "properties": {
          "message": {
            "type": "string"
          },
          "code": {
            "type": "string"
          }
        },
        "additionalProperties": false
      }
    }
  }
}
401 response example
{
  "message": "Unauthorized request",
  "code": "UNAUTHENTICATED"
}
403: Authenticated workspace scope mismatch.
X-Request-Id (header, string, optional)

Request correlation id supplied by the caller or generated by the server.

Cache-Control (header, private, no-store, optional)

Prevents browsers and shared intermediaries from storing authenticated report data.

403 response schema
{
  "$ref": "#/components/schemas/ErrorResponse",
  "components": {
    "schemas": {
      "ErrorResponse": {
        "type": "object",
        "required": [
          "message",
          "code"
        ],
        "properties": {
          "message": {
            "type": "string"
          },
          "code": {
            "type": "string"
          }
        },
        "additionalProperties": false
      }
    }
  }
}
403 response example
{
  "message": "The authenticated credential is not authorized for this resource.",
  "code": "SPACE_SCOPE_MISMATCH"
}
405: Only GET is supported for this endpoint.
X-Request-Id (header, string, optional)

Request correlation id supplied by the caller or generated by the server.

Cache-Control (header, private, no-store, optional)

Prevents browsers and shared intermediaries from storing authenticated report data.

405 response schema
{
  "$ref": "#/components/schemas/ErrorResponse",
  "components": {
    "schemas": {
      "ErrorResponse": {
        "type": "object",
        "required": [
          "message",
          "code"
        ],
        "properties": {
          "message": {
            "type": "string"
          },
          "code": {
            "type": "string"
          }
        },
        "additionalProperties": false
      }
    }
  }
}
405 response example
{
  "message": "Method not allowed",
  "code": "METHOD_NOT_ALLOWED"
}
429: Rate limit exceeded.
Retry-After (header, integer, optional)

Seconds to wait before retrying.

X-Request-Id (header, string, optional)

Request correlation id supplied by the caller or generated by the server.

Cache-Control (header, private, no-store, optional)

Prevents browsers and shared intermediaries from storing authenticated report data.

RateLimit-Policy (header, value, optional)

Response header

RateLimit-Limit (header, value, optional)

Response header

RateLimit-Remaining (header, value, optional)

Response header

RateLimit-Reset (header, value, optional)

Response header

429 response schema
{
  "$ref": "#/components/schemas/ErrorResponse",
  "components": {
    "schemas": {
      "ErrorResponse": {
        "type": "object",
        "required": [
          "message",
          "code"
        ],
        "properties": {
          "message": {
            "type": "string"
          },
          "code": {
            "type": "string"
          }
        },
        "additionalProperties": false
      }
    }
  }
}
429 response example
{
  "message": "Too many requests. Please try later.",
  "code": "RATE_LIMIT_EXCEEDED"
}
500: Unexpected server failure.
X-Request-Id (header, string, optional)

Request correlation id supplied by the caller or generated by the server.

Cache-Control (header, private, no-store, optional)

Prevents browsers and shared intermediaries from storing authenticated report data.

500 response schema
{
  "$ref": "#/components/schemas/ErrorResponse",
  "components": {
    "schemas": {
      "ErrorResponse": {
        "type": "object",
        "required": [
          "message",
          "code"
        ],
        "properties": {
          "message": {
            "type": "string"
          },
          "code": {
            "type": "string"
          }
        },
        "additionalProperties": false
      }
    }
  }
}
500 response example
{
  "message": "Internal server error",
  "code": "INTERNAL_SERVER_ERROR"
}
503: The Public API is temporarily unavailable.
X-Request-Id (header, string, optional)

Request correlation id supplied by the caller or generated by the server.

Cache-Control (header, private, no-store, optional)

Prevents browsers and shared intermediaries from storing authenticated report data.

503 response schema
{
  "$ref": "#/components/schemas/ErrorResponse",
  "components": {
    "schemas": {
      "ErrorResponse": {
        "type": "object",
        "required": [
          "message",
          "code"
        ],
        "properties": {
          "message": {
            "type": "string"
          },
          "code": {
            "type": "string"
          }
        },
        "additionalProperties": false
      }
    }
  }
}
503 response example
{
  "message": "Service unavailable",
  "code": "PUBLIC_RESOURCE_UNAVAILABLE"
}
504: The request exceeded the time limit.
X-Request-Id (header, string, optional)

Request correlation id supplied by the caller or generated by the server.

Cache-Control (header, private, no-store, optional)

Prevents browsers and shared intermediaries from storing authenticated report data.

504 response schema
{
  "$ref": "#/components/schemas/ErrorResponse",
  "components": {
    "schemas": {
      "ErrorResponse": {
        "type": "object",
        "required": [
          "message",
          "code"
        ],
        "properties": {
          "message": {
            "type": "string"
          },
          "code": {
            "type": "string"
          }
        },
        "additionalProperties": false
      }
    }
  }
}
504 response example
{
  "message": "The resource request timed out.",
  "code": "PUBLIC_RESOURCE_TIMEOUT"
}

List top website pages

curl "https://server-url-from-token-page.endpoint/api/v1/public/website/top-pages?accountId=507f1f77bcf86cd799439011&duration=LAST_30_DAYS&take=10&skip=0" \
  -H "Authorization: Bearer $DOE_API_TOKEN" \
  -H "Accept: application/json" \
  -H "X-Request-Id: postman-{{$guid}}" \
  -H "X-Client-Name: postman-public-api"
Response example
{
  "data": [
    {
      "pageKey": "/pricing",
      "pagePath": "/pricing",
      "pageViews": 10,
      "sessions": 7,
      "totalTimeOnPage": 800,
      "avgTimeOnPage": 80,
      "totalVisitLength": 900,
      "avgVisitLength": 90
    }
  ],
  "metadata": {
    "count": 1,
    "timezone": "Europe/Stockholm",
    "duration": "LAST_30_DAYS"
  },
  "pagination": {
    "skip": 0,
    "take": 10,
    "returned": 1,
    "hasMore": false
  }
}