Stay organized with collections
Save and categorize content based on your preferences.
Retrieves a list of buckets for a given project, ordered in the list lexicographically by name.
Required permissions
The authenticated user must have the storage.buckets.list IAM permission to use
this method. Additionally, to list specific bucket properties, the authenticated user must have the following permissions:
To list the IAM policies: storage.buckets.getIamPolicy
To list the bucket IP filtering rules: storage.buckets.getIpFilter
To see an example of how to include query parameters in a request, see the
JSON API Overview page.
Parameters
Parameter name
Value
Description
Required query parameters
project
string
A valid API project identifier.
Optional query parameters
maxResults
unsigned integer
Maximum number of buckets to return in a single response. The service may return fewer
results than maxResults so the presence of nextPageToken should
always be checked. The service limits to:
200 items if projection=full.
1,000 items if projection=noAcl.
pageToken
string
A previously-returned page token representing part of the larger set of results to view.
The pageToken is an encoded field containing the name of the last item (bucket) in the returned list. In a subsequent request, using the pageToken, items that come after the pageToken are shown (up to maxResults). For soft-deleted bucket list requests, the pageToken also contains the generation of the bucket.
If you start a listing and then create a new bucket before using a pageToken to continue listing, you will not see the new bucket in subsequent listing results if it is in part of the bucket namespace already listed.
prefix
string
Filter results to buckets 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 owner, acl, and
defaultObjectAcl properties.
softDeleted
boolean
If set to true, only soft-deleted bucket versions are listed as distinct results in order of bucket name and generation number. The default value is false.
Request body
Do not supply a request body with this method.
Response
If successful, this method returns a response body with the following structure:
The kind of item this is. For lists of buckets, this is always
"storage#buckets".
nextPageToken
string
The continuation token. Provide this value as the
pageToken of a subsequent
request in order to return the next page of results. Note that the next page may be empty.
If this is the last page of results, then no continuation token is returned. The presence of this parameter in the response should always be checked to ensure a complete listing of
all the results.
The nextPageToken is the name of the last bucket in the returned
list. In a subsequent list request using the pageToken, items that come after
the token are shown (up to maxResults).
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[],[],null,["# Buckets: list\n\nRetrieves a list of buckets for a given project, ordered in the list lexicographically by name.\n\nRequired permissions\n--------------------\n\nThe authenticated user must have the `storage.buckets.list` IAM permission to use\nthis method. Additionally, to list specific bucket properties, the authenticated user must have the following permissions:\n\n- To list the IAM policies: `storage.buckets.getIamPolicy`\n- To list the bucket IP filtering rules: `storage.buckets.getIpFilter`\n\nRequest\n-------\n\n### HTTP request\n\n```\nGET https://storage.googleapis.com/storage/v1/b\n```\n\nIn addition to [standard query parameters](/storage/docs/json_api/v1/parameters#query),\nthe following query parameters apply to this method.\n\nTo see an example of how to include query parameters in a request, see the\n[JSON API Overview](/storage/docs/json_api#query_parameters) page.\n\n### Parameters\n\n### Request body\n\nDo not supply a request body with this method.\n\nResponse\n--------\n\nIf successful, this method returns a response body with the following structure:\n\n```objective-c\n{\n \"kind\": \"storage#buckets\",\n \"nextPageToken\": string,\n \"items\": [\n buckets Resource\n ]\n}\n```\n\nFor information about status and error codes returned by this API, see the\n[reference page](/storage/docs/json_api/v1/status-codes).\n\nTry it!\n-------\n\n\nUse the APIs Explorer below to call this method on live data and see the response."]]