---
title: "GitHub API: Repository Files | Perceptlayer"
description: "Repository Files from GitHub as JSON. 1 credit per successful call."
url: https://perceptlayer.com/apis/github/repository-files
---

[APIs](https://perceptlayer.com/apis) / [GitHub](https://perceptlayer.com/apis/github) / Repository Files

# GitHub: Repository Files

Repository Files from GitHub as JSON. 1 credit per successful call.

GET `/v1/github/repository-files`

## Parameters

Send parameters in the query string.

| Parameter | Type | Required | Allowed values |
| --- | --- | --- | --- |
| `owner` | string | Required | Up to 39 characters |
| `repo` | string | Required | Up to 100 characters |
| `path` | string | Optional | Up to 400 characters |
| `ref` | string | Optional | Up to 255 characters |

## Example request

cURL shell 

```
curl "https://api.perceptlayer.com/v1/github/repository-files?owner=laravel&repo=framework&path=src%2FIlluminate&ref=13.x" \
  -H "X-API-Key: $API_KEY"
```

[Run this endpoint in the playground](https://perceptlayer.com/apis/github?try=repository-files#playground) with your own parameters. 1 credit per successful call; failed calls are free.
