API Reference
Analytics
Retrieve views, revenue, and subscriber stats for your MisarBlog content.
Get Analytics
GET
/blog/v1/analyticsReturns aggregate stats for the authenticated creator's content over a rolling window. Authenticated with your API key (Authorization: Bearer mbk_...).
Query parameters
daysintegerquerydefault: 30Size of the rolling window in days, from now backwards. Clamped to 1–365.
Response fields
period_daysintegerThe window size that was applied (the clamped days value).
viewsintegerTotal article_view events for your articles in the window.
revenue_centsintegerGross succeeded payment revenue in the window, in cents.
revenue_net_centsintegerRevenue after the platform fee, in cents (revenue_cents minus platform fees).
active_subscribersintegerCurrent count of active paying subscribers (not windowed).
curl "https://api.misar.io/blog/v1/analytics?days=7" \
-H "Authorization: Bearer mbk_YOUR_KEY"{
"period_days": 7,
"views": 18420,
"revenue_cents": 28450,
"revenue_net_cents": 25605,
"active_subscribers": 1204
}const res = await fetch("https://api.misar.io/blog/v1/analytics?days=30", {
headers: { Authorization: `Bearer ${process.env.MISARBLOG_API_KEY}` },
});
const stats = await res.json();
console.log(stats.views, stats.revenue_cents / 100);Status codes
401— Invalid or missing API key