How AI is applied across API Evangelist and APIs.io. Read my AI disclosure →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

Google Analytics Data API

Reporting API for GA4 properties — core reports, pivot reports, batched reports, realtime reports, funnel reports, dimension/metric metadata, compatibility checks, audience exports and asynchronous report tasks. 11 operations on the stable v1beta channel and 15 on v1alpha, harvested from Google's own Discovery documents.

Google Analytics Data API is one of 3 APIs that Google Analytics 4 publishes on the APIs.io network, described by a machine-readable OpenAPI specification.

Tagged areas include Reporting, Analytics, V1beta, and V1alpha. The published artifact set on APIs.io includes an OpenAPI specification, API documentation, an API reference, authentication docs, a getting-started guide, and rate-limit docs.

This API exposes 11 operations across 10 paths, and defines 69 schemas. It is described by OpenAPI 3.1.0, at version v1beta.

Requests are made against a single base URL, https://analyticsdata.googleapis.com.

11 operations 10 paths 69 schemas 3 GET8 POST

Metadata

The identity and technical contract details declared by the specification.

Specification
OpenAPI 3.1.0
API Version
v1beta
Base URL
https://analyticsdata.googleapis.com
Authentication
OAuth 2.0, HTTP Bearer
Contact
Resource Areas
1

Authentication & Security 2

Google Analytics Data API declares 2 security schemes for authenticating requests. It supports OAuth 2.0 (OAuth2) using the authorizationCode flow, exposing 2 scopes. It accepts HTTP bearer tokens (BearerAuth). By default, every request must be authenticated.

  • OAuth2 — Google OAuth 2.0. Scopes are the short form of the full https://www.googleapis.com/auth/ identifier.
  • BearerAuth — Google OAuth 2.0 access token presented as a bearer token.

Paths & Operations 11

Across 10 paths, the API surfaces 11 operations — 3 GET, 8 POST. Each is listed below with its method, path, parameters, and response codes.

properties 11
POST
/v1beta/properties/{propertiesId}:batchRunPivotReports
Returns multiple pivot reports in a batch
properties_batchRunPivotReports 2 params body → 200default
POST
/v1beta/properties/{propertiesId}:batchRunReports
Returns multiple reports in a batch
properties_batchRunReports 2 params body → 200default
POST
/v1beta/properties/{propertiesId}:checkCompatibility
This compatibility method lists dimensions and metrics that can be added to a report request and maintain compatibility
properties_checkCompatibility 2 params body → 200default
GET
/v1beta/properties/{propertiesId}/metadata
Returns metadata for dimensions and metrics available in reporting methods
properties_getMetadata 2 params → 200default
POST
/v1beta/properties/{propertiesId}:runPivotReport
Returns a customized pivot report of your Google Analytics event data
properties_runPivotReport 2 params body → 200default
POST
/v1beta/properties/{propertiesId}:runRealtimeReport
Returns a customized report of realtime event data for your property
properties_runRealtimeReport 2 params body → 200default
POST
/v1beta/properties/{propertiesId}:runReport
Returns a customized report of your Google Analytics event data
properties_runReport 2 params body → 200default
POST
/v1beta/properties/{propertiesId}/audienceExports
Creates an audience export for later retrieval
properties_audienceExports_create 2 params body → 200default
GET
/v1beta/properties/{propertiesId}/audienceExports
Lists all audience exports for a property
properties_audienceExports_list 4 params → 200default
GET
/v1beta/properties/{propertiesId}/audienceExports/{audienceExportsId}
Gets configuration metadata about a specific audience export
properties_audienceExports_get 3 params → 200default
POST
/v1beta/properties/{propertiesId}/audienceExports/{audienceExportsId}:query
Retrieves an audience export of users
properties_audienceExports_query 3 params body → 200default

Schemas 69

The contract defines 69 schemas that model the data the API accepts and returns. The most detailed are RunReportRequest (15 properties), RunPivotReportRequest (12 properties), AudienceExport (10 properties), RunReportResponse (10 properties). Each schema is shown below with its type and property counts.

RunRealtimeReportRequest
object
The request to generate a realtime report.
9 properties
RunRealtimeReportResponse
object
The response realtime report table corresponding to a request.
9 properties
EmptyFilter
object
Filter for empty values.
DimensionValue
object
The value of a dimension.
1 property
AudienceExport
object
An audience export is a list of users in an audience at the time of the list's creation. One audience may have multiple audience exports created for different…
10 properties
BatchRunPivotReportsResponse
object
The batch response containing multiple pivot reports.
2 properties
ListAudienceExportsResponse
object
A list of all audience exports for a property.
2 properties
FilterExpressionList
object
A list of filter expressions.
1 property
PivotDimensionHeader
object
Summarizes dimension values from a row for this pivot.
1 property
ConcatenateExpression
object
Used to combine dimension values to a single dimension.
2 properties
PivotSelection
object
A pair of dimension names and values. Rows with this dimension pivot pair are ordered by the metric's value. For example if pivots = {{"browser", "Chrome"}} an…
2 properties
Metric
object
The quantitative measurements of a report. For example, the metric eventCount is the total number of events. Requests are allowed up to 10 metrics.
3 properties
InListFilter
object
The result needs to be in a list of string values.
2 properties
QueryAudienceExportResponse
object
A list of users in an audience export.
3 properties
ResponseMetaData
object
Response's metadata carrying additional information about the report content.
7 properties
ActiveMetricRestriction
object
A metric actively restricted in creating the report.
2 properties
QueryAudienceExportRequest
object
A request to list users in an audience export.
2 properties
V1betaAudienceDimension
object
An audience dimension is a user attribute. Specific user attributed are requested and then later returned in the QueryAudienceExportResponse.
1 property
DimensionHeader
object
Describes a dimension column in the report. Dimensions requested in a report produce column entries within rows and DimensionHeaders. However, dimensions used…
1 property
DateRange
object
A contiguous set of days: startDate, startDate + 1, ..., endDate. Requests are allowed up to 4 date ranges.
3 properties
DimensionOrderBy
object
Sorts by dimension values.
2 properties
PropertyQuota
object
Current state of all quotas for this Analytics Property. If any quota for a property is exhausted, all requests to that property will return Resource Exhausted…
6 properties
SchemaRestrictionResponse
object
The schema restrictions actively enforced in creating this report. To learn more, see [Access and data-restriction management](https://support.google.com/analy…
1 property
DimensionExpression
object
Used to express a dimension which is the result of a formula of multiple dimensions. Example usages: 1) lowercase(dimension) 2) concatenate(dimension1, symbol,…
3 properties
RunReportRequest
object
The request to generate a report.
15 properties
RunPivotReportResponse
object
The response pivot report table corresponding to a pivot request.
8 properties
Dimension
object
Dimensions are attributes of your data. For example, the dimension city indicates the city from which an event originates. Dimension values in report responses…
2 properties
StringFilter
object
The filter for string
3 properties
QuotaStatus
object
Current state for a particular quota group.
2 properties
Metadata
object
The dimensions, metrics and comparisons currently accepted in reporting methods.
4 properties
MetricHeader
object
Describes a metric column in the report. Visible metrics requested in a report produce column entries within rows and MetricHeaders. However, metrics used excl…
2 properties
BatchRunPivotReportsRequest
object
The batch request containing multiple pivot report requests.
1 property
Status
object
The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](h…
3 properties
MetricOrderBy
object
Sorts by metric values.
1 property
RunReportResponse
object
The response report table corresponding to a request.
10 properties
CheckCompatibilityRequest
object
The request for compatibility information for a report's dimensions and metrics. Check compatibility provides a preview of the compatibility of a report; field…
5 properties
Cohort
object
Defines a cohort selection criteria. A cohort is a group of users who share a common characteristic. For example, users with the same firstSessionDate belong t…
3 properties
Comparison
object
Defines an individual comparison. Most requests will include multiple comparisons so that the report compares between the comparisons.
3 properties
BatchRunReportsResponse
object
The batch response containing multiple reports.
2 properties
CohortReportSettings
object
Optional settings of a cohort report.
1 property
PivotOrderBy
object
Sorts by a pivot column group.
2 properties
BetweenFilter
object
To express that the result needs to be between two numbers (inclusive).
2 properties
V1betaAudienceDimensionValue
object
The value of a dimension.
1 property
OrderBy
object
Order bys define how rows will be sorted in the response. For example, ordering rows by descending event count is one ordering, and ordering rows by the event…
4 properties
CaseExpression
object
Used to convert a dimension value to a single case.
1 property
CheckCompatibilityResponse
object
The compatibility response with the compatibility of each dimension & metric.
2 properties
MetricCompatibility
object
The compatibility for a single metric.
2 properties
CohortsRange
object
Configures the extended reporting date range for a cohort report. Specifies an offset duration to follow the cohorts over.
3 properties
MinuteRange
object
A contiguous set of minutes: startMinutesAgo, startMinutesAgo + 1, ..., endMinutesAgo. Requests are allowed up to 2 minute ranges.
3 properties
DimensionMetadata
object
Explains a dimension.
6 properties
BatchRunReportsRequest
object
The batch request containing multiple report requests.
1 property
DimensionCompatibility
object
The compatibility for a single dimension.
2 properties
Pivot
object
Describes the visible dimension columns and rows in the report response.
5 properties
MetricMetadata
object
Explains a metric.
9 properties
AudienceListMetadata
object
This metadata is currently blank.
Operation
object
This resource represents a long-running operation that is the result of a network API call.
5 properties
NumericValue
object
To represent a number.
2 properties
RunPivotReportRequest
object
The request to generate a pivot report.
12 properties
Filter
object
An expression to filter dimension or metric values.
6 properties
Row
object
Report data for each row. For example if RunReportRequest contains: none "dimensions": [ { "name": "eventName" }, { "name": "countryId" } ], "metrics": [ { "na…
2 properties
MetricValue
object
The value of a metric.
1 property
ComparisonMetadata
object
The metadata for a single comparison.
3 properties
CohortSpec
object
The specification of cohorts for a cohort report. Cohort reports create a time series of user retention for the cohort. For example, you could select the cohor…
3 properties
FilterExpression
object
To express dimension or metric filters. The fields in the same FilterExpression need to be either all dimensions or all metrics.
4 properties
SamplingMetadata
object
If this report results is [sampled](https://support.google.com/analytics/answer/13331292), this describes the percentage of events used in this report. Samplin…
2 properties
V1betaAudienceRow
object
Dimension value attributes for the audience user row.
1 property
NumericFilter
object
Filters for numeric or date values.
2 properties
PivotHeader
object
Dimensions' values in a single pivot.
2 properties
GoogleRpcStatus
object
Canonical google.rpc.Status error payload returned by Google APIs.
3 properties

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

google-analytics-4-data-v1beta-openapi.yml Raw ↑

Other APIs Google Analytics 4 publishes across the network.

Google Analytics Measurement Protocol
Google Analytics Admin API
Where this information came from

This is an independent, third-party profile of Google Analytics Data API, published by API Evangelist. We do not operate, host, resell, or support these APIs, and we are not affiliated with or endorsed by the company unless stated above. Everything here is built from publicly available information — the company's own site, developer portal, documentation, public repositories, and the specifications it publishes for public use. Nothing is obtained by breaching a system, defeating an access control, or using credentials.

The Kin Score and Agent Readiness rating are independently calculated assessments of a company's public API artifacts, scored against a published rubric. They are not certifications, endorsements, security assessments, or audits.

Corrections, re-scores, and removal are free — no partnership or purchase required, and you do not need to justify the request. A removed company is recorded as unrated, never scored zero for having asked. Acknowledgement within one business day; removal within two.

info@apievangelist.com · Read the full data-sourcing policy →
On a security or compliance team? Put security in the subject line and you will get a person, not a form — we will tell you exactly which public URLs this profile was built from.