Run a GA4 report
ga4_run_reportRuns a Google Analytics 4 report and returns up to 25 rows as flat objects. Provide the numeric property ID, metrics, and date range to query GA4 data.
Instructions
Runs a Google Analytics 4 report and returns rows as flat objects. Requires the NUMERIC GA4 propertyId (e.g. 123456789), not the G-XXXXXXX measurement ID. If the user does not know it, it appears in any GA4 URL as the digits after 'p' (analytics.google.com/analytics/web/#/ap/...), or under GA4 Admin -> Property details -> PROPERTY ID. Returns at most 25 rows unless limit is raised; prefer narrowing the date range or dimensions over raising it. Read-only.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum rows to return. Defaults to 25 to protect the context window. Prefer narrowing the query over raising this. | |
| offset | No | Zero-based row offset, for paging through a large report. | |
| endDate | Yes | End of the range, inclusive. Same formats as startDate. | |
| metrics | Yes | GA4 metric API names, e.g. ['activeUsers','sessions','conversions']. At least one is required. | |
| orderBys | No | Google Data API OrderBy objects (metric or dimension). | |
| startDate | Yes | Start of the range. Accepts YYYY-MM-DD, 'today', 'yesterday', or 'NdaysAgo' (e.g. '28daysAgo'). | |
| dimensions | No | GA4 dimension API names, e.g. ['date','sessionSource','country']. Omit for totals only. | |
| propertyId | Yes | GA4 numeric property ID, with or without the 'properties/' prefix. Call ga4_list_account_summaries to discover it. This is NOT the G-XXXXXXX measurement ID. | |
| metricFilter | No | Google Data API FilterExpression for metrics. | |
| keepEmptyRows | No | When true, returns rows whose metrics are all zero. Defaults to false. | |
| dimensionFilter | No | Google Data API FilterExpression for dimensions. |