Google Drive REST API Overview

The Drive platform gives you a group of APIs along with client libraries, language-specific examples, and documentation to help you develop apps that integrate with Drive.

The core functionality of Drive apps is to download and upload files in Google Drive. However, the Drive platform provides a lot more than just storage. This page describes some of that functionality and points you to resources for building it into your app.


Create and open files directly from the Drive UI

Your app can appear directly in the Drive UI, letting users choose it to create or open documents.

After users have installed a Drive app and authorized its access to their files, the app is displayed in the Google Drive contextual Open with menu for files of the assigned MIME types. For example, users can select an application from a menu like the following:

Open with menu

Users can open certain file types with a certain Drive app by default, provided that the app has registered the correct MIME type or file extension for default access. For more information, see Setting default and secondary MIME types and file extensions.

Your app can also add a custom thumbnail when it creates or saves a file. Drive will then display the file using the custom thumbnail if it can't generate one. For more information, see Uploading thumbnails.

The Create menu in Google Drive lets users create a new file using any app that is installed and that supports UI integration. To create a new file using an application, a user can just click on the corresponding icon in the Create menu as shown:

Create New menu

For more information about implementing this functionality for your application, see Open files and Create a new file from the Drive UI.

Search for files

You can search for files using the files.list method of the Drive API.

Drive automatically indexes the content of most common file types (e.g. .html, .xml, .txt, ...) for search as soon as they are uploaded. Also, Drive uses OCR to find text in images or PDF files and automated object recognition technology to examine and index identifiable objects, people and places. For other resources such as drawings or other unique file types that are not automatically indexed by Google, apps can provide their own indexable text when they save files to Drive.

Distribute and market through Google Drive

A presence in the Chrome web store gives a Drive app access to Chrome Web Store features for installing, distributing, and marketing web apps. In particular, Drive-enabled apps will be discoverable through the Connect apps to Drive dialog inside Google Drive:

Chrome Web Store list of Drive apps

Once your app is ready to distribute to the world, a listing in the Chrome Web Store will help it find the users that need and want it. See Create a listing and Help users find your app for more information.

Share and collaborate

Google Drive apps can manage permissions and sharing settings of files. Also, apps can provide commenting and discussions on files, allowing users to work collaboratively on the documents they share in Drive. For more details on these features, see Share files and Manage Comments and Discussions.

In addition to managing permissions through the API using the Permissions collection, apps can display a standard Google Drive sharing dialog to let users share files. Apps can implement this by adding some simple Javascript to your application code as described in Launching the Google Drive sharing dialog in your app.

Create and open files using the Google Picker

Drive files can be opened from an application independently of the Drive UI. An application can easily fetch and display a list of files with the Google Picker as described in Open files using the Google Picker.

Select a file from a picker window

Use shortcuts

Applications can create shortcuts to data stored outside of Drive, in a different data store or cloud storage system. If you need to store files or file-like resources outside of Drive for any reason, shortcuts allow you to still list them in Google Drive.

Shortcuts behave a lot like files. They can be opened and created, indexed in search, and shared with other users. Unlike regular files, shortcuts do not contain any content. When synced to a desktop, shortcuts are opened as URLs in the user's browser. Synced shortcut files are assigned the .glink file extension.

For information and code samples for shortcuts, see Create a shortcut to a file.

Export and convert Google docs

The Drive platform allows developers to open, import, and export native Google Docs types such as Google Spreadsheets, Presentations, Documents, and Drawings. For instance, if your application is configured to open PDF files, then because Google Documents are exportable to PDF, users will be able to use your application to open those documents.

For a map of the supported formats and more detail about exporting and converting Google docs, see Open and convert Google Docs in your app.

Send feedback about...