---
title: "Get analytics comparison"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.sureshake.com/llms.txt
> Use this file to discover all available pages before exploring further.

Path: Sureshake API › reports

`GET /v2/reports/analytics/comparison`

## Query parameters

- `period` (`report-get-analytics-comparison.query.period`; string, optional)
  - one of `"day"`, `"week"`, `"month"`; default `"month"`
- `limit` (`report-get-analytics-comparison.query.limit`; integer, optional)
  - min 1; max 50; default `20`
- `cursor` (`report-get-analytics-comparison.query.cursor`; string, optional)
  - minLength 42; maxLength 2048; pattern `^[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+$`
- `sortBy` (`report-get-analytics-comparison.query.sortBy`; string, optional)
  - one of `"total_views"`, `"unique_viewers"`, `"anonymous_views"`, `"title"`; default `"total_views"`
- `sortDirection` (`report-get-analytics-comparison.query.sortDirection`; string, optional)
  - one of `"asc"`, `"desc"`; default `"desc"`
- `query` (`report-get-analytics-comparison.query.query`; string, optional)
  - minLength 1; maxLength 100

## Code samples

### cURL

```bash
curl --request GET \
  --url https://api.sureshake.com/v2/reports/analytics/comparison
```

### TypeScript

```typescript
const url = 'https://api.sureshake.com/v2/reports/analytics/comparison';
const options = {method: 'GET'};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.sureshake.com/v2/reports/analytics/comparison"

response = requests.get(url)

print(response.text)
```

## Responses

### 200

Default Response

#### Example

```json
{
  "data": {
    "status": "available",
    "readAt": "2019-08-24T14:15:22Z",
    "scope": {
      "ownerUserId": "string",
      "authorization": "report_owner_only",
      "period": {
        "key": "day",
        "startAt": "2019-08-24T14:15:22Z",
        "endAt": "2019-08-24T14:15:22Z",
        "timezone": "UTC",
        "interval": "half_open",
        "asOf": "2019-08-24T14:15:22Z",
        "coverage": "event_window",
        "comparison": {
          "startAt": "2019-08-24T14:15:22Z",
          "endAt": "2019-08-24T14:15:22Z",
          "relationship": "immediately_preceding_equal_duration"
        }
      },
      "source": {
        "key": "directory_listing_views",
        "classification": "canonical",
        "recordAuthorities": [
          "directory.profile_viewed",
          "directory.result_clicked"
        ],
        "readAuthorities": [
          "directory_engagement_daily",
          "directory_engagement_viewers"
        ],
        "projectionAuthority": {
          "ordering": "events.stream_version",
          "receipts": "projection_event_receipts",
          "checkpoint": "projection_scoped_checkpoints",
          "lifecycle": "projection_lifecycles"
        },
        "countingPolicy": "eligible_event",
        "countingEnforcement": "partial",
        "viewerHistory": {
          "availability": "unavailable",
          "timeAuthority": "first_viewed_at_only",
          "blocker": "last_view_watermark_required"
        },
        "policyVersion": "directory-engagement-v1"
      }
    },
    "rows": [
      {
        "report": {
          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          "title": "string"
        },
        "totalViews": 0,
        "uniqueViewers": 0,
        "anonymousViews": 0,
        "viewsBySource": {
          "share": 0,
          "vault": 0,
          "direct": 0,
          "api": 0,
          "unknown": 0
        }
      }
    ],
    "pagination": {
      "limit": 1,
      "hasMore": true,
      "nextCursor": "stringstringstringstringstringstringstring"
    }
  },
  "meta": {
    "timestamp": "2019-08-24T14:15:22Z"
  }
}
```

- `data` (`report-get-analytics-comparison.response.200.data`; object, required)
  - `status` (`report-get-analytics-comparison.response.200.data.status`; string, required)
    - one of `"available"`
  - `readAt` (`report-get-analytics-comparison.response.200.data.readAt`; string, required)
    - format `date-time`
  - `scope` (`report-get-analytics-comparison.response.200.data.scope`; object, required)
    - `ownerUserId` (`report-get-analytics-comparison.response.200.data.scope.ownerUserId`; string, required)
      - minLength 1; maxLength 256
    - `authorization` (`report-get-analytics-comparison.response.200.data.scope.authorization`; string, required)
      - one of `"report_owner_only"`
    - `period` (`report-get-analytics-comparison.response.200.data.scope.period`; object, required)
      - `key` (`report-get-analytics-comparison.response.200.data.scope.period.key`; string, required)
        - one of `"day"`, `"week"`, `"month"`, `"custom"`
      - `startAt` (`report-get-analytics-comparison.response.200.data.scope.period.startAt`; string, required)
        - format `date-time`
      - `endAt` (`report-get-analytics-comparison.response.200.data.scope.period.endAt`; string, required)
        - format `date-time`
      - `timezone` (`report-get-analytics-comparison.response.200.data.scope.period.timezone`; string, required)
        - one of `"UTC"`
      - `interval` (`report-get-analytics-comparison.response.200.data.scope.period.interval`; string, required)
        - one of `"half_open"`
      - `asOf` (`report-get-analytics-comparison.response.200.data.scope.period.asOf`; string, required)
        - format `date-time`
      - `coverage` (`report-get-analytics-comparison.response.200.data.scope.period.coverage`; string, required)
        - one of `"event_window"`, `"snapshot"`, `"projection"`
      - `comparison` (`report-get-analytics-comparison.response.200.data.scope.period.comparison`; object, required)
        - `startAt` (`report-get-analytics-comparison.response.200.data.scope.period.comparison.startAt`; string, required)
          - format `date-time`
        - `endAt` (`report-get-analytics-comparison.response.200.data.scope.period.comparison.endAt`; string, required)
          - format `date-time`
        - `relationship` (`report-get-analytics-comparison.response.200.data.scope.period.comparison.relationship`; string, required)
          - one of `"immediately_preceding_equal_duration"`
    - `source` (`report-get-analytics-comparison.response.200.data.scope.source`; any of, required)
      - any of:
        - `object`
          - `key` (`report-get-analytics-comparison.response.200.data.scope.source.1.key`; string, required)
            - one of `"directory_listing_views"`
          - `classification` (`report-get-analytics-comparison.response.200.data.scope.source.1.classification`; string, required)
            - one of `"canonical"`
          - `recordAuthorities` (`report-get-analytics-comparison.response.200.data.scope.source.1.recordAuthorities`; array<unknown>, required)
          - `readAuthorities` (`report-get-analytics-comparison.response.200.data.scope.source.1.readAuthorities`; array<unknown>, required)
          - `projectionAuthority` (`report-get-analytics-comparison.response.200.data.scope.source.1.projectionAuthority`; object, required)
            - `ordering` (`report-get-analytics-comparison.response.200.data.scope.source.1.projectionAuthority.ordering`; string, required)
              - one of `"events.stream_version"`
            - `receipts` (`report-get-analytics-comparison.response.200.data.scope.source.1.projectionAuthority.receipts`; string, required)
              - one of `"projection_event_receipts"`
            - `checkpoint` (`report-get-analytics-comparison.response.200.data.scope.source.1.projectionAuthority.checkpoint`; string, required)
              - one of `"projection_scoped_checkpoints"`
            - `lifecycle` (`report-get-analytics-comparison.response.200.data.scope.source.1.projectionAuthority.lifecycle`; string, required)
              - one of `"projection_lifecycles"`
          - `countingPolicy` (`report-get-analytics-comparison.response.200.data.scope.source.1.countingPolicy`; string, required)
            - one of `"eligible_event"`
          - `countingEnforcement` (`report-get-analytics-comparison.response.200.data.scope.source.1.countingEnforcement`; string, required)
            - one of `"partial"`
          - `viewerHistory` (`report-get-analytics-comparison.response.200.data.scope.source.1.viewerHistory`; object, required)
            - `availability` (`report-get-analytics-comparison.response.200.data.scope.source.1.viewerHistory.availability`; string, required)
              - one of `"unavailable"`
            - `timeAuthority` (`report-get-analytics-comparison.response.200.data.scope.source.1.viewerHistory.timeAuthority`; string, required)
              - one of `"first_viewed_at_only"`
            - `blocker` (`report-get-analytics-comparison.response.200.data.scope.source.1.viewerHistory.blocker`; string, required)
              - one of `"last_view_watermark_required"`
          - `policyVersion` (`report-get-analytics-comparison.response.200.data.scope.source.1.policyVersion`; string, required)
            - one of `"directory-engagement-v1"`
        - `object`
          - `key` (`report-get-analytics-comparison.response.200.data.scope.source.2.key`; string, required)
            - one of `"compatibility_profile_views"`
          - `classification` (`report-get-analytics-comparison.response.200.data.scope.source.2.classification`; string, required)
            - one of `"compatibility"`
          - `recordAuthority` (`report-get-analytics-comparison.response.200.data.scope.source.2.recordAuthority`; string, required)
            - one of `"profile_views"`
          - `readAuthorities` (`report-get-analytics-comparison.response.200.data.scope.source.2.readAuthorities`; array<unknown>, required)
          - `countingPolicy` (`report-get-analytics-comparison.response.200.data.scope.source.2.countingPolicy`; string, required)
            - one of `"deduplicated_24_hours"`
          - `countingEnforcement` (`report-get-analytics-comparison.response.200.data.scope.source.2.countingEnforcement`; string, required)
            - one of `"enforced"`
          - `viewerHistory` (`report-get-analytics-comparison.response.200.data.scope.source.2.viewerHistory`; object, required)
            - `availability` (`report-get-analytics-comparison.response.200.data.scope.source.2.viewerHistory.availability`; string, required)
              - one of `"available"`
            - `timeAuthority` (`report-get-analytics-comparison.response.200.data.scope.source.2.viewerHistory.timeAuthority`; string, required)
              - one of `"latest_viewed_at"`
          - `policyVersion` (`report-get-analytics-comparison.response.200.data.scope.source.2.policyVersion`; string, required)
            - one of `"profile-views-v1"`
        - `object`
          - `key` (`report-get-analytics-comparison.response.200.data.scope.source.3.key`; string, required)
            - one of `"compatibility_entity_views"`
          - `classification` (`report-get-analytics-comparison.response.200.data.scope.source.3.classification`; string, required)
            - one of `"compatibility"`
          - `recordAuthority` (`report-get-analytics-comparison.response.200.data.scope.source.3.recordAuthority`; string, required)
            - one of `"entity_views"`
          - `readAuthorities` (`report-get-analytics-comparison.response.200.data.scope.source.3.readAuthorities`; array<unknown>, required)
          - `countingPolicy` (`report-get-analytics-comparison.response.200.data.scope.source.3.countingPolicy`; string, required)
            - one of `"compatibility_source_owned"`
          - `countingEnforcement` (`report-get-analytics-comparison.response.200.data.scope.source.3.countingEnforcement`; string, required)
            - one of `"partial"`
          - `viewerHistory` (`report-get-analytics-comparison.response.200.data.scope.source.3.viewerHistory`; object, required)
            - `availability` (`report-get-analytics-comparison.response.200.data.scope.source.3.viewerHistory.availability`; string, required)
              - one of `"available"`
            - `timeAuthority` (`report-get-analytics-comparison.response.200.data.scope.source.3.viewerHistory.timeAuthority`; string, required)
              - one of `"latest_viewed_at"`
          - `policyVersion` (`report-get-analytics-comparison.response.200.data.scope.source.3.policyVersion`; string, required)
            - one of `"entity-views-v1"`
        - `object`
          - `key` (`report-get-analytics-comparison.response.200.data.scope.source.4.key`; string, required)
            - one of `"report_views"`
          - `classification` (`report-get-analytics-comparison.response.200.data.scope.source.4.classification`; string, required)
            - one of `"canonical"`
          - `recordAuthority` (`report-get-analytics-comparison.response.200.data.scope.source.4.recordAuthority`; string, required)
            - one of `"document_views"`
          - `readAuthorities` (`report-get-analytics-comparison.response.200.data.scope.source.4.readAuthorities`; array<unknown>, required)
          - `countingPolicy` (`report-get-analytics-comparison.response.200.data.scope.source.4.countingPolicy`; string, required)
            - one of `"idempotent_document_view"`
          - `countingEnforcement` (`report-get-analytics-comparison.response.200.data.scope.source.4.countingEnforcement`; string, required)
            - one of `"enforced"`
          - `viewerHistory` (`report-get-analytics-comparison.response.200.data.scope.source.4.viewerHistory`; object, required)
            - `availability` (`report-get-analytics-comparison.response.200.data.scope.source.4.viewerHistory.availability`; string, required)
              - one of `"available"`
            - `timeAuthority` (`report-get-analytics-comparison.response.200.data.scope.source.4.viewerHistory.timeAuthority`; string, required)
              - one of `"latest_viewed_at"`
            - `attributionAuthority` (`report-get-analytics-comparison.response.200.data.scope.source.4.viewerHistory.attributionAuthority`; string, required)
              - one of `"report_view_delivery_receipts.private_attribution"`
          - `idempotencyEnforcement` (`report-get-analytics-comparison.response.200.data.scope.source.4.idempotencyEnforcement`; object, required)
            - `share` (`report-get-analytics-comparison.response.200.data.scope.source.4.idempotencyEnforcement.share`; string, required)
              - one of `"enforced"`
            - `direct` (`report-get-analytics-comparison.response.200.data.scope.source.4.idempotencyEnforcement.direct`; string, required)
              - one of `"enforced"`
            - `vaultOrCollection` (`report-get-analytics-comparison.response.200.data.scope.source.4.idempotencyEnforcement.vaultOrCollection`; string, required)
              - one of `"enforced"`
            - `api` (`report-get-analytics-comparison.response.200.data.scope.source.4.idempotencyEnforcement.api`; string, required)
              - one of `"enforced"`
          - `policyVersion` (`report-get-analytics-comparison.response.200.data.scope.source.4.policyVersion`; string, required)
            - one of `"report-views-v1"`
  - `rows` (`report-get-analytics-comparison.response.200.data.rows`; array<object>, required)
    - `report` (`report-get-analytics-comparison.response.200.data.rows.report`; object, required)
      - `id` (`report-get-analytics-comparison.response.200.data.rows.report.id`; string, required)
        - format `uuid`
      - `title` (`report-get-analytics-comparison.response.200.data.rows.report.title`; string, required)
    - `totalViews` (`report-get-analytics-comparison.response.200.data.rows.totalViews`; integer, required)
      - min 0
    - `uniqueViewers` (`report-get-analytics-comparison.response.200.data.rows.uniqueViewers`; integer, required)
      - min 0
    - `anonymousViews` (`report-get-analytics-comparison.response.200.data.rows.anonymousViews`; integer, required)
      - min 0
    - `viewsBySource` (`report-get-analytics-comparison.response.200.data.rows.viewsBySource`; object, required)
      - `share` (`report-get-analytics-comparison.response.200.data.rows.viewsBySource.share`; integer, required)
        - min 0
      - `vault` (`report-get-analytics-comparison.response.200.data.rows.viewsBySource.vault`; integer, required)
        - min 0
      - `direct` (`report-get-analytics-comparison.response.200.data.rows.viewsBySource.direct`; integer, required)
        - min 0
      - `api` (`report-get-analytics-comparison.response.200.data.rows.viewsBySource.api`; integer, required)
        - min 0
      - `unknown` (`report-get-analytics-comparison.response.200.data.rows.viewsBySource.unknown`; integer, required)
        - min 0
  - `pagination` (`report-get-analytics-comparison.response.200.data.pagination`; object, required)
    - `limit` (`report-get-analytics-comparison.response.200.data.pagination.limit`; integer, required)
      - min 1; max 50
    - `hasMore` (`report-get-analytics-comparison.response.200.data.pagination.hasMore`; boolean, required)
    - `nextCursor` (`report-get-analytics-comparison.response.200.data.pagination.nextCursor`; string, required, nullable)
      - minLength 42; maxLength 2048; pattern `^[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+$`
- `meta` (`report-get-analytics-comparison.response.200.meta`; object, optional)
  - `timestamp` (`report-get-analytics-comparison.response.200.meta.timestamp`; string, required)
    - format `date-time`

### 400

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`report-get-analytics-comparison.response.400.error`; object, required)
  - `code` (`report-get-analytics-comparison.response.400.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`report-get-analytics-comparison.response.400.error.message`; string, required) — Human-readable error message
  - `details` (`report-get-analytics-comparison.response.400.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`report-get-analytics-comparison.response.400.error.traceId`; string, optional) — Unique ID for log correlation

### 401

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`report-get-analytics-comparison.response.401.error`; object, required)
  - `code` (`report-get-analytics-comparison.response.401.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`report-get-analytics-comparison.response.401.error.message`; string, required) — Human-readable error message
  - `details` (`report-get-analytics-comparison.response.401.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`report-get-analytics-comparison.response.401.error.traceId`; string, optional) — Unique ID for log correlation

### 403

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`report-get-analytics-comparison.response.403.error`; object, required)
  - `code` (`report-get-analytics-comparison.response.403.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`report-get-analytics-comparison.response.403.error.message`; string, required) — Human-readable error message
  - `details` (`report-get-analytics-comparison.response.403.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`report-get-analytics-comparison.response.403.error.traceId`; string, optional) — Unique ID for log correlation

### 404

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`report-get-analytics-comparison.response.404.error`; object, required)
  - `code` (`report-get-analytics-comparison.response.404.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`report-get-analytics-comparison.response.404.error.message`; string, required) — Human-readable error message
  - `details` (`report-get-analytics-comparison.response.404.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`report-get-analytics-comparison.response.404.error.traceId`; string, optional) — Unique ID for log correlation

### 500

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`report-get-analytics-comparison.response.500.error`; object, required)
  - `code` (`report-get-analytics-comparison.response.500.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`report-get-analytics-comparison.response.500.error.message`; string, required) — Human-readable error message
  - `details` (`report-get-analytics-comparison.response.500.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`report-get-analytics-comparison.response.500.error.traceId`; string, optional) — Unique ID for log correlation


Source: https://docs.sureshake.com/reference/report-get-analytics-comparison/index.md
