Google Analytics · JSON Structure

Data Api Run Report Response Structure

The response report table corresponding to a request.

Type: object Properties: 10
AnalyticsDataGoogleMetricsReportingWeb AnalyticsMachine LearningAttribution

RunReportResponse is a JSON Structure definition published by Google Analytics, describing 10 properties. It conforms to the https://json-structure.org/meta/core/v0/# meta-schema.

Properties

dimensionHeaders kind maximums metadata metricHeaders minimums propertyQuota rowCount rows totals

Meta-schema: https://json-structure.org/meta/core/v0/#

JSON Structure

Raw ↑
{
  "$schema": "https://json-structure.org/meta/core/v0/#",
  "$id": "https://raw.githubusercontent.com/api-evangelist/google-analytics/refs/heads/main/json-structure/data-api-run-report-response-structure.json",
  "name": "RunReportResponse",
  "description": "The response report table corresponding to a request.",
  "type": "object",
  "properties": {
    "dimensionHeaders": {
      "description": "Describes dimension columns. The number of DimensionHeaders and ordering of DimensionHeaders matches the dimensions present in rows.",
      "items": {
        "description": "Describes a dimension column in the report. Dimensions requested in a report produce column entries within rows and DimensionHeaders. However, dimensions used exclusively within filters or expressions do not produce columns in a report; correspondingly, those dimensions do not produce headers.",
        "properties": {
          "name": {
            "description": "The dimension's name.",
            "type": "string",
            "example": "Example Name"
          }
        },
        "type": "object"
      },
      "type": "array"
    },
    "kind": {
      "description": "Identifies what kind of resource this message is. This `kind` is always the fixed string \"analyticsData#runReport\". Useful to distinguish between response types in JSON.",
      "type": "string"
    },
    "maximums": {
      "description": "If requested, the maximum values of metrics.",
      "items": {
        "description": "Report data for each row. For example if RunReportRequest contains: ```none \"dimensions\": [ { \"name\": \"eventName\" }, { \"name\": \"countryId\" } ], \"metrics\": [ { \"name\": \"eventCount\" } ] ``` One row with 'in_app_purchase' as the eventName, 'JP' as the countryId, and 15 as the eventCount, would be: ```none \"dimensionValues\": [ { \"value\": \"in_app_purchase\" }, { \"value\": \"JP\" } ], \"metricValues\": [ { \"value\": \"15\" } ] ```",
        "properties": {
          "dimensionValues": {
            "description": "List of requested dimension values. In a PivotReport, dimension_values are only listed for dimensions included in a pivot.",
            "items": {
              "$ref": "#/components/schemas/DimensionValue"
            },
            "type": "array"
          },
          "metricValues": {
            "description": "List of requested visible metric values.",
            "items": {
              "$ref": "#/components/schemas/MetricValue"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "type": "array"
    },
    "metadata": {
      "description": "Response's metadata carrying additional information about the report content.",
      "properties": {
        "currencyCode": {
          "description": "The currency code used in this report. Intended to be used in formatting currency metrics like `purchaseRevenue` for visualization. If currency_code was specified in the request, this response parameter will echo the request parameter; otherwise, this response parameter is the property's current currency_code. Currency codes are string encodings of currency types from the ISO 4217 standard (https://en.wikipedia.org/wiki/ISO_4217); for example \"USD\", \"EUR\", \"JPY\". To learn more, see https://support.google.com/analytics/answer/9796179.",
          "type": "string"
        },
        "dataLossFromOtherRow": {
          "description": "If true, indicates some buckets of dimension combinations are rolled into \"(other)\" row. This can happen for high cardinality reports. The metadata parameter dataLossFromOtherRow is populated based on the aggregated data table used in the report. The parameter will be accurately populated regardless of the filters and limits in the report. For example, the (other) row could be dropped from the report because the request contains a filter on sessionSource = google. This parameter will still be populated if data loss from other row was present in the input aggregate data used to generate this report. To learn more, see [About the (other) row and data sampling](https://support.google.com/analytics/answer/13208658#reports).",
          "type": "boolean"
        },
        "emptyReason": {
          "description": "If empty reason is specified, the report is empty for this reason.",
          "type": "string"
        },
        "samplingMetadatas": {
          "description": "If this report results is [sampled](https://support.google.com/analytics/answer/13331292), this describes the percentage of events used in this report. One `samplingMetadatas` is populated for each date range. Each `samplingMetadatas` corresponds to a date range in order that date ranges were specified in the request. However if the results are not sampled, this field will not be defined.",
          "items": {
            "$ref": "#/components/schemas/SamplingMetadata"
          },
          "type": "array"
        },
        "schemaRestrictionResponse": {
          "description": "The schema restrictions actively enforced in creating this report. To learn more, see [Access and data-restriction management](https://support.google.com/analytics/answer/10851388).",
          "properties": {
            "activeMetricRestrictions": {
              "description": "All restrictions actively enforced in creating the report. For example, `purchaseRevenue` always has the restriction type `REVENUE_DATA`. However, this active response restriction is only populated if the user's custom role disallows access to `REVENUE_DATA`.",
              "items": {
                "$ref": "#/components/schemas/ActiveMetricRestriction"
              },
              "type": "array"
            }
          },
          "type": "object"
        },
        "subjectToThresholding": {
          "description": "If `subjectToThresholding` is true, this report is subject to thresholding and only returns data that meets the minimum aggregation thresholds. It is possible for a request to be subject to thresholding thresholding and no data is absent from the report, and this happens when all data is above the thresholds. To learn more, see [Data thresholds](https://support.google.com/analytics/answer/9383630).",
          "type": "boolean"
        },
        "timeZone": {
          "description": "The property's current timezone. Intended to be used to interpret time-based dimensions like `hour` and `minute`. Formatted as strings from the IANA Time Zone database (https://www.iana.org/time-zones); for example \"America/New_York\" or \"Asia/Tokyo\".",
          "type": "string"
        }
      },
      "type": "object"
    },
    "metricHeaders": {
      "description": "Describes metric columns. The number of MetricHeaders and ordering of MetricHeaders matches the metrics present in rows.",
      "items": {
        "description": "Describes a metric column in the report. Visible metrics requested in a report produce column entries within rows and MetricHeaders. However, metrics used exclusively within filters or expressions do not produce columns in a report; correspondingly, those metrics do not produce headers.",
        "properties": {
          "name": {
            "description": "The metric's name.",
            "type": "string"
          },
          "type": {
            "description": "The metric's data type.",
            "enum": [
              "METRIC_TYPE_UNSPECIFIED",
              "TYPE_INTEGER",
              "TYPE_FLOAT",
              "TYPE_SECONDS",
              "TYPE_MILLISECONDS",
              "TYPE_MINUTES",
              "TYPE_HOURS",
              "TYPE_STANDARD",
              "TYPE_CURRENCY",
              "TYPE_FEET",
              "TYPE_MILES",
              "TYPE_METERS",
              "TYPE_KILOMETERS"
            ],
            "type": "string"
          }
        },
        "type": "object"
      },
      "type": "array"
    },
    "minimums": {
      "description": "If requested, the minimum values of metrics.",
      "items": {
        "description": "Report data for each row. For example if RunReportRequest contains: ```none \"dimensions\": [ { \"name\": \"eventName\" }, { \"name\": \"countryId\" } ], \"metrics\": [ { \"name\": \"eventCount\" } ] ``` One row with 'in_app_purchase' as the eventName, 'JP' as the countryId, and 15 as the eventCount, would be: ```none \"dimensionValues\": [ { \"value\": \"in_app_purchase\" }, { \"value\": \"JP\" } ], \"metricValues\": [ { \"value\": \"15\" } ] ```",
        "properties": {
          "dimensionValues": {
            "description": "List of requested dimension values. In a PivotReport, dimension_values are only listed for dimensions included in a pivot.",
            "items": {
              "$ref": "#/components/schemas/DimensionValue"
            },
            "type": "array"
          },
          "metricValues": {
            "description": "List of requested visible metric values.",
            "items": {
              "$ref": "#/components/schemas/MetricValue"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "type": "array"
    },
    "propertyQuota": {
      "description": "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 errors.",
      "properties": {
        "concurrentRequests": {
          "description": "Current state for a particular quota group.",
          "properties": {
            "consumed": {
              "description": "Quota consumed by this request.",
              "type": "int32"
            },
            "remaining": {
              "description": "Quota remaining after this request.",
              "type": "int32"
            }
          },
          "type": "object"
        },
        "potentiallyThresholdedRequestsPerHour": {
          "description": "Current state for a particular quota group.",
          "properties": {
            "consumed": {
              "description": "Quota consumed by this request.",
              "type": "int32"
            },
            "remaining": {
              "description": "Quota remaining after this request.",
              "type": "int32"
            }
          },
          "type": "object"
        },
        "serverErrorsPerProjectPerHour": {
          "description": "Current state for a particular quota group.",
          "properties": {
            "consumed": {
              "description": "Quota consumed by this request.",
              "type": "int32"
            },
            "remaining": {
              "description": "Quota remaining after this request.",
              "type": "int32"
            }
          },
          "type": "object"
        },
        "tokensPerDay": {
          "description": "Current state for a particular quota group.",
          "properties": {
            "consumed": {
              "description": "Quota consumed by this request.",
              "type": "int32"
            },
            "remaining": {
              "description": "Quota remaining after this request.",
              "type": "int32"
            }
          },
          "type": "object"
        },
        "tokensPerHour": {
          "description": "Current state for a particular quota group.",
          "properties": {
            "consumed": {
              "description": "Quota consumed by this request.",
              "type": "int32"
            },
            "remaining": {
              "description": "Quota remaining after this request.",
              "type": "int32"
            }
          },
          "type": "object"
        },
        "tokensPerProjectPerHour": {
          "description": "Current state for a particular quota group.",
          "properties": {
            "consumed": {
              "description": "Quota consumed by this request.",
              "type": "int32"
            },
            "remaining": {
              "description": "Quota remaining after this request.",
              "type": "int32"
            }
          },
          "type": "object"
        }
      },
      "type": "object"
    },
    "rowCount": {
      "description": "The total number of rows in the query result. `rowCount` is independent of the number of rows returned in the response, the `limit` request parameter, and the `offset` request parameter. For example if a query returns 175 rows and includes `limit` of 50 in the API request, the response will contain `rowCount` of 175 but only 50 rows. To learn more about this pagination parameter, see [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).",
      "type": "int32"
    },
    "rows": {
      "description": "Rows of dimension value combinations and metric values in the report.",
      "items": {
        "description": "Report data for each row. For example if RunReportRequest contains: ```none \"dimensions\": [ { \"name\": \"eventName\" }, { \"name\": \"countryId\" } ], \"metrics\": [ { \"name\": \"eventCount\" } ] ``` One row with 'in_app_purchase' as the eventName, 'JP' as the countryId, and 15 as the eventCount, would be: ```none \"dimensionValues\": [ { \"value\": \"in_app_purchase\" }, { \"value\": \"JP\" } ], \"metricValues\": [ { \"value\": \"15\" } ] ```",
        "properties": {
          "dimensionValues": {
            "description": "List of requested dimension values. In a PivotReport, dimension_values are only listed for dimensions included in a pivot.",
            "items": {
              "$ref": "#/components/schemas/DimensionValue"
            },
            "type": "array"
          },
          "metricValues": {
            "description": "List of requested visible metric values.",
            "items": {
              "$ref": "#/components/schemas/MetricValue"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "type": "array"
    },
    "totals": {
      "description": "If requested, the totaled values of metrics.",
      "items": {
        "description": "Report data for each row. For example if RunReportRequest contains: ```none \"dimensions\": [ { \"name\": \"eventName\" }, { \"name\": \"countryId\" } ], \"metrics\": [ { \"name\": \"eventCount\" } ] ``` One row with 'in_app_purchase' as the eventName, 'JP' as the countryId, and 15 as the eventCount, would be: ```none \"dimensionValues\": [ { \"value\": \"in_app_purchase\" }, { \"value\": \"JP\" } ], \"metricValues\": [ { \"value\": \"15\" } ] ```",
        "properties": {
          "dimensionValues": {
            "description": "List of requested dimension values. In a PivotReport, dimension_values are only listed for dimensions included in a pivot.",
            "items": {
              "$ref": "#/components/schemas/DimensionValue"
            },
            "type": "array"
          },
          "metricValues": {
            "description": "List of requested visible metric values.",
            "items": {
              "$ref": "#/components/schemas/MetricValue"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "type": "array"
    }
  }
}