v68

latestOpenAPI 3.0.3MITraw.githubusercontent.com2026-08-011,21696712.3 MB
repos

Get a repository README

Gets the preferred README for a repository.

This endpoint supports the following custom media types. For more information, see "Media types."

  • application/vnd.github.raw+json: Returns the raw file contents. This is the default if you do not specify a media type.
  • application/vnd.github.html+json: Returns the README in HTML. Markup languages are rendered to HTML using GitHub's open-source Markup library.
get/repos/{owner}/{repo}/readme

Path parameters

ownerstring required

The account owner of the repository. The name is not case sensitive.

repostring required

The name of the repository without the .git extension. The name is not case sensitive.

Query parameters

refstring

The name of the commit/branch/tag. Default: the repository’s default branch.

Response

Response

type'file' required
encodingstring required
sizeinteger required
namestring required
pathstring required
contentstring required
shastring required
urlstring uri required
git_urlstring uri nullable required
html_urlstring uri nullable required
download_urlstring uri nullable required
targetstring
submodule_git_urlstring

Example response

{
  "target": "\"actual/actual.md\"",
  "submodule_git_url": "\"git://example.com/defunkt/dotjs.git\""
}