---
title: "Gets the blob of a repository."
method: GET
path: "/repos/{owner}/{repo}/git/blobs/{sha}"
tags: ["repository"]
---

# Gets the blob of a repository.

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

## Path parameters

- `owner` string, required
- `repo` string, required
- `sha` string, required

## Response `200`

GitBlobResponse

- GitBlobResponse — GitBlobResponse represents a git blob
  - `content` string — The content of the git blob (may be base64 encoded)
  - `encoding` string — The encoding used for the content (e.g., "base64")
  - `lfs_oid` string — The LFS object ID if this blob is stored in LFS
  - `lfs_size` integer — The size of the LFS object if this blob is stored in LFS
  - `sha` string — The SHA hash of the git blob
  - `size` integer — The size of the git blob in bytes
  - `url` string — The URL to access this git blob

## Other responses

- `400` — APIError is error format response
- `404` — APINotFound is a not found empty response

---

[API](https://skmtc.net/gitea/apis/gitea-api.md) · [All operations](https://skmtc.net/gitea/apis/gitea-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/gitea/gitea-api/revisions/350de506cefa/schema)
