Documentation Index
Fetch the complete documentation index at: https://mintlify.com/vemetric/vemetric/llms.txt
Use this file to discover all available pages before exploring further.
Endpoint
Authentication
Requires a valid API key in theAuthorization header. See Authentication for details.
Request Body
Date range for the query. Can be either:
- A preset string:
"today","yesterday","7days","30days","90days","12months","mtd"(month to date),"ytd"(year to date),"all" - An array with two date strings
[start, end]in either:YYYY-MM-DDformat (e.g.,"2026-01-01")- UTC ISO-8601 format with second precision (e.g.,
"2026-01-01T12:00:00Z")
Metrics to calculate. If omitted, defaults to
["users", "pageviews", "events"].Available metrics:"users"- Unique users count"pageviews"- Pageview events count"events"- Custom events count"bounce_rate"- Bounce rate percentage (can benullfor some groupings)"visit_duration"- Average visit duration in seconds (can benullfor some groupings)
Group results by a dimension. Currently supports grouping by one field only.Available grouping fields:
"interval:auto"- Group by time interval (automatically determined based on date range)"country"- Group by country"city"- Group by city"page:origin"- Group by page origin (protocol + host)"page:path"- Group by page path"browser"- Group by browser name"device_type"- Group by device type (desktop, mobile, tablet)"os"- Group by operating system"referrer"- Group by referrer name"referrer_type"- Group by referrer type (search, social, email, etc.)"utm_source","utm_medium","utm_campaign","utm_content","utm_term"- Group by UTM parameters"event:name"- Group by event name"event:prop:<property_name>"- Group by custom event property (e.g.,"event:prop:plan")
Sort results by a field and direction. Currently supports one sort field.You can sort by:
- Any metric in the
metricsarray - The grouping field (if
group_byis specified) "date"(when grouping byinterval:auto)
Maximum number of rows to return. Must be between 1 and 1000.
Number of rows to skip from the start (for pagination).
Array of filters to apply to the query. Multiple filters can be combined using the
filtersOperator.See the Filters section below for detailed filter types.Operator to apply between multiple filters.
"and"- All filters must match"or"- At least one filter must match
Response
Resolved query period.
Echo of the resolved query configuration.
Pagination metadata.
Result rows for the query after grouping, sorting, and pagination.
Filters
Filters allow you to narrow down your analytics data based on various criteria. Multiple filters can be combined using thefiltersOperator field.
String Operators
Used by most filter types that accept string values:"any"- Matches any value (exists)"eq"- Equals"notEq"- Not equals"contains"- Contains substring"notContains"- Does not contain substring"startsWith"- Starts with"endsWith"- Ends with
List Operators
Used by filter types that accept arrays:"oneOf"- Value is in the list"noneOf"- Value is not in the list
Page Filter
Filter based on page view properties:Filter by page origin (protocol + host). Example:
"https://example.com"Filter by page path. Example:
"/blog"Filter by page hash. Example:
"#section1"Event Filter
Filter by event name and/or event properties:Filter by event name.
Filter by custom event properties.
User Filter
Filter for anonymous or identified users:true for anonymous users, false for identified users.Location Filter
Filter by geographic location:Filter by country codes (ISO-3166 alpha-2, e.g.,
"US").Filter by city names.
Referrer Filter
Filter by referrer name:Referrer value to match. Empty string represents direct/none referrer.
String matching operator.
Referrer URL Filter
Filter by referrer URL:Referrer Type Filter
Filter by referrer category:Referrer types:
"search", "social", "email", "direct", etc.UTM Tags Filter
Filter by UTM parameters:Browser Filter
Filter by browser:Device Filter
Filter by device type:Device types:
"desktop", "mobile", "tablet"OS Filter
Filter by operating system:Examples
Aggregate Query
Get total metrics for the last 30 days:Group by Country
Get top countries by user count:cURL
Time Series Data
Get daily metrics:cURL
With Filters
Get metrics for mobile users from the US:cURL
Custom Event Properties
Group by a custom event property:cURL
Plan Restrictions
Free plans have retention limits on historical data. If you request a date range beyond your plan’s retention period, you’ll receive a403 error: