v8

latestOpenAPI 3.0.3raw.githubusercontent.com2026-05-2526602.8 MB
Analytics - Summary

Get Period Comparison

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

post/api/analytics/summary/comparison

Request body

account_idsstring[] required

Array of account prefixed IDs to compare

granularity'months' | 'quarters' | 'half_years' | 'years'

Comparison granularity

stat_type'totalEarnings' | 'subscriptions' | 'posts' | 'messages' | 'tips' | 'streams'

The statistic type to compare

Example request

{
  "account_ids": [
    "acc_abc123",
    "acc_def456"
  ],
  "period_a": {
    "start": "2024-01-01",
    "end": "2024-03-31"
  },
  "period_b": {
    "start": "2024-04-01",
    "end": "2024-06-30"
  },
  "granularity": "months",
  "stat_type": "totalEarnings"
}

Response

period_a_labelstring
period_b_labelstring

Example response

{
  "summary": {
    "period_a_total": 15000,
    "period_b_total": 18000,
    "change": 3000,
    "change_percentage": 20
  },
  "breakdown": [],
  "chart_data": [],
  "period_a_label": "Q1 2024",
  "period_b_label": "Q2 2024"
}