---
title: "List pull requests files"
method: GET
path: "/repos/{owner}/{repo}/pulls/{pull_number}/files"
tags: ["pulls"]
---

# List pull requests files

`GET /repos/{owner}/{repo}/pulls/{pull_number}/files`

Lists the files in a specified pull request.

> [!NOTE]
> Responses include a maximum of 3000 files. The paginated response returns 30 files per page by default.

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 markdown body. Response will include `body`. This is the default if you do not pass any specific media type.
- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.
- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.
- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`.

## Path parameters

- `owner` string, required
- `repo` string, required
- `pull_number` integer, required

## Query parameters

- `per_page` integer
- `page` integer

## Response `200`

Response

- DiffEntry[]
  - `sha` string, nullable, required
  - `filename` string, required
  - `status` 'added' | 'removed' | 'modified' | 'renamed' | 'copied' | 'changed' | 'unchanged', required
  - `additions` integer, required
  - `deletions` integer, required
  - `changes` integer, required
  - `blob_url` string, uri, required
  - `raw_url` string, uri, required
  - `contents_url` string, uri, required
  - `patch` string
  - `previous_filename` string

## Other responses

- `422` — Validation failed, or the endpoint has been spammed.
- `500` — Internal Error
- `503` — Service unavailable

---

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