- [HTTP request](https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/get#body.HTTP_TEMPLATE)
- [Path parameters](https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/get#body.PATH_PARAMETERS)
- [Query parameters](https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/get#body.QUERY_PARAMETERS)
- [Request body](https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/get#body.request_body)
- [Response body](https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/get#body.response_body)
- [Authorization scopes](https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/get#body.aspect)
- [Try it!](https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/get#try-it)

Gets the latest version of the specified document.

### HTTP request

`GET https://docs.googleapis.com/v1/documents/{documentId}`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `documentId` | `string` The ID of the document to retrieve. |

### Query parameters

| Parameters ||
|---|---|
| `suggestionsViewMode` | ``enum (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#SuggestionsViewMode`)`` The suggestions view mode to apply to the document. This allows viewing the document with all suggestions inline, accepted or rejected. If one is not specified, `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#SuggestionsViewMode` is used. |
| `includeTabsContent` | `boolean` Whether to populate the `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#Document.FIELDS.tabs` field instead of the text content fields like `body` and `documentStyle` on `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#Document`. - When `true`: Document content populates in the `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#Document.FIELDS.tabs` field instead of the text content fields in `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#Document`. - When `false`: The content of the document's first tab populates the content fields in `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#Document` excluding `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#Document.FIELDS.tabs`. If a document has only one tab, then that tab is used to populate the document content. `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#Document.FIELDS.tabs` will be empty. If you use a field mask that references the `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#Document.FIELDS.tabs` field (or any subfield), the API implicitly treats the request as if you set `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/get#body.QUERY_PARAMETERS.include_tabs_content` to `true`. |
| `commentsViewMode` | ``enum (`https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#CommentsViewMode`)`` The comments view mode to apply to the document. This allows viewing the document with comments omitted or included. If one is not specified, `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#CommentsViewMode` is used. If you set `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/get#body.QUERY_PARAMETERS.comments_view_mode` to any value, you must also set `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/get#body.QUERY_PARAMETERS.include_tabs_content` to `true` or use a field mask that references the `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#Document.FIELDS.tabs` field (or any subfield). If you set `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/get#body.QUERY_PARAMETERS.comments_view_mode` to `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#CommentsViewMode.ENUM_VALUES.COMMENTS_VIEW_MODE_INCLUDED`, you must also explicitly set `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/get#body.QUERY_PARAMETERS.suggestions_view_mode` to `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#SuggestionsViewMode.ENUM_VALUES.SUGGESTIONS_INLINE`. If you set `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/get#body.QUERY_PARAMETERS.comments_view_mode` to `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#CommentsViewMode.ENUM_VALUES.COMMENTS_VIEW_MODE_INCLUDED` or `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#CommentsViewMode.ENUM_VALUES.COMMENTS_VIEW_MODE_DEFAULT_FOR_CURRENT_ACCESS`, you may not set `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents/get#body.QUERY_PARAMETERS.suggestions_view_mode` to `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#SuggestionsViewMode.ENUM_VALUES.PREVIEW_WITHOUT_SUGGESTIONS` or `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#SuggestionsViewMode.ENUM_VALUES.PREVIEW_SUGGESTIONS_ACCEPTED`. |

### Request body

The request body must be empty.

### Response body

If successful, the response body contains an instance of `https://developers.google.com/workspace/docs/api/reference/rest/v1/documents#Document`.

### Authorization scopes

Requires one of the following OAuth scopes:

- `https://www.googleapis.com/auth/documents`
- `https://www.googleapis.com/auth/documents.readonly`
- `https://www.googleapis.com/auth/drive`
- `https://www.googleapis.com/auth/drive.readonly`
- `https://www.googleapis.com/auth/drive.file`

For more information, see the [Authorization guide](https://developers.google.com/workspace/guides/configure-oauth-consent).