APIs / GitHub / Repository Compare Patch

GitHub: Repository Compare Patch

Repository Compare Patch from GitHub as JSON. 1 credit per successful call.

GET /v1/github/repository-compare-patch

Parameters

Send parameters in the query string.

ParameterTypeRequiredAllowed values
ownerstringRequiredUp to 39 characters
repostringRequiredUp to 100 characters
basestringRequiredUp to 255 characters
headstringRequiredUp to 255 characters

Example request

GitHub
GET/v1/github/repository-compare-patch?owner=laravel&repo=framework&base=12.x&head=13.x
{
  "search_parameters": {
    "engine": "github_compare_patch",
    "owner": "laravel",
    "repo": "framework",
    "base": "12.x",
    "head": "13.x"
  },
  "warn_limited_results": true,
  "incomplete_results": true,
  "repository": "laravel/framework",
  "range": "12.x...13.x",
  "patch": "From 6f0c2d066b2af3cb486b247406e3dc535d24af5f Mon Sep 17 00:00:00 2001\nFrom: Mior Muhammad Zaki <crynobone@gmail.com>\nDate: Wed, 19 Feb 2025 14:15:17 +0800\nSubject: [PATCH 0001/1689] update `bin/split.sh`\n\nSigned-off-by: Mior Muhammad Zaki …",
  "size": 5242880,
  "diff_count": 1797,
  "truncated": true
}
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 9 fields, read from a recorded call. The recording leaves out fields that were empty, so a live call can return more.

FieldType
search_parametersobject
warn_limited_resultsboolean
incomplete_resultsboolean
repositorystring
rangestring
patchstring
sizeinteger
diff_countinteger
truncatedboolean