> ## Documentation Index
> Fetch the complete documentation index at: https://docs.blinkops.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Repository Content

Retrieves the contents of a file or directory from a GitHub repository.

<Note>
  External Documentation

  To learn more, visit the [GitHub documentation](https://docs.github.com/rest/reference/repos#get-repository-content).
</Note>

## Parameters

<div className="integrations-table">
  | Parameter  | Description                                                                                                                                                                                                                                                                                                                  |
  | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | Owner      | The account owner of the repository. The name is not case sensitive.                                                                                                                                                                                                                                                         |
  | Path       | Path to a specific file or folder within the repository. If the path isn't specified, the action wil be directed to the repository's root.<br /><br />`Note`: To return the content in its raw form, You **Must** use this parameter and specify a relative **file** path. Directories can't be retrieved in their raw form. |
  | Reference  | The name of the commit/branch/tag (Default - the repository’s default branch (usually `master`).                                                                                                                                                                                                                             |
  | Repo       | The name of the repository. The name is not case sensitive.                                                                                                                                                                                                                                                                  |
  | Return Raw | Select to return content in its raw form.<br /><br />`Note`: Supported only for files, not directories. To retrieve the raw content of a repository file, use the `Path` parameter and specify the relative file path.                                                                                                       |
</div>

## Example Output

```json theme={"dark"}
{
	"summary": "Response if content is a directory",
	"value": [
		{
			"_links": {
				"git": "https://api.github.com/repos/octokit/octokit.rb/git/blobs/fff6fe3a23bf1c8ea0692b4a883af99bee26fd3b",
				"html": "https://github.com/octokit/octokit.rb/blob/master/lib/octokit.rb",
				"self": "https://api.github.com/repos/octokit/octokit.rb/contents/lib/octokit.rb"
			},
			"download_url": "https://raw.githubusercontent.com/octokit/octokit.rb/master/lib/octokit.rb",
			"git_url": "https://api.github.com/repos/octokit/octokit.rb/git/blobs/fff6fe3a23bf1c8ea0692b4a883af99bee26fd3b",
			"html_url": "https://github.com/octokit/octokit.rb/blob/master/lib/octokit.rb",
			"name": "octokit.rb",
			"path": "lib/octokit.rb",
			"sha": "fff6fe3a23bf1c8ea0692b4a883af99bee26fd3b",
			"size": 625,
			"type": "file",
			"url": "https://api.github.com/repos/octokit/octokit.rb/contents/lib/octokit.rb"
		},
		{
			"_links": {
				"git": "https://api.github.com/repos/octokit/octokit.rb/git/trees/a84d88e7554fc1fa21bcbc4efae3c782a70d2b9d",
				"html": "https://github.com/octokit/octokit.rb/tree/master/lib/octokit",
				"self": "https://api.github.com/repos/octokit/octokit.rb/contents/lib/octokit"
			},
			"download_url": null,
			"git_url": "https://api.github.com/repos/octokit/octokit.rb/git/trees/a84d88e7554fc1fa21bcbc4efae3c782a70d2b9d",
			"html_url": "https://github.com/octokit/octokit.rb/tree/master/lib/octokit",
			"name": "octokit",
			"path": "lib/octokit",
			"sha": "a84d88e7554fc1fa21bcbc4efae3c782a70d2b9d",
			"size": 0,
			"type": "dir",
			"url": "https://api.github.com/repos/octokit/octokit.rb/contents/lib/octokit"
		}
	]
}
```

## Workflow Library Example

[Get Repository Content with Github and Send Results Via Email](https://library.blinkops.com/workflows/get-repository-content-with-github-and-send-results-via-email)

<div className="iframe-wrapper">
  <div className="iframe-media">
    <img src="https://mintcdn.com/blinkops-2/ojHYuDeYX5FWuN8a/img/Icons/play-box.svg?fit=max&auto=format&n=ojHYuDeYX5FWuN8a&q=85&s=b8af968e71438a9499c3223c9bd29fb2" alt="Workflow Library" width="16" height="16" data-path="img/Icons/play-box.svg" />

    Preview this Workflow on desktop
  </div>

  <iframe className="iframe" src="https://library.blinkops.com/workflows/get-repository-content-with-github-and-send-results-via-email/canvas" />
</div>
