GitHub pull request

GET https://api.api.sh/github/v1/repository/pull
1 credit / call jobs & b2b try it in the playground →

One pull request: title, state (open, closed or merged), author, description, labels, assignees and requested reviewers, head and base branches, merge details (merged by, merge commit, mergeable state), commit, comment and review-comment counts, additions and deletions, the files changed (up to the first 100, each with status, additions, deletions and patch) and the reviews (reviewer, state, text, time).

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

nametypedescription
urlrequired string Pull request URL (https://github.com/owner/repo/pull/123), or owner/repo together with number. Example: https://github.com/facebook/react/pull/28000
number integer Pull request number, when url is only the repository.

Every endpoint also takes fresh, raw, fields (see lean responses and caching).

Example

curl "https://api.api.sh/github/v1/repository/pull?url=https%3A%2F%2Fsiteproxy.ruqli.workers.dev%3A443%2Fhttps%2Fgithub.com%2Ffacebook%2Freact%2Fpull%2F28000" \
  -H "x-api-key: $APISH_KEY"

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","number": 28000,"id": 1686710985,"title": "Convert ReactFreshMultipleRenderer to createRoot","url": "https://github.com/react/react/pull/28000","state": "merged","open": false,"draft": false,"locked": false,"author": {"login": "eps1lon","id": 12292047,"avatar": "https://avatars.githubusercontent.com/u/12292047?v=4","url": "https://github.com/eps1lon"},"author_association": "COLLABORATOR","body": null,"labels": [{"id": 196858374,"name": "CLA Signed","color": "e7e7e7","description": null},{"id": 1775958285,"name": "React Core Team","color": "9149d1","description": "Opened by a member of the React Core Team"}],"assignees": [],"requested_reviewers": [],"milestone": null,"created_at": "2024-01-19T11:29:48Z","updated_at": "2026-08-07T10:49:22Z","closed_at": "2024-01-19T17:21:15Z","merged": true,"merged_at": "2024-01-19T17:21:15Z","merged_by": "eps1lon","merge_commit_sha": "4c58fc2ad8f1055f9b543147b283e5a3f795fd27","mergeable": null,"mergeable_state": "unknown","head": {"ref": "test/create-root/ReactFreshMultipleRenderer","sha": "51b56dbc37d6fce3a7ee4168c9ae37151b66c83a","repo": "eps1lon/react"},"base": {"ref": "main","sha": "feed8f3f95836a99eeaf5dc64d1c9ed62217c1de","repo": "react/react"},"commits": 1,"comments": 6,"review_comments": 0,"additions": 7,"deletions": 3,"changed_files": 1,"files_count": 1,"files_truncated": false,"files": [{"filename": "packages/react-refresh/src/__tests__/ReactFreshMultipleRenderer-test.internal.js","status": "modified","additions": 7,"deletions": 3,"changes": 10,"previous_filename": null,"url": "https://github.com/react/react/blob/51b56dbc37d6fce3a7ee4168c9ae37151b66c83a/packages%2Freact-refresh%2Fsrc%2F__tests__%2FReactFreshMultiple…","patch": "@@ -16,7 +16,8 @@ if (__DEV__) {\n   ReactFreshRuntime = require('react-refresh/runtime');\n   ReactFreshRuntime.injectIntoGlobalHook(global);…"}],"reviews_count": 2,"reviews": [{"id": 1833035135,"user": {"login": "rickhanlonii","id": 2440089,"avatar": "https://avatars.githubusercontent.com/u/2440089?u=fce440640002476dda4407828fe8ed0e8885823e&v=4","url": "https://github.com/rickhanlonii"},"state": "APPROVED","body": "Nice and easy","submitted_at": "2024-01-19T15:28:22Z","commit_id": "51b56dbc37d6fce3a7ee4168c9ae37151b66c83a","url": "https://github.com/react/react/pull/28000#pullrequestreview-1833035135"},{"id": 1833046751,"user": {"login": "rickhanlonii","id": 2440089,"avatar": "https://avatars.githubusercontent.com/u/2440089?u=fce440640002476dda4407828fe8ed0e8885823e&v=4","url": "https://github.com/rickhanlonii"},"state": "APPROVED","body": null,"submitted_at": "2024-01-19T15:32:01Z","commit_id": "51b56dbc37d6fce3a7ee4168c9ae37151b66c83a","url": "https://github.com/react/react/pull/28000#pullrequestreview-1833046751"}],"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.