System parameters

Google's API platform provides a set of common functionality to all Google APIsbuilt using the platform. In order to use and control such functionality,the platform pre-defines a special set of request parameters calledsystem parameters. These parameters are available across all Google REST APIsand gRPC APIs. A system parameter can be specified either using an HTTP queryparameter or an HTTP header. For Google gRPC APIs, only HTTP headers aresupported.

Most users will not need to use these parameters directly. However, they areoften used by Google-providedclient libraries. If you need to writecustom code to access Google APIs directly, the system parameters can beuseful in cases such as controlling JSON pretty-printing or specifying API Keys.

HTTP Mapping

For HTTP requests, system parameters are sent as URL query parameters orHTTP request headers. For example, if you have a system parameter$foo, it'ssent as?$foo=xxx in the URL, or?%24foo=xxx if URL-encoded. See thetable below for details.

Note: The$ name prefix is added to avoid conflicting with normal requestparameters.

gRPC Mapping

ForgRPC requests, system parameters are sent as HTTPrequest headers with keys in lowercase. See the table below for details.

Definitions

The following table lists all system parameters and their definitions.

URL Query ParameterHTTP/gRPC HeaderDescription
AuthorizationAuthentication credentials. SeeAuthentication overview for details.
$alt,
alt
Alternative response format. Supported values arejson (default),media,proto,sse (JSON streams).
$.xgafvJSON error format. Supported values are1,2 (default). The error format1 should only be used byGoogle API Client Libraries.
$callback,
callback
JSONP callback parameter.
$ctContent-TypeHTTP Content-Type request header override.
$fields,
fields
X-Goog-FieldMaskFieldMask used for response filtering. If empty, all fields should be returned unless documented otherwise.
X-HTTP-Method-OverrideThe intended HTTP method for the request. Some network proxies don't accept all HTTP methods.
$key,
key
X-Goog-Api-KeyGoogle API key. See https://cloud.google.com/docs/authentication/api-keys for details.
passwd,
password
Reserved to prevent putting passwords in URLs.
$prettyPrint,
prettyPrint
Pretty-print JSON response. Supported values aretrue (default),false.
quotaUserX-Goog-Quota-UserA pseudo user identifier for charging per-user quotas. If not specified, the authenticated principal is used. If there is no authenticated principal, the client IP address will be used. When specified, a valid API key with service restrictions must be used to identify the quota project. Otherwise, this parameter is ignored.
$outputDefaultsForce to output proto default values for JSON responses.
$uniqueUnique query parameter to disable request caching.
X-Goog-Api-ClientAPI client identification. The value is a space-separated list ofNAME "/" SEMVER strings, where theNAME should only contain lowercase letters, digits, and "-", and theSEMVER should be a semantic version string. For example: X-Goog-Api-Client: python/3.5.0 grpc-google-pubsub-v1/0.1.0-beta2 linux/2.7.0.
X-Goog-Request-ReasonContains a reason for making the request, which is intended to be recorded in audit logging. An example reason would be a support-case ticket number. For audit logs, the characters in the reason determine whether the reason is base64 encoded before being attached to the log entry. Reasons that include only letters, digits, and spaces are retained in plain text. Reasons that include other characters are base64 encoded.
$userProjectX-Goog-User-ProjectA caller-specified project for quota and billing purposes. The caller must haveserviceusage.services.use permission on the project.
X-Server-TimeoutTimeout (in seconds, float value) for the server to finish processing the request. This system param only applies to REST APIs for which client-side timeout is not applicable.
x-goog-request-paramsPassing additional parameters for gRPC requests in URL query format. For example: x-goog-request-params: service=pubsub.googleapis.com&release=2021-11-01r0.

Changelog

  • 2021-11 Published documentation forx-goog-request-params.
  • 2021-02 Published documentation forquotaUser.
  • 2020-07 Deprecated OAuth 2.0 query parameters.
  • 2019-10 IntroducedX-Server-Timeout system parameter.
  • 2017-10 IntroducedX-Goog-User-Project system parameter.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-02-19 UTC.