api-referenceGET
GET
https://analytics.flowsery.com/analytics/api/v1/regionsFetch analytics data segmented by region.
Bearer Token (workspace token or website API key)
Workspace Tokens Need a Website Selector
Workspace API tokens can access every website in the workspace. Pass either <code>websiteId</code> or <code>domain</code> so Flowsery knows which website to query or mutate. Website API keys are already scoped to one website, so the selector can be omitted.Website Selector
| Parameter | Type | Description |
|---|---|---|
websiteId | string | Website ID to use with a workspace API token. Omit when authenticating with a website API key. |
domain | string | Website domain to use with a workspace API token when websiteId is not provided. Omit when authenticating with a website API key. |
Query Parameters
| Parameter | Type | Description |
|---|---|---|
startAt | string | ISO 8601 start date/time (e.g. 2024-01-01T00:00:00Z). Defaults to the last 30 days when omitted. |
endAt | string | ISO 8601 end date/time. Defaults to now when omitted. |
timezone | string | Timezone for aggregation (e.g., UTC, America/New_York). Falls back to the site's configured timezone. |
limit | number | Maximum rows to return (1-1000, default: 100). |
offset | number | Rows to skip for pagination (min 0, default: 0). |
Filter Parameters
| Parameter | Type | Description |
|---|---|---|
filter_country | string | Country name as returned by /countries, e.g. United States. Use | for several values, ! to exclude and ~ to match part of the value. |
filter_region | string | Region or state name as returned by /regions, e.g. California. |
filter_city | string | City name. |
filter_device | string | Device type: Desktop, Mobile or Tablet. Values are case-sensitive. |
filter_browser | string | Browser name. Safari includes Mobile Safari automatically. |
filter_os | string | Operating system (Mac OS, Windows, iOS, Android). |
filter_referrer | string | Referrer as returned by /referrers: a source name such as Google for recognized sites, otherwise the domain. |
filter_ref | string | The ref URL parameter value. |
filter_source | string | The source URL parameter value. |
filter_via | string | The via URL parameter value. |
filter_utm_source | string | UTM source. |
filter_utm_medium | string | UTM medium. |
filter_utm_campaign | string | UTM campaign. |
filter_utm_term | string | UTM term. |
filter_utm_content | string | UTM content. |
filter_page | string | Page path or URL. |
filter_entry_page | string | Entry page path or URL. |
filter_hostname | string | Hostname/domain. |
filter_channel | string | Marketing channel. |
filter_goal | string | Goal name. |
Response Fields
Each item in the <code>data</code> array contains the region name as <code>value</code>, the <code>countryCode</code> of its country, visitor count, revenue split into <code>newRevenue</code> and <code>renewalRevenue</code>, and its share of visitors as <code>percentage</code>.
Combining Filters
Separate several values inside one filter parameter with |. Combine different filter parameters to narrow results further (e.g., <code>filter_country=United States&filter_region=California|Texas</code>).Example Request (Curl)
curl --request GET \
--url 'https://analytics.flowsery.com/analytics/api/v1/regions?limit=5' \
--header 'Authorization: Bearer <api-key>'200
{
"status": "success",
"data": [
{
"value": "California",
"countryCode": "US",
"visitors": 1150,
"revenue": 3420,
"newRevenue": 2640,
"renewalRevenue": 780,
"percentage": 33.8
},
{
"value": "Ile-de-France",
"countryCode": "FR",
"visitors": 720,
"revenue": 1890,
"newRevenue": 1470,
"renewalRevenue": 420,
"percentage": 21.2
},
{
"value": "England",
"countryCode": "GB",
"visitors": 540,
"revenue": 1450,
"newRevenue": 1190,
"renewalRevenue": 260,
"percentage": 15.9
},
{
"value": "Berlin",
"countryCode": "DE",
"visitors": 480,
"revenue": 1230,
"newRevenue": 1030,
"renewalRevenue": 200,
"percentage": 14.1
},
{
"value": "Madrid",
"countryCode": "ES",
"visitors": 510,
"revenue": 980,
"newRevenue": 860,
"renewalRevenue": 120,
"percentage": 15
}
],
"pagination": {
"limit": 100,
"offset": 0,
"total": 656
}
}