Objects: list

Retrieves a list of objects matching the criteria.

In conjunction with the prefix filter, the use of the delimiter parameter allows the list method to operate like a directory listing, despite the object namespace being flat. For example, if delimiter were set to "/", then listing objects from a bucket that contains the objects "a/b", "a/c", "d", "e", "e/f" would return objects "d" and "e", and prefixes "a/" and "e/".

The authenticated user must have READER permissions on the bucket.

Object list operations are eventually consistent. This means that if you upload an object to a bucket and then immediately perform a list operation on the bucket in which the object is stored, the uploaded object might not immediately appear in the returned list of objects. However, you can always immediately download a newly-created object and get its ACLs because object uploads are strongly consistent.


HTTP request

GET https://www.googleapis.com/storage/v1/b/bucket/o


Parameter name Value Description
Path parameters
bucket string Name of the bucket in which to look for objects.
Optional query parameters
delimiter string Returns results in a directory-like mode. items will contain only objects whose names, aside from the prefix, do not contain delimiter. Objects whose names, aside from the prefix, contain delimiter will have their name, truncated after the delimiter, returned in prefixes. Duplicate prefixes are omitted.
maxResults unsigned integer Maximum number of items plus prefixes to return. As duplicate prefixes are omitted, fewer total results may be returned than requested. The default value of this parameter is 1,000 items.
pageToken string A previously-returned page token representing part of the larger set of results to view.

The pageToken is an encoded field representing the name and generation of the last object in the returned list. In a subsequent request using the pageToken, items that come after the pageToken are shown (up to maxResults).

Object list operations are eventually consistent. In addition, if you start a listing and then create an object in the bucket before using a pageToken to continue listing, you will not see the new object in subsequent listing results if it is in part of the object namespace already listed.
prefix string Filter results to objects whose names begin with this prefix.
projection string Set of properties to return. Defaults to noAcl.

Acceptable values are:
  • "full": Include all properties.
  • "noAcl": Omit the owner, acl property.
versions boolean If true, lists all versions of an object as distinct results. The default is false. For more information, see Object Versioning.

Request body

Do not supply a request body with this method.


If successful, this method returns a response body with the following structure:

  "kind": "storage#objects",
  "nextPageToken": string,
  "prefixes": [
  "items": [
    objects Resource
Property name Value Description Notes
kind string The kind of item this is. For lists of objects, this is always storage#objects.
nextPageToken string The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results.
prefixes[] list The list of prefixes of objects matching-but-not-listed up to and including the requested delimiter.
items[] list The list of items.

Send feedback about...

Cloud Storage