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.

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%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).

The fastest way to see the full response is the playground: it runs this endpoint with your account and shows the exact JSON.