GA4’s Explorations are where analysts build funnels and path diagrams, and they are also a dead end for engineering. An exploration lives in one user’s workspace, cannot be scheduled, and cannot feed a dashboard or a warehouse table. When marketing asks for “the checkout funnel, every morning, by channel,” you need an API.

The GA4 Data API covers part of that. Funnels are available programmatically through an alpha method. Path exploration is not exposed at all. This guide covers what you can call, the limits that matter, and how to fill the path gap.

The funnel endpoint: runFunnelReport

Funnel reporting lives only in the v1alpha version of the Data API:

POST https://analyticsdata.googleapis.com/v1alpha/properties/{PROPERTY_ID}:runFunnelReport

Google’s documentation labels it alpha and warns to expect breaking changes before general release. Pin your client library version, wrap the call in your own interface, and do not let downstream code depend on the raw response shape.

A request has three main parts.

The funnel definition. An ordered list of steps, each with a name and a filterExpression. Step filters combine funnelEventFilter (match an event name, optionally with parameter filters) and funnelFieldFilter (match a dimension value) using and, or, and not groups. Two step-level options mirror the UI:

  • isDirectlyFollowedBy: when true, the step must immediately follow the previous one. It defaults to false, meaning other events can occur in between.
  • withinDurationFromPriorStep: a duration string such as "1800s", requiring the step to complete within that time of the prior step.

At the funnel level, isOpenFunnel controls whether users can enter at any step. If you leave it unset, you get a closed funnel, where users must enter at step one. That default trips people up when comparing to a UI exploration someone built as open.

A breakdown (optional). funnelBreakdown splits each step in the table by one dimension, such as sessionDefaultChannelGroup or deviceCategory. It returns 5 values by default; the limit field can raise that to a maximum of 15.

A next action (optional). funnelNextAction adds what users did immediately after each step to the visualization sub-report. The nextActionDimension supports eventName and most page and screen dimensions such as pagePath and pageTitle, and its limit cannot exceed 5. This is the closest thing the API has to path data, and it is shallow by design: one step forward, top five values.

Other request fields behave like core reports: dateRanges, dimensionFilter, up to 4 segments (each evaluated as a separate funnel), funnelVisualizationType (STANDARD_FUNNEL or TRENDED_FUNNEL, which adds a date dimension), and returnPropertyQuota.

Reading the response

The response contains two sub-reports:

  • funnelTable: one row per step, per breakdown value, with activeUsers, funnelStepCompletionRate, funnelStepAbandonments, and funnelStepAbandonmentRate. A row with the breakdown value RESERVED_TOTAL holds the totals for the step.
  • funnelVisualization: step-level activeUsers, with date when trended and funnelStepNextAction when you requested a next action.

Two handling notes. First, filter out RESERVED_TOTAL before summing breakdown rows, or you will double count. Second, the documentation’s sample output shows rate metrics declared as integers while the values are decimals; parse defensively rather than trusting the declared type. Check the metadata for sampling as well. Funnel results can be sampled on large properties, and a sampled number in a daily dashboard should carry a flag.

Quota: funnels have their own bucket

The Data API splits quota into categories, and runFunnelReport is the only method that consumes the Funnel category. For a standard property, each category allows 200,000 tokens per property per day, 40,000 per property per hour, 14,000 per project per property per hour, 10 concurrent requests per property, and 10 server errors per project per property per hour.

Funnel requests are not cheap in tokens, because the token cost grows with the complexity and date range of the query. Set returnPropertyQuota: true during development to see what each request consumes, then size your schedule. The per-project hourly limit is the one that bites first when several jobs share a Cloud project.

A minimal Python call

from google.analytics.data_v1alpha import AlphaAnalyticsDataClient
from google.analytics.data_v1alpha.types import (
    DateRange, Dimension, Funnel, FunnelBreakdown, FunnelEventFilter,
    FunnelFilterExpression, FunnelStep, RunFunnelReportRequest,
)

def step(name, event):
    return FunnelStep(
        name=name,
        filter_expression=FunnelFilterExpression(
            funnel_event_filter=FunnelEventFilter(event_name=event)
        ),
    )

req = RunFunnelReportRequest(
    property="properties/123456789",
    date_ranges=[DateRange(start_date="7daysAgo", end_date="yesterday")],
    funnel=Funnel(steps=[
        step("View item", "view_item"),
        step("Add to cart", "add_to_cart"),
        step("Begin checkout", "begin_checkout"),
        step("Purchase", "purchase"),
    ]),
    funnel_breakdown=FunnelBreakdown(
        breakdown_dimension=Dimension(name="sessionDefaultChannelGroup"),
        limit=10,
    ),
    return_property_quota=True,
)
resp = AlphaAnalyticsDataClient().run_funnel_report(req)

Write the table rows to the warehouse with the run date and the full request definition stored alongside. When someone changes a step filter, you want to know which days were computed under which definition.

The path gap

There is no Data API method for path exploration. You have three options, in increasing order of effort.

Chain next actions. Run a funnel whose steps are the path you care about and request funnelNextAction on pagePath. This tells you the top five next pages after each step. It answers “where do people go after the pricing page?” but not “what are the common five-page sequences?”

Approximate with core reports. runReport with pagePath plus pageReferrer gives page-to-page transitions in aggregate. It is a referrer, not a session sequence: it is a full URL, it can be external, and it carries none of the ordering you need for multi-step paths.

Use the BigQuery export. For real paths, the GA4 BigQuery export is the answer. Every event arrives with user_pseudo_id, the ga_session_id event parameter, and an event_timestamp. Ordering page_view events within a session and collapsing consecutive duplicates produces session paths that you can count, truncate to N steps, and compare across segments:

select path, count(*) as sessions
from (
  select
    concat(user_pseudo_id, '.',
      (select value.int_value from unnest(event_params) where key = 'ga_session_id')) as sid,
    string_agg(
      (select value.string_value from unnest(event_params) where key = 'page_location'),
      ' > ' order by event_timestamp limit 5) as path
  from `project.analytics_123456789.events_*`
  where event_name = 'page_view'
    and _table_suffix between '20261020' and '20261026'
  group by sid
)
group by path
order by sessions desc
limit 50

Strip query strings from page_location before aggregating, or every UTM variant becomes its own node. Our BigQuery setup guide covers the export configuration.

Which numbers will not match

Expect differences between API funnels, UI explorations, and BigQuery-derived funnels. The UI may apply thresholding and different sampling. BigQuery has no thresholding and counts users by user_pseudo_id, while the API’s activeUsers follows GA4’s reporting identity settings. Document which source is authoritative for which question before anyone puts two of them side by side in a deck.

The practical split: use runFunnelReport for scheduled, defined funnels that marketing checks every day, and use the BigQuery export for exploratory path analysis and anything that needs more than one step of “what happened next.”