GitHub commit
GET https://api.api.sh/github/v1/repository/commit
One commit with stats, files and patches. Every response includes credits_used: the credits this call cost.
Part of the GitHub API: 44 endpoints with prices, use cases and example responses.
Parameters
| name | type | description |
|---|---|---|
urlrequired | string | Repository: owner/repo or a github.com URL (repo works too). Example: https://github.com/facebook/react |
sharequired | string | Commit SHA, branch or tag. Example: main |
Every endpoint also takes fresh, raw, fields (see lean responses and caching).
Example
curl "https://api.api.sh/github/v1/repository/commit?url=https%3A%2F%2Fsiteproxy.ruqli.workers.dev%3A443%2Fhttps%2Fgithub.com%2Ffacebook%2Freact&sha=main" \
-H "x-api-key: $APISH_KEY" import os, requests
res = requests.get(
"https://api.api.sh/github/v1/repository/commit",
params={"url": "https://github.com/facebook/react", "sha": "main"},
headers={"x-api-key": os.environ["APISH_KEY"]},
timeout=120,
)
res.raise_for_status()
data = res.json() const url = new URL("https://api.api.sh/github/v1/repository/commit");
url.searchParams.set("url", "https://github.com/facebook/react");
url.searchParams.set("sha", "main");
const res = await fetch(url, { headers: { "x-api-key": process.env.APISH_KEY } });
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
const data = await res.json(); Response
A JSON object with the fields described above, plus raw (the source's own data), cached, fetched_at and credits_used. Errors return {"success": false, "error": "…"} with the HTTP status (see errors). A lookup that ran but found nothing (404) costs the price above; refused calls and errors on our side are free (what's charged).
Example response (real call, trimmed: lists cut to 2 items, long text shortened, raw left out)
{"repo": "facebook/react","sha": "76baa3b5434fad315ece9cfd4d20d7a8d6c34a25","url": "https://github.com/react/react/commit/76baa3b5434fad315ece9cfd4d20d7a8d6c34a25","message": "[DevTools] Find non-resource hoistable instances in the facade (#38067)","author": {"name": "Ruslan Lesiutin","email": "name@example.com","date": "2026-10-31T13:54:20Z","login": "hoxyq","avatar": "https://avatars.githubusercontent.com/u/28902667?v=4"},"committer": {"name": "GitHub","email": "name@example.com","date": "2026-10-31T13:54:20Z","login": "web-flow"},"parents": ["5122860054c004e841e51688153508b1a179d9c9"],"comment_count": 0,"verified": true,"verification_reason": "valid","tree": "84e4f033b259f58da8693eb0acebb554ddbdbe3b","stats": {"total": 76,"additions": 71,"deletions": 5},"files": [{"filename": "packages/react-devtools-facade/src/DevToolsFacadeTreeTools.js","status": "modified","additions": 6,"deletions": 5,"changes": 11,"patch": "@@ -402,11 +402,12 @@ export function createTreeTools(\n \n if (fiber.tag === HostHoistable) {\n const resource = fiber.memoizedState…","previous_filename": null},{"filename": "packages/react-devtools-facade/src/__tests__/DevToolsFacade-test.js","status": "modified","additions": 65,"deletions": 0,"changes": 65,"patch": "@@ -1873,6 +1873,71 @@ describe('react-devtools-facade', () => {\n });\n });\n \n+ it('returns the host component for hoistables wi…","previous_filename": null}],"node_id": "C_kwDOAJy2KtoAKDc2YmFhM2I1NDM0ZmFkMzE1ZWNlOWNmZDRkMjBkN2E4ZDZjMzRhMjU","cached": false,"credits_used": 1} The fastest way to see the full response is the playground: it runs this endpoint with your account and shows the exact JSON.