System Parameters

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

Most users will not need to use these parameters directly, however they are often used by Google-provided client libraries. If you need to write custom code to access Google APIs directly, the system parameters can be useful in cases such as controlling JSON pretty-printing or specifying API Keys.

HTTP Mapping

For HTTP protocols, the system parameters are mapped to HTTP URL query parameters and HTTP headers, see below. For example, if you have a system parameter $foo, it's mapped to ?$foo=xxx in the URL (URL-encoded on wire as ?%24foo=xxx).

NOTE: the "$" prefix is added to avoid conflicting with normal request parameters.

gRPC Mapping

For gRPC, the system parameters are sent through normal HTTP request headers. See the table below for more details.


The following table lists all system parameters and their definitions.

URL Query Parameter HTTP/gRPC Header Description
Authorization OAuth 2.0 access token. See the Cloud Platform Authentication Guide for more details.
Alternative response format. Supported values are json (default), media, proto (binary protobuf).
$.xgafv JSON error format. Supported values are 1, 2 (default). The error format 1 should only be used by legacy clients.
JSONP callback parameter.
$ct Content-Type HTTP Content-Type header override.
X-Goog-FieldMask FieldMask(google.protobuf.FieldMask) used for response filtering. If empty, all fields will be returned.
$httpMethod X-HTTP-Method-Override The intended HTTP method for the request. Some network proxies don't accept all HTTP methods.
X-Goog-Api-Key Google API key, see details at
Reserved to prevent putting passwords in the URLs.
Pretty-print JSON response. Supported values are true, false.
$outputDefaults Force to output proto default values for JSON responses.
$unique Unique query parameter to disable request caching.
X-Goog-Api-Client API client identification. The value is a space-separated list of NAME "/" SEMVER strings, where the NAME should only contain lowercase letters, digits, and "-", and the SEMVER 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.
$userProject X-Goog-User-Project A caller-specified project for quota and billing purposes. The caller must have permission on the project.
Was this page helpful? Let us know how we did:

Send feedback about...