Recently, I wanted to access some data stored in a public google cloud storage (GCS) bucket. I could access the data by authenticating, but it seemed desirable to see how else I could access the data. Google’s documentation suggests that it’s possible to access the data over https, with all public bucket objects accessible via the following url with BUCKET_NAME and OBJECT_NAME appropriately substituted.

https://storage.googleapis.com/BUCKET_NAME/OBJECT_NAME

The above, however, is only useful if you already know the object you are interested in. Luckily, Google allows you to list bucket contents over https. Simply navigate to https://storage.googleapis.com/BUCKET_NAME, with BUCKET_NAME set to whatever bucket you are interested in. If you want to navigate to subdirectories, append the prefix=PREFIX query parameter to your url. For example:

https://storage.googleapis.com/BUCKET_NAME?prefix=PREFIX

Once you’ve found the file you’re interested in, you can download it using curl, wget, or a HTTP(s) library in your programming language of choice.

curl -o file_name.ext https://storage.googleapis.com/BUCKET_NAME/OBJECT_NAME

With both of the above, you can find and download any object you want from a public GCS bucket. No authentication required.