StatisticsNewBeta
Get Stats Breakdown
Get views, subscriptions or revenue over a date range, grouped by hour, day or month.
https://v1.apifansly.com/api/fansly
GET
/{account_id}/stats/breakdown
Get Started
All requests to the Fansly API require an API Key. See the Authentication page for details.
curl -X GET "https://v1.apifansly.com/api/fansly/{account_id}/stats/breakdown?family=views&granularity=day&after=1791849600000&before=1794355200000" \
-H "x-api-key: YOUR_API_KEY"fetch("https://v1.apifansly.com/api/fansly/{account_id}/stats/breakdown?family=views&granularity=day&after=1791849600000&before=1794355200000", {
method: "GET",
headers: {
"x-api-key": "YOUR_API_KEY"
}
})
.then(response => response.json())
.then(data => console.log(data));import requests
url = "https://v1.apifansly.com/api/fansly/{account_id}/stats/breakdown?family=views&granularity=day&after=1791849600000&before=1794355200000"
headers = {
"x-api-key": "YOUR_API_KEY"
}
response = requests.get(url, headers=headers)
print(response.json())import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://v1.apifansly.com/api/fansly/{account_id}/stats/breakdown?family=views&granularity=day&after=1791849600000&before=1794355200000"))
.header("x-api-key", "YOUR_API_KEY")
.GET()
.build();
client.sendAsync(request, HttpResponse.BodyHandlers.ofString())
.thenApply(HttpResponse::body)
.thenAccept(System.out::println)
.join();using System.Net.Http;
using System.Threading.Tasks;
var client = new HttpClient();
client.DefaultRequestHeaders.Add("x-api-key", "YOUR_API_KEY");
var response = await client.GetAsync("https://v1.apifansly.com/api/fansly/{account_id}/stats/breakdown?family=views&granularity=day&after=1791849600000&before=1794355200000");
var responseString = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseString);package main
import (
"fmt"
"io/ioutil"
"net/http"
)
func main() {
url := "https://v1.apifansly.com/api/fansly/{account_id}/stats/breakdown?family=views&granularity=day&after=1791849600000&before=1794355200000"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Set("x-api-key", "YOUR_API_KEY")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := ioutil.ReadAll(resp.Body)
fmt.Println(string(body))
}Path Parameters
account_id*
stringThe unique identifier for the connected account, retrieved from your Dashboard.
Query Parameters
family*
stringData to return:
views, subscriptions or revenue.granularity*
stringGroup by
hour, day or month.after*
numberStart of the date range, Unix timestamp (ms).
before*
numberEnd of the date range, Unix timestamp (ms).
Response
Shortened: rows is cut to two entries. Row fields depend on family:
views: one row per bucket andsource.subscriptions: one row per bucket andtierId.revenue: one row per bucket andproductType. Amounts are in mills.
bucketField names each row's time field: hourBucket for hour, bucket for day and month. Month buckets start on the 1st of the month.
{
"statusCode": 200,
"message": "Success",
"data": {
"status_code": 200,
"data": {
"success": true,
"response": {
"afterBucket": 1794096000000,
"beforeBucket": 1794355200000,
"family": "views",
"granularity": "day",
"bucketField": "bucket",
"rows": [
{
"source": 0,
"bucket": "1794096000000",
"views": 1245,
"impressions": 1245,
"watchMs": 4806656,
"videoViews": 1245,
"completedViews": 182,
"watchPctSum": 4490750,
"replays": 37,
"uniqueViewers": 719,
"imageImpressions": 0,
"imageViews": 0,
"imageWatchMs": 0,
"uniqueImageViewers": 0
},
{
"source": 1,
"bucket": "1794096000000",
"views": 365,
"impressions": 365,
"watchMs": 3669141,
"videoViews": 365,
"completedViews": 133,
"watchPctSum": 2311225,
"replays": 17,
"uniqueViewers": 96,
"imageImpressions": 39,
"imageViews": 39,
"imageWatchMs": 75481,
"uniqueImageViewers": 11
}
]
}
}
},
"timestamp": "2026-11-11T18:53:53.519Z"
}{
"statusCode": 200,
"message": "Success",
"data": {
"status_code": 200,
"data": {
"success": true,
"response": {
"afterBucket": 1791849600000,
"beforeBucket": 1794355200000,
"family": "subscriptions",
"granularity": "day",
"bucketField": "bucket",
"rows": [
{
"tierId": "subscription_tier_identifier",
"bucket": "1791936000000",
"subscriptionsNew": 0,
"subscriptionsRenewed": 0,
"subscriptionsExpired": 1,
"subscriptionsCancelled": 1,
"subscriptionsMovedIn": 0,
"subscriptionsMovedOut": 0
},
{
"tierId": "subscription_tier_identifier",
"bucket": "1792281600000",
"subscriptionsNew": 1,
"subscriptionsRenewed": 0,
"subscriptionsExpired": 0,
"subscriptionsCancelled": 0,
"subscriptionsMovedIn": 0,
"subscriptionsMovedOut": 0
}
]
}
}
},
"timestamp": "2026-11-11T18:57:02.145Z"
}{
"statusCode": 200,
"message": "Success",
"data": {
"status_code": 200,
"data": {
"success": true,
"response": {
"afterBucket": 1791849600000,
"beforeBucket": 1794355200000,
"family": "revenue",
"granularity": "day",
"bucketField": "bucket",
"rows": [
{
"productType": 2110,
"bucket": "1792540800000",
"transactions": 2,
"grossMills": 39990,
"netMills": 31992,
"refunds": 0,
"refundedGrossMills": 0,
"refundedNetMills": 0
},
{
"productType": 15001,
"bucket": "1792540800000",
"transactions": 1,
"grossMills": 20000,
"netMills": 16000,
"refunds": 0,
"refundedGrossMills": 0,
"refundedNetMills": 0
}
]
}
}
},
"timestamp": "2026-11-11T18:57:25.912Z"
}