{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/google-chrome/json-schema/google-chrome-query-response-schema.json",
  "title": "QueryResponse",
  "description": "Response payload sent back to a physical web client. This response contains the record found based on the identiers present in a `QueryRequest`. The returned response will have a record, and sometimes details on normalization actions taken on the request that were necessary to make the request successful.",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/google-chrome-chromeuxreport-records-api-openapi.yml#/components/schemas/QueryResponse",
  "type": "object",
  "properties": {
    "record": {
      "$ref": "#/$defs/Record",
      "description": "The record that was found."
    },
    "urlNormalizationDetails": {
      "$ref": "#/$defs/UrlNormalization",
      "description": "These are details about automated normalization actions that were taken in order to make the requested `url_pattern` valid."
    }
  },
  "$defs": {
    "Bin": {
      "properties": {
        "density": {
          "description": "The proportion of users that experienced this bin's value for the given metric."
        },
        "start": {
          "description": "Start is the beginning of the data bin."
        },
        "end": {
          "description": "End is the end of the data bin. If end is not populated, then the bin has no end and is valid from start to +inf."
        }
      },
      "description": "A bin is a discrete portion of data spanning from start to end, or if no end is given, then from start to +inf. A bin's start and end values are given in the value type of the metric it represents. For example, \"first contentful paint\" is measured in milliseconds and exposed as ints, therefore its metric bins will use int32s for its start and end types. However, \"cumulative layout shift\" is measured in unitless decimals and is exposed as a decimal encoded as a string, therefore its metric bins will use strings for its value type.",
      "type": "object"
    },
    "CollectionPeriod": {
      "type": "object",
      "properties": {
        "firstDate": {
          "$ref": "#/$defs/Date",
          "description": "The first day in the collection period, inclusive."
        },
        "lastDate": {
          "$ref": "#/$defs/Date",
          "description": "The last day in the collection period, inclusive."
        }
      },
      "description": "The collection period is a date range which includes the `first` and `last` day."
    },
    "Date": {
      "type": "object",
      "properties": {
        "month": {
          "type": "integer",
          "description": "Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.",
          "format": "int32"
        },
        "day": {
          "format": "int32",
          "description": "Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.",
          "type": "integer"
        },
        "year": {
          "format": "int32",
          "type": "integer",
          "description": "Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year."
        }
      },
      "description": "Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp"
    },
    "Key": {
      "type": "object",
      "description": "Key defines all the dimensions that identify this record as unique.",
      "properties": {
        "effectiveConnectionType": {
          "type": "string",
          "description": "The effective connection type is the general connection class that all users experienced for this record. This field uses the values [\"offline\", \"slow-2G\", \"2G\", \"3G\", \"4G\"] as specified in: https://wicg.github.io/netinfo/#effective-connection-types If the effective connection type is unspecified, then aggregated data over all effective connection types will be returned."
        },
        "url": {
          "type": "string",
          "description": "Url specifies a specific url that this record is for. Note: When specifying a \"url\" only data for that specific url will be aggregated."
        },
        "origin": {
          "description": "Origin specifies the origin that this record is for. Note: When specifying an origin, data for loads under this origin over all pages are aggregated into origin level user experience data.",
          "type": "string"
        },
        "formFactor": {
          "description": "The form factor is the device class that all users used to access the site for this record. If the form factor is unspecified, then aggregated data over all form factors will be returned.",
          "type": "string",
          "enum": [
            "ALL_FORM_FACTORS",
            "PHONE",
            "DESKTOP",
            "TABLET"
          ]
        }
      }
    },
    "Metric": {
      "description": "A `metric` is a set of user experience data for a single web performance metric, like \"first contentful paint\". It contains a summary histogram of real world Chrome usage as a series of `bins`.",
      "properties": {
        "percentiles": {
          "$ref": "#/$defs/Percentiles",
          "description": "Commonly useful percentiles of the Metric. The value type for the percentiles will be the same as the value types given for the Histogram bins."
        },
        "histogram": {
          "description": "The histogram of user experiences for a metric. The histogram will have at least one bin and the densities of all bins will add up to ~1.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/Bin"
          }
        },
        "fractions": {
          "type": "object",
          "description": "For enum metrics, provides fractions which add up to approximately 1.0.",
          "additionalProperties": {
            "format": "double",
            "type": "number"
          }
        }
      },
      "type": "object"
    },
    "Percentiles": {
      "description": "Percentiles contains synthetic values of a metric at a given statistical percentile. These are used for estimating a metric's value as experienced by a percentage of users out of the total number of users.",
      "properties": {
        "p75": {
          "description": "75% of users experienced the given metric at or below this value."
        }
      },
      "type": "object"
    },
    "Record": {
      "type": "object",
      "properties": {
        "key": {
          "$ref": "#/$defs/Key",
          "description": "Key defines all of the unique querying parameters needed to look up a user experience record."
        },
        "metrics": {
          "additionalProperties": {
            "$ref": "#/$defs/Metric"
          },
          "type": "object",
          "description": "Metrics is the map of user experience data available for the record defined in the key field. Metrics are keyed on the metric name. Allowed key values: [\"first_contentful_paint\", \"first_input_delay\", \"largest_contentful_paint\", \"cumulative_layout_shift\", \"experimental_time_to_first_byte\", \"experimental_interaction_to_next_paint\"]"
        },
        "collectionPeriod": {
          "$ref": "#/$defs/CollectionPeriod",
          "description": "The collection period indicates when the data reflected in this record was collected."
        }
      },
      "description": "Record is a single Chrome UX report data record. It contains use experience statistics for a single url pattern and set of dimensions."
    },
    "UrlNormalization": {
      "type": "object",
      "properties": {
        "originalUrl": {
          "type": "string",
          "description": "The original requested URL prior to any normalization actions."
        },
        "normalizedUrl": {
          "description": "The URL after any normalization actions. This is a valid user experience URL that could reasonably be looked up.",
          "type": "string"
        }
      },
      "description": "Object representing the normalization actions taken to normalize a url to achieve a higher chance of successful lookup. These are simple automated changes that are taken when looking up the provided `url_patten` would be known to fail. Complex actions like following redirects are not handled."
    }
  }
}