---
title: "Get a file from a repository"
method: GET
path: "/repos/{owner}/{repo}/raw/{filepath}"
tags: ["repository"]
---

# Get a file from a repository

`GET /repos/{owner}/{repo}/raw/{filepath}`

## Path parameters

- `owner` string, required
- `repo` string, required
- `filepath` string, required

## Query parameters

- `ref` string

## Response `200`

Returns raw file content.

## Other responses

- `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/versions/350de506cefa/schema)
