Media Statistics
Get detailed analytics and engagement metrics for a specific media offer over a specified time period.
Get detailed analytics available for a specific media, focusing on performance, audience behavior, and overall engagement for a specific piece of content. It covers key metrics such as media views, preview views, watch time, and unique viewers, along with time-based breakdowns.
- Media Views
- Average Media Engagement Time
- Total Media Engagement Time
- Unique Media Viewers
- Preview Views
Get Started
All requests to the Fansly API require an API Key. See the Authentication page for details.
Path Parameters
Query Parameters
You can specify a time range or period for the analytics data.
curl -X GET "https://v1.apifansly.com/api/fansly/{accountId}/analytics/media/{mediaOfferId}" \
-H "x-api-key: YOUR_API_KEY"fetch("https://v1.apifansly.com/api/fansly/{accountId}/analytics/media/{mediaOfferId}", {
method: "GET",
headers: {
"x-api-key": "YOUR_API_KEY"
}
})import requests
url = "https://v1.apifansly.com/api/fansly/{accountId}/analytics/media/{mediaOfferId}"
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/{accountId}/analytics/media/{mediaOfferId}"))
.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/{accountId}/analytics/media/{mediaOfferId}");
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/{accountId}/analytics/media/{mediaOfferId}"
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))
}Response
{
"statusCode": 200,
"message": "Success",
"data": {
"status_code": 200,
"data": {
"success": true,
"response": {
"dataset": {
"period": 86400000,
"dateBefore": 1773792000000,
"dateAfter": 1771200000000,
"datapointLimit": 100,
"datapoints": [
{
"timestamp": 1773792000000,
"stats": []
},
{
"stats": [
{
"type": 1,
"views": 1,
"previewViews": 0,
"interactionTime": 750,
"previewInteractionTime": 0,
"uniqueViewers": 1,
"previewUniqueViewers": 0
}
],
"timestamp": 1772928000000
}
],
"topFypTags": [],
"datasetMediaOfferId": "XXxxxxxxxxxxxxxxxxxx"
},
"aggregationData": {
"accountMedia": [
{
"id": "XXxxxxxxxxxxxxxxxxxx",
"accountId": "XXxxxxxxxxxxxxxxxxxx",
"mediaId": "XXxxxxxxxxxxxxxxxxxx",
"previewId": null,
"permissionFlags": 8,
"price": 0,
"createdAt": 1770292082,
"deletedAt": null,
"deleted": false,
"permissions": {
"permissionFlags": [
{
"id": "0",
"type": 1,
"price": 0,
"flags": 8,
"metadata": "{}",
"verificationFlags": 8,
"verificationMetadata": "{}"
}
],
"accountPermissionFlags": {
"flags": 255,
"metadata": "{}"
}
},
"bundles": [],
"likeCount": 0,
"whitelist": [
{
"accountId": "XXxxxxxxxxxxxxxxxxxx",
"permissionFlags": 0
}
],
"media": {
"id": "XXxxxxxxxxxxxxxxxxxx",
"type": 1,
"status": 1,
"accountId": "XXxxxxxxxxxxxxxxxxxx",
"mimetype": "image/jpeg",
"flags": 3202,
"filename": "[filename].jpeg",
"location": "/[accountId]/[mediaId].jpeg",
"width": 1024,
"height": 1536,
"metadata": "{\"dominant\":{\"r\":248,\"g\":248,\"b\":248},\"resolutionMode\":2}",
"updatedAt": 1770248367,
"createdAt": 1770248365,
"variants": [
{
"id": "XXxxxxxxxxxxxxxxxxxx",
"type": 1,
"status": 1,
"mimetype": "image/jpeg",
"flags": 0,
"filename": "[filename]_720.jpeg",
"location": "/[accountId]/[variantId].jpeg",
"width": 720,
"height": 1080,
"metadata": "{\"resolutionMode\":2}",
"updatedAt": 1770248367,
"locations": [
{
"locationId": "1",
"location": "https://cdn3.fansly.com/[signed-cdn-url]"
}
]
}
],
"variantHash": {},
"locations": [
{
"locationId": "1",
"location": "https://cdn3.fansly.com/[signed-cdn-url]"
}
]
},
"purchased": true,
"whitelisted": true,
"accountPermissionFlags": 255,
"access": true
}
],
"accountMediaBundles": [],
"tags": [],
"creatorMediaOfferLocations": []
}
}
}
},
"timestamp": "2026-03-18T05:21:16.528Z"
}Response Fields
Media Engagement Time-Series
| Field | Type | Description |
|---|---|---|
timestamp | number | Unix timestamp (ms) marking the start of this datapoint's period |
stats | array | Array of stat objects (views, interaction time, unique viewers) segmented by traffic source type |
Calculating Average Engagement Time: To compute average engagement time per viewer, divide interactionTime by uniqueViewers. Interaction time is reported in milliseconds — divide by 1000 to convert to seconds.
Stat Type Reference
The type field in the arrays above identifies where traffic originated.
| Type Code | Source | Context |
|---|---|---|
1 | Direct / Timeline | Media viewed directly from the creator's timeline or post feed |
Top Components
| Field | Type | Description |
|---|---|---|
dataset.topFypTags | array | Top content tags that drove FYP discovery traffic for this media |
aggregationData.accountMedia | array | Full metadata (thumbnails, pricing, CDN URLs, permissions) for the media offer |