Get a repository README

GET {{baseUrl}}/repos/:owner/:repo/readme?ref=<string>

Gets the preferred README for a repository.

READMEs support custom media types for retrieving the raw content or rendered HTML.

Request Params

KeyDatatypeRequiredDescription
refstringThe name of the commit/branch/tag. Default: the repository’s default branch (usually master)

RESPONSES

status: OK

{&quot;type&quot;:&quot;file&quot;,&quot;encoding&quot;:&quot;base64&quot;,&quot;size&quot;:5362,&quot;name&quot;:&quot;README.md&quot;,&quot;path&quot;:&quot;README.md&quot;,&quot;content&quot;:&quot;encoded content ...&quot;,&quot;sha&quot;:&quot;3d21ec53a331a6f037a91c368710b99387d012c1&quot;,&quot;url&quot;:&quot;https://api.github.com/repos/octokit/octokit.rb/contents/README.md&quot;,&quot;git_url&quot;:&quot;https://api.github.com/repos/octokit/octokit.rb/git/blobs/3d21ec53a331a6f037a91c368710b99387d012c1&quot;,&quot;html_url&quot;:&quot;https://github.com/octokit/octokit.rb/blob/master/README.md&quot;,&quot;download_url&quot;:&quot;https://raw.githubusercontent.com/octokit/octokit.rb/master/README.md&quot;,&quot;_links&quot;:{&quot;git&quot;:&quot;https://api.github.com/repos/octokit/octokit.rb/git/blobs/3d21ec53a331a6f037a91c368710b99387d012c1&quot;,&quot;self&quot;:&quot;https://api.github.com/repos/octokit/octokit.rb/contents/README.md&quot;,&quot;html&quot;:&quot;https://github.com/octokit/octokit.rb/blob/master/README.md&quot;}}