Run a GA4 report: metrics (e.g. activeUsers, newUsers, sessions, screenPageViews, engagementRate, keyEvents, totalRevenue) over a date range, optionally broken down by up to 9 dimensions (e.g. date, sessionDefaultChannelGroup, sessionSource, pagePath, landingPage, country, deviceCategory). Use get_metadata for every name the property supports, including custom ones. Dates are in the property's time zone.
-
property* string
-
The GA4 property as list_properties returns it, e.g. "properties/123456789" (the bare number works too). Not the "G-…" measurement ID.
-
start_date* string
-
First day (inclusive): YYYY-MM-DD, "NdaysAgo" (e.g. "28daysAgo"), "yesterday" or "today".
-
end_date* string
-
Last day (inclusive): YYYY-MM-DD, "NdaysAgo", "yesterday" or "today".
-
metrics* array<string>
-
Metric API names, e.g. ["activeUsers", "sessions"].
-
dimensions array<string>
-
Dimension API names to group rows by, in order, e.g. ["date", "sessionDefaultChannelGroup"]. Omit for one total row.
-
dimension_filter object
-
A GA4 FilterExpression, sent as is, e.g. {"filter": {"fieldName": "country", "stringFilter": {"matchType": "EXACT", "value": "Canada"}}}. Combine with {"andGroup": {"expressions": […]}}, {"orGroup": …} or {"notExpression": …}.
-
order_by array
-
GA4 OrderBy objects, sent as is, e.g. [{"metric": {"metricName": "sessions"}, "desc": true}] or [{"dimension": {"dimensionName": "date"}}]. A single object is accepted too.
-
totals boolean
-
Also return the metric totals across all rows.
default: false
-
limit integer
-
Rows to return (1–250000).
default: 100
-
offset integer
-
Zero-based row offset for paging; row_count is the total.
default: 0
-
keep_empty_rows boolean
-
Include rows whose metrics are all zero.
default: false