---
title: "Get a blob"
method: GET
path: "/repos/{owner}/{repo}/git/blobs/{file_sha}"
tags: ["git"]
---

# Get a blob

`GET /repos/{owner}/{repo}/git/blobs/{file_sha}`

The `content` in the response will always be Base64 encoded.

This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."

- **`application/vnd.github.raw+json`**: Returns the raw blob data.
- **`application/vnd.github+json`**: Returns a JSON representation of the blob with `content` as a base64 encoded string. This is the default if no media type is specified.

**Note** This endpoint supports blobs up to 100 megabytes in size.

## Path parameters

- `owner` string, required
- `repo` string, required
- `file_sha` string, required

## Response `200`

Response

- Blob — Blob
  - `content` string, required
  - `encoding` string, required
  - `url` string, uri, required
  - `sha` string, required
  - `size` integer, nullable, required
  - `node_id` string, required
  - `highlighted_content` string

## Other responses

- `403` — Forbidden
- `404` — Resource not found
- `409` — Conflict
- `422` — Validation failed, or the endpoint has been spammed.

---

[API](https://skmtc.net/github/apis/github-v3-rest-api-3.md) · [All operations](https://skmtc.net/github/apis/github-v3-rest-api-3/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/github/github-v3-rest-api-3/versions/dc0584ac4e13/schema)
