GitHub user pull requests API
Pull requests a user authored across public repositories, newest first.
GET /v1/github/users/{handle}/pull-requests1 credit per callRefunded on failureimport os, requests
res = requests.get(
"https://api.groundsocial.dev/v1/github/users/sindresorhus/pull-requests",
headers={"Authorization": f"Bearer {os.environ['GROUNDSOCIAL_API_KEY']}"},
)
res.raise_for_status()
data = res.json()Response
200 · 1 credit{ "total_count": 2556, "incomplete_results": false, "items": [ { "id": 6636015118, "number": 4063, "title": "Document dense array assumption", "state": "open", "html_url": "https://github.com/sindresorhus/eslint-plugin-unicorn/pull/4063", "user": { "login": "sindresorhus", "id": 170270, "node_id": "MDQ6VXNlcjE3MDI3MA==", "avatar_url": "https://avatars.githubusercontent.com/u/170270?v=4", "html_url": "https://github.com/sindresorhus", "type": "User", "site_admin": false, "gravatar_id": "", "url": "https://api.github.com/users/sindresorhus", "followers_url": "https://api.github.com/users/sindresorhus/followers", "…": "9 more fields" }, "labels": [], "comments": 0, "created_at": "2026-11-26T22:18:46Z", "updated_at": "2026-11-26T22:18:46Z", "…": "23 more fields" }, "… 29 more" ], "page": 1, "per_page": 30, "has_more": true, "next_cursor": "eyJzIjoicHJzOmlzOnByIGF1dGhvcjpzaW5kcmVzb3JodXMiLCJwIjoyLCJuIjozMH0"}Parameters
| Name | Type | Description |
|---|---|---|
handlepath · required | string | GitHub username, with or without the @, or a profile URL. Example: torvalds. |
sincequery | string | Only items on or after this date (YYYY-MM-DD or ISO 8601). |
untilquery | string | Only items on or before this date (that whole UTC day for YYYY-MM-DD). |
per_pagequery | integer | Items per page, 1-100 (default 30). |
pagequery | integer | 1-indexed page number (default 1). |
afterquery | string | Cursor: the previous page’s next_cursor (instead of page). |
Response fields
200 with a GitHubIssueSearchResponse, in GitHub’s own REST v3 objects.
| Field | Type | Description |
|---|---|---|
total_count | integer | |
incomplete_results | boolean | |
items | GitHubIssue[] | |
page | integer | 1-indexed page this is. |
per_page | integer | |
has_more | boolean | |
next_cursor | string | null | Pass as after for the next page; null at the end. |
Status codes
| Status | Meaning |
|---|---|
200 | A page of pull requests. |
400 | Invalid input. Nothing was charged. |
401 | Missing or invalid API key. |
402 | Not enough credits, a spend cap was reached, or payment is required. |
403 | The target is private, or the account is suspended. |
404 | No public GitHub user, repository or issue by that name. |
429 | Too many requests. Wait for Retry-After seconds. |
503 | GitHub is temporarily unavailable. Retryable; nothing was charged. |
Every error has code, message, hint and retryable. All error codes
GitHub is a trademark of GitHub, Inc. We are not affiliated with or endorsed by GitHub.