---
title: "Get Period Comparison"
method: POST
path: "/api/analytics/summary/comparison"
tags: ["Analytics - Summary"]
---

# Get Period Comparison

`POST /api/analytics/summary/comparison`

Compare two time periods to analyze performance changes. Returns summary, breakdown, and chart data for the comparison.

## Request body

- object
  - `account_ids` string[], required — Array of account prefixed IDs to compare
  - `period_a` object, required — First period to compare
    - `start` string, required — Must be a valid date.
    - `end` string, required — Must be a valid date. Must be a date after or equal to <code>period_a.start</code>.
  - `period_b` object, required — Second period to compare
    - `start` string, required — Must be a valid date.
    - `end` string, required — Must be a valid date. Must be a date after or equal to <code>period_b.start</code>.
  - `granularity` 'months' | 'quarters' | 'half_years' | 'years' — Comparison granularity
  - `stat_type` 'totalEarnings' | 'subscriptions' | 'posts' | 'messages' | 'tips' | 'streams' — The statistic type to compare

## Response `200`

- object
  - `summary` object
    - `period_a_total` number
    - `period_b_total` number
    - `change` number
    - `change_percentage` number
  - `breakdown` unknown[]
    - unknown
  - `chart_data` unknown[]
    - unknown
  - `period_a_label` string
  - `period_b_label` string

---

[API](https://skmtc.net/onlyfansapi/apis/onlyfans-api.md) · [All operations](https://skmtc.net/onlyfansapi/apis/onlyfans-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/onlyfansapi/onlyfans-api/revisions/4a99d36f28a3/schema)
