Request endpoints

This page explains the different request endpoints (URIs) you can use to access Cloud Storage.

Typical API requests

When making requests directly to one of the Cloud Storage APIs, use the following URIs:


  • For general JSON API requests, excluding object uploads, use the following endpoint, replacing VALUES_IN_BRACKETS with the appropriate values:
  • For JSON API object uploads, use the following endpoint, replacing VALUES_IN_BRACKETS with the appropriate values:
  • For batched requests, use the following endpoint, replacing VALUES_IN_BRACKETS with the appropriate values:
  • Optionally, for JSON API object downloads, you can use the following endpoint, replacing VALUES_IN_BRACKETS with the appropriate values:

JSON API endpoints only accept HTTPS requests.


  • For XML API requests, you can use either the virtual hosted-style or path-style endpoint, replacing VALUES_IN_BRACKETS with the appropriate values:

    Virtual hosted-style:

XML API endpoints support secure sockets layer (SSL) encryption, which means you can use either HTTP or HTTPS. Using HTTPS is recommended, especially if you authenticate to Cloud Storage using OAuth 2.0.

For connections through a proxy, see the Troubleshooting topic for recommended practices.

Encoding URI path parts

In addition to general considerations for bucket naming and object naming, to ensure compatibility across Cloud Storage tools, you should encode the following characters when they appear in either the object name or query string of a request URI:

!, #, $, &, ', (, ), *, +, ,, /, :, ;, =, ?, @, [, ], and space characters.

For example, if you send a JSON API GET request for the object named foo??bar in the bucket example-bucket, then your request URI should be:


Note that not all of the listed characters must be encoded in every scenario: for example, the / character must be encoded only when rewriting or copying with the JSON API and only for the source object in such a rewrite/copy.

For more information about using percent-encoded for URIs, see Section 3.3 Path in RFC 3986. Note that encoding is typically handled for you by client libraries, such as the Cloud Storage Client Libraries, so you can pass the raw object name to them.

Cloud Console endpoints

When using the Cloud Console, you access different resources using the following URLs:

Resource URL
Bucket list for a project
Object list for a bucket
Details for an object

CNAME Redirects

A CNAME redirect is a special DNS record that lets you use URIs from your own domain to access resources in Cloud Storage through the XML API without revealing the actual XML API URIs. To do this, the following URI must be added to the host name portion of your CNAME record:

For example, say your domain is, and you want to make travel maps available to your customers. You can create a bucket in Cloud Storage called, and then create a CNAME record in DNS that redirects requests from to the Cloud Storage URI. To do this, you publish the following CNAME record in DNS:

NAME                      TYPE     DATA   CNAME

By doing this, your customers can use the following URL to access a map of Paris:

Your domain registration service should have a way for you to administer your domain, including adding a CNAME resource record. For example, if you use Google Domains, instructions for adding a resource record can be found on the Google Domains Help page, in the Resource records drop-down section.

Authenticated Browser Downloads

Authenticated browser downloads use cookie-based authentication. Cookie-based authentication asks users to sign in to their Google account to establish their identity. The specified Google account must have appropriate permission to access the resource, granted though IAM policies or Access Control Lists, in order to perform the browser download.

To download an object using cookie-based authentication, use the following URL, replacing VALUES_IN_BRACKETS with the appropriate values:

For example, if you shared an image london.jpg from your bucket example-maps, the URL would be:

Using HTTPS is required when performing authenticated browser downloads; attempts to use HTTP redirect to HTTPS. For more information about authenticated browser downloads, see Cookie-based Authentication.

Access to public objects

All requests to the URI require authentication. This applies even when allUsers have permission to access an object. If you want users to download anonymously accessible objects without authenticating, use the URI documented in Direct API requests. For details and examples, see Accessing Public Data.

What's next