GET /files
Changed onLists the user's files. For more information, see Search for files and folders. This method accepts the q parameter, which is a search query combining one or more search terms. This method returns all files by default, including trashed files. If you don't want trashed files to appear in the list, use the trashed=false query parameter to remove trashed files from the results.
Request
- Base URLhttps://www.googleapis.com/drive/v3
- Auth
- OAuth 2 and OAuth 2Implicithttps://accounts.google.com/o/oauth2/authScopeshttps://www.googleapis.com/auth/driveAuthorization codehttps://accounts.google.com/o/oauth2/authToken URLhttps://accounts.google.com/o/oauth2/tokenScopeshttps://www.googleapis.com/auth/drive
- or OAuth 2 and OAuth 2Implicithttps://accounts.google.com/o/oauth2/authScopeshttps://www.googleapis.com/auth/drive.appdataAuthorization codehttps://accounts.google.com/o/oauth2/authToken URLhttps://accounts.google.com/o/oauth2/tokenScopeshttps://www.googleapis.com/auth/drive.appdata
- or OAuth 2 and OAuth 2Implicithttps://accounts.google.com/o/oauth2/authScopeshttps://www.googleapis.com/auth/drive.fileAuthorization codehttps://accounts.google.com/o/oauth2/authToken URLhttps://accounts.google.com/o/oauth2/tokenScopeshttps://www.googleapis.com/auth/drive.file
- or OAuth 2 and OAuth 2Implicithttps://accounts.google.com/o/oauth2/authScopeshttps://www.googleapis.com/auth/drive.meet.readonlyAuthorization codehttps://accounts.google.com/o/oauth2/authToken URLhttps://accounts.google.com/o/oauth2/tokenScopeshttps://www.googleapis.com/auth/drive.meet.readonly
- or OAuth 2 and OAuth 2Implicithttps://accounts.google.com/o/oauth2/authScopeshttps://www.googleapis.com/auth/drive.metadataAuthorization codehttps://accounts.google.com/o/oauth2/authToken URLhttps://accounts.google.com/o/oauth2/tokenScopeshttps://www.googleapis.com/auth/drive.metadata
- or OAuth 2 and OAuth 2Implicithttps://accounts.google.com/o/oauth2/authScopeshttps://www.googleapis.com/auth/drive.metadata.readonlyAuthorization codehttps://accounts.google.com/o/oauth2/authToken URLhttps://accounts.google.com/o/oauth2/tokenScopeshttps://www.googleapis.com/auth/drive.metadata.readonly
- or OAuth 2 and OAuth 2Implicithttps://accounts.google.com/o/oauth2/authScopeshttps://www.googleapis.com/auth/drive.photos.readonlyAuthorization codehttps://accounts.google.com/o/oauth2/authToken URLhttps://accounts.google.com/o/oauth2/tokenScopeshttps://www.googleapis.com/auth/drive.photos.readonly
- or OAuth 2 and OAuth 2Implicithttps://accounts.google.com/o/oauth2/authScopeshttps://www.googleapis.com/auth/drive.readonlyAuthorization codehttps://accounts.google.com/o/oauth2/authToken URLhttps://accounts.google.com/o/oauth2/tokenScopeshttps://www.googleapis.com/auth/drive.readonly
Query parameters
Specifies a collection of items (files or documents) to which the query applies. Supported items include: * user * domain * drive * allDrives Prefer user or drive to allDrives for efficiency. By default, corpora is set to user. However, this can change depending on the filter set through the q parameter. For more information, see File organization.
Deprecated: The source of files to list. Use corpora instead.
ID of the shared drive to search.
Whether both My Drive and shared drive items should be included in results.
A comma-separated list of IDs of labels to include in the labelInfo part of the response.
Specifies which additional view's permissions to include in the response. Only published is supported.
Deprecated: Use includeItemsFromAllDrives instead.
A comma-separated list of sort keys. Valid keys are: * createdTime: When the file was created. Avoid using this key for queries on large item collections as it might result in timeouts or other issues. For time-related sorting on large item collections, use modifiedTime desc instead. * folder: The folder ID. This field is sorted using alphabetical ordering. * modifiedByMeTime: The last time the file was modified by the user. * modifiedTime: The last time the file was modified by anyone. * name: The name of the file. This field is sorted using alphabetical ordering, so 1, 12, 2, 22. * name_natural: The name of the file. This field is sorted using natural sort ordering, so 1, 2, 12, 22. * quotaBytesUsed: The number of storage quota bytes used by the file. * recency: The most recent timestamp from the file's date-time fields. * sharedWithMeTime: When the file was shared with the user, if applicable. * starred: Whether the user has starred the file. * viewedByMeTime: The last time the file was viewed by the user. Each key sorts ascending by default, but can be reversed with the desc modifier. Example usage: ?orderBy=folder,modifiedTime desc,name.
The maximum number of files to return. The service may return fewer than this value. If unspecified, at most 100 files will be returned for shared drives, and the entire list of files for non-shared drives. The maximum value is 1000; values above 1000 will be coerced to 1000.
The token for continuing a previous list request on the next page. This should be set to the value of nextPageToken from the previous response.
A query for filtering the file results. For supported syntax, see Search for files and folders.
A comma-separated list of spaces to query within the corpora. Supported values are drive and appDataFolder. For more information, see File organization.
Whether the requesting application supports both My Drives and shared drives.
Deprecated: Use supportsAllDrives instead.
Deprecated: Use driveId instead.
Response
Successful response
Changes
- info
the security scope
https://www.googleapis.com/auth/drivewas added to the endpoint's security schemeOauth2 - info
the security scope
https://www.googleapis.com/auth/drivewas added to the endpoint's security schemeOauth2c - info
the security scope
https://www.googleapis.com/auth/drive.readonlywas removed from the endpoint's security schemeOauth2 - info
the security scope
https://www.googleapis.com/auth/drive.readonlywas removed from the endpoint's security schemeOauth2c
- info
- info
the security scope
https://www.googleapis.com/auth/drivewas added to the endpoint's security schemeOauth2 - info
the security scope
https://www.googleapis.com/auth/drivewas added to the endpoint's security schemeOauth2c - info
the security scope
https://www.googleapis.com/auth/drive.readonlywas removed from the endpoint's security schemeOauth2 - info
the security scope
https://www.googleapis.com/auth/drive.readonlywas removed from the endpoint's security schemeOauth2c
- info