API Reference
GET Hostnames
List hostname analytics for the authenticated site.
GET Hostnames
GET https://api.faurya.com/api/v1/analytics/hostnames
List hostname breakdown analytics for the site attached to your API key. Requires Bearer Token authentication.
Example request
const response = await fetch(
"https://api.faurya.com/api/v1/analytics/hostnames",
{
headers: {
Authorization: `Bearer ${process.env.FAURYA_API_KEY}`,
},
},
);
const result = await response.json();Query parameters
period(string):day,week,month,year, orall.startDateorstartAt(string): Custom range start. Must be used with an end date.endDateorendAt(string): Custom range end. Must be used with a start date.limit(number): Number of rows to return. Defaults to100, maximum100.offset(number): Number of rows to skip. Defaults to0.device,os,browser,path,country,city,utm,referrer,hostname,goal(string): Optional analytics filters.
Response
Each row includes hostname, visitors, goalVisitors, and revenue.
{
"status": "success",
"data": [
{
"hostname": "example.com",
"visitors": 210,
"goalVisitors": 31,
"revenue": 499.99
}
],
"pagination": {
"limit": 100,
"offset": 0,
"total": 1,
"hasMore": false
}
}