API Reference
GET Regions
List region analytics for the authenticated site.
GET Regions
GET https://api.faurya.com/api/v1/analytics/regions
List region 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/regions",
{
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 region, visitors, goalVisitors, revenue, and optional code or flag.
{
"status": "success",
"data": [
{
"region": "California",
"visitors": 38,
"goalVisitors": 7,
"revenue": 99.99,
"code": "CA"
}
],
"pagination": {
"limit": 100,
"offset": 0,
"total": 1,
"hasMore": false
}
}