StreamingNewBeta
Get Streams
Get every stream in a date range, newest first.
https://v1.apifansly.com/api/fansly
GET
/{account_id}/stats/streams
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/streams?after=1791849600000&before=1794441600000&limit=30" \
-H "x-api-key: YOUR_API_KEY"fetch("https://v1.apifansly.com/api/fansly/{account_id}/stats/streams?after=1791849600000&before=1794441600000&limit=30", {
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/streams?after=1791849600000&before=1794441600000&limit=30"
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/streams?after=1791849600000&before=1794441600000&limit=30"))
.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/streams?after=1791849600000&before=1794441600000&limit=30");
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/streams?after=1791849600000&before=1794441600000&limit=30"
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
after*
numberStart of the date range, Unix timestamp (ms).
before*
numberEnd of the date range, Unix timestamp (ms).
limit ?
numberMax streams to return.
Response
before is capped at the current time. Use a session's id with Get Stream Session.
{
"statusCode": 200,
"message": "Success",
"data": {
"status_code": 200,
"data": {
"success": true,
"response": {
"after": 1791849600000,
"before": 1794433061116,
"channel": {
"id": "streaming_channel_identifier",
"chatRoomId": "chat_room_identifier",
"status": 2
},
"sessions": [
{
"id": "stream_session_identifier",
"streamId": "stream_identifier",
"channelId": "streaming_channel_identifier",
"title": "having fun come join",
"startedAt": 1794427224000,
"endedAt": 1794427372000,
"live": false,
"liveViewerCount": 0,
"durationMs": 148000,
"tipCount": 0,
"tipAmount": 0,
"ticketCount": 0,
"ticketAmount": 0,
"peakViewerCount": 4,
"averageViewerCount": 2,
"viewerSampleCount": 3,
"viewerSource": "samples",
"messageCount": 0,
"chatterCount": 0
}
],
"hasMore": false
}
}
},
"timestamp": "2026-11-11T21:37:41.280Z"
}