Open documentation ↗Overview
Manages files in Drive including uploading, downloading, searching, detecting changes, and updating sharing permissions.
Drive API is an analytics API from googleapis.com. Requests are authenticated with OAuth. It is served over HTTPS. Its OpenAPI description documents 48 endpoints.
At a glance
- Authentication
- OAuth
- HTTPS
- Yes
- CORS
- Unknown
- Category
- Analytics
- Base URL
https://www.googleapis.com/drive/v3- Version
- v3
- Endpoints
- 48
- OpenAPI
- Specification ↗
- Spec updated
- 2023-04-20
Make a first request
Replace the placeholders; the documentation says exactly where credentials go.
curl -X GET "https://www.googleapis.com/drive/v3/about" \
-H "Accept: application/json" \
-H "Authorization: Bearer YOUR_TOKEN"const response = await fetch("https://www.googleapis.com/drive/v3/about", {
method: "GET",
headers: {
"Accept": "application/json",
"Authorization": "Bearer YOUR_TOKEN",
},
});
const data = await response.json();
console.log(data);import requests
response = requests.request(
"GET",
"https://www.googleapis.com/drive/v3/about",
headers={
"Accept": "application/json",
"Authorization": "Bearer YOUR_TOKEN",
},
timeout=30,
)
print(response.json())Endpoints
| Method | Path | What it does |
|---|---|---|
| GET | /about | Gets information about the user, the user's Drive, and system capabilities. |
| GET | /changes | Lists the changes for a user or shared drive. |
| GET | /changes/startPageToken | Gets the starting pageToken for listing future changes. |
| POST | /changes/watch | Subscribes to changes for a user. To use this method, you must include the pageToken query parameter. |
| POST | /channels/stop | Stop watching resources through this channel |
| GET | /drives | Lists the user's shared drives. |
| POST | /drives | Creates a shared drive. |
| GET | /drives/{driveId} | Gets a shared drive's metadata by ID. |
| PATCH | /drives/{driveId} | Updates the metadata for a shared drive. |
| DELETE | /drives/{driveId} | Permanently deletes a shared drive for which the user is an organizer. The shared drive cannot contain any untrashed items. |
| POST | /drives/{driveId}/hide | Hides a shared drive from the default view. |
| POST | /drives/{driveId}/unhide | Restores a shared drive to the default view. |
| GET | /files | Lists or searches files. |
| POST | /files | Creates a file. |
| GET | /files/generateIds | Generates a set of file IDs which can be provided in create or copy requests. |
| DELETE | /files/trash | Permanently deletes all of the user's trashed files. |
| GET | /files/{fileId} | Gets a file's metadata or content by ID. |
| PATCH | /files/{fileId} | Updates a file's metadata and/or content. When calling this method, only populate fields in the request that you want to modify. When updating fields, some fiel |
| DELETE | /files/{fileId} | Permanently deletes a file owned by the user without moving it to the trash. If the file belongs to a shared drive the user must be an organizer on the parent. |
| GET | /files/{fileId}/comments | Lists a file's comments. |
| POST | /files/{fileId}/comments | Creates a comment on a file. |
| GET | /files/{fileId}/comments/{commentId} | Gets a comment by ID. |
| PATCH | /files/{fileId}/comments/{commentId} | Updates a comment with patch semantics. |
| DELETE | /files/{fileId}/comments/{commentId} | Deletes a comment. |
| GET | /files/{fileId}/comments/{commentId}/replies | Lists a comment's replies. |
| POST | /files/{fileId}/comments/{commentId}/replies | Creates a reply to a comment. |
| GET | /files/{fileId}/comments/{commentId}/replies/{replyId} | Gets a reply by ID. |
| PATCH | /files/{fileId}/comments/{commentId}/replies/{replyId} | Updates a reply with patch semantics. |
| DELETE | /files/{fileId}/comments/{commentId}/replies/{replyId} | Deletes a reply. |
| POST | /files/{fileId}/copy | Creates a copy of a file and applies any requested updates with patch semantics. Folders cannot be copied. |
| GET | /files/{fileId}/export | Exports a Google Workspace document to the requested MIME type and returns exported byte content. Note that the exported content is limited to 10MB. |
| GET | /files/{fileId}/listLabels | Lists the labels on a file. |
| POST | /files/{fileId}/modifyLabels | Modifies the set of labels on a file. |
| GET | /files/{fileId}/permissions | Lists a file's or shared drive's permissions. |
| POST | /files/{fileId}/permissions | Creates a permission for a file or shared drive. For more information on creating permissions, see Share files, folders & drives. |
| GET | /files/{fileId}/permissions/{permissionId} | Gets a permission by ID. |
| PATCH | /files/{fileId}/permissions/{permissionId} | Updates a permission with patch semantics. |
| DELETE | /files/{fileId}/permissions/{permissionId} | Deletes a permission. |
| GET | /files/{fileId}/revisions | Lists a file's revisions. |
| GET | /files/{fileId}/revisions/{revisionId} | Gets a revision's metadata or content by ID. |
| PATCH | /files/{fileId}/revisions/{revisionId} | Updates a revision with patch semantics. |
| DELETE | /files/{fileId}/revisions/{revisionId} | Permanently deletes a file version. You can only delete revisions for files with binary content in Google Drive, like images or videos. Revisions for other file |
| POST | /files/{fileId}/watch | Subscribes to changes to a file. |
| GET | /teamdrives | Deprecated use drives.list instead. |
| POST | /teamdrives | Deprecated use drives.create instead. |
| GET | /teamdrives/{teamDriveId} | Deprecated use drives.get instead. |
| PATCH | /teamdrives/{teamDriveId} | Deprecated use drives.update instead |
| DELETE | /teamdrives/{teamDriveId} | Deprecated use drives.delete instead. |
Questions
Does the Drive API API need an API key?
Yes. The Drive API API uses OAuth authentication; the documentation explains how to get credentials.
Does the Drive API API support HTTPS?
Yes, the Drive API API is served over HTTPS.
How many endpoints does the Drive API API have?
Its OpenAPI description lists 48 endpoints in version v3. All of them are shown on this page.
What are alternatives to the Drive API API?
Other Analytics APIs include Google Play Integrity API, versionhistory.googleapis.com API, Doc Converter, Perspective Comment Analyzer API, Safe Browsing API.
Similar analytics APIs
Compare alternatives →Google Play Integrity API
AnalyticsThe Play Integrity API helps you check that you're interacting with your genuine app on a genuine Android device powered by Google Play services. The Play Integrity API has replaced SafetyNet Attestation and Android Device Verification.
versionhistory.googleapis.com API
AnalyticsVersion History API - Prod
Doc Converter
AnalyticsThis api converts file formats of OpenXml and OpenOffice documents formats to vector files (e.g., svg)
Perspective Comment Analyzer API
AnalyticsThe Perspective Comment Analyzer API provides information about the potential impact of a comment on a conversation (e.g. it can provide a score for the "toxicity" of a comment). Users can leverage the "SuggestCommentScore" method to submit corrections to improve Perspective over time. Users can set the "doNotStore" flag to ensure that all submitted comments are automatically deleted after scores are returned.
Safe Browsing API
AnalyticsEnables client applications to check web resources (most commonly URLs) against Google-generated lists of unsafe web resources. The Safe Browsing APIs are for non-commercial use only. If you need to use APIs to detect malicious URLs for commercial purposes – meaning “for sale or revenue-generating purposes” – please refer to the Web Risk API.
Web Fonts Developer API
AnalyticsThe Google Web Fonts Developer API lets you retrieve information about web fonts served by Google.
Listed from APIs.guru (CC0).