---
title: "GET /files/{fileId}"
method: GET
path: "/files/{fileId}"
tags: ["files"]
---

# GET /files/{fileId}

`GET /files/{fileId}`

Gets a file's metadata or content by ID. For more information, see [Search for files and folders](https://developers.google.com/workspace/drive/api/guides/search-files). If you provide the URL parameter `alt=media`, then the response includes the file contents in the response body. Downloading content with `alt=media` only works if the file is stored in Drive. To download Google Docs, Sheets, and Slides use [`files.export`](https://developers.google.com/workspace/drive/api/reference/rest/v3/files/export) instead. For more information, see [Download and export files](https://developers.google.com/workspace/drive/api/guides/manage-downloads).

## Path parameters

- `fileId` string, required

## Query parameters

- `acknowledgeAbuse` boolean
- `includeLabels` string
- `includePermissionsForView` string
- `supportsAllDrives` boolean
- `supportsTeamDrives` boolean

## Response `200`

Successful response

---

[API](https://skmtc.dev/google/apis/drive.md) · [All operations](https://skmtc.dev/google/apis/drive/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/google/drive/revisions/f3444ff3fae2/schema)
