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.

ParameterTypeRequiredAllowed values
ownerstringRequiredUp to 39 characters
repostringRequiredUp to 100 characters
pathstringOptionalUp to 400 characters
refstringOptionalUp to 255 characters

Example request

GitHub
GET/v1/github/repository-files?owner=laravel&repo=framework&path=src%2FIlluminate&ref=13.x
{
  "search_parameters": {
    "engine": "github_repository_files",
    "owner": "laravel",
    "repo": "framework",
    "path": "src/Illuminate",
    "ref": "13.x"
  },
  "contents": [
    {
      "name": "Auth",
      "path": "src/Illuminate/Auth",
      "sha": "74991a56d8e0cf7b915c6249595c97202c95acbc",
      "size": 0,
      "url": "https://api.github.com/repos/laravel/framework/contents/src/Illuminate/Auth?ref=13.x",
      "html_url": "https://github.com/laravel/framework/tree/13.x/src/Illuminate/Auth",
      "git_url": "https://api.github.com/repos/laravel/framework/git/trees/74991a56d8e0cf7b915c6249595c97202c95acbc",
      "type": "dir",
      "_links": {
        "self": "https://api.github.com/repos/laravel/framework/contents/src/Illuminate/Auth?ref=13.x",
        "git": "https://api.github.com/repos/laravel/framework/git/trees/74991a56d8e0cf7b915c6249595c97202c95acbc",
        "html": "https://github.com/laravel/framework/tree/13.x/src/Illuminate/Auth"
      }
    },
    {
      "name": "Broadcasting",
      "path": "src/Illuminate/Broadcasting",
      "sha": "ac1ae8cf08230d636ab1d536d36d6cde0c2998c6",
      "size": 0,
      "url": "https://api.github.com/repos/laravel/framework/contents/src/Illuminate/Broadcasting?ref=13.x",
      "html_url": "https://github.com/laravel/framework/tree/13.x/src/Illuminate/Broadcasting",
      "git_url": "https://api.github.com/repos/laravel/framework/git/trees/ac1ae8cf08230d636ab1d536d36d6cde0c2998c6",
      "type": "dir",
      "_links": {
        "self": "https://api.github.com/repos/laravel/framework/contents/src/Illuminate/Broadcasting?ref=13.x",
        "git": "https://api.github.com/repos/laravel/framework/git/trees/ac1ae8cf08230d636ab1d536d36d6cde0c2998c6",
        "html": "https://github.com/laravel/framework/tree/13.x/src/Illuminate/Broadcasting"
      }
    },
    {
      "name": "Bus",
      "path": "src/Illuminate/Bus",
      "sha": "ef3b3f3504acbc120f5d15dd6cfb8553e380521c",
      "size": 0,
      "url": "https://api.github.com/repos/laravel/framework/contents/src/Illuminate/Bus?ref=13.x",
      "html_url": "https://github.com/laravel/framework/tree/13.x/src/Illuminate/Bus",
      "git_url": "https://api.github.com/repos/laravel/framework/git/trees/ef3b3f3504acbc120f5d15dd6cfb8553e380521c",
      "type": "dir",
      "_links": {
        "self": "https://api.github.com/repos/laravel/framework/contents/src/Illuminate/Bus?ref=13.x",
        "git": "https://api.github.com/repos/laravel/framework/git/trees/ef3b3f3504acbc120f5d15dd6cfb8553e380521c",
        "html": "https://github.com/laravel/framework/tree/13.x/src/Illuminate/Bus"
      }
    }
  ],
  "result_count": 38,
  "rate_limit": {
    "limit": 60,
    "remaining": 59,
    "used": 1,
    "reset": 1794492550
  }
}
200 OKJSONX-Credits-Used: 1
Recorded 12 Nov 2026 and shortened.

Run this endpoint in the playground with your own parameters. 1 credit per successful call; failed calls are free.

Response fields

The response has these 4 fields, read from a recorded call. The recording leaves out fields that were empty, so a live call can return more.

FieldType
search_parametersobject
contentsobject[]
result_countinteger
rate_limitobject