100 free credits. No credit card required. Get a key

GitHub issue comments API

Comments on an issue or pull request, oldest first, paginated.

GET /v1/github/repos/{owner}/{repo}/issues/{number}/comments1 credit per callRefunded on failure
import os, requests

res = requests.get(
    "https://api.groundsocial.dev/v1/github/repos/facebook/react/issues/1/comments",
    headers={"Authorization": f"Bearer {os.environ['GROUNDSOCIAL_API_KEY']}"},
)
res.raise_for_status()
data = res.json()
Response
200 · 1 credit
{
"items": [
{
"id": 18857724,
"html_url": "https://github.com/react/react/pull/1#issuecomment-18857724",
"user": {
"login": "zpao",
"id": 8445,
"node_id": "MDQ6VXNlcjg0NDU=",
"avatar_url": "https://avatars.githubusercontent.com/u/8445?v=4",
"html_url": "https://github.com/zpao",
"type": "User",
"site_admin": true,
"gravatar_id": "",
"url": "https://api.github.com/users/zpao",
"followers_url": "https://api.github.com/users/zpao/followers",
"following_url": "https://api.github.com/users/zpao/following{/other_user}",
"gists_url": "https://api.github.com/users/zpao/gists{/gist_id}",
"starred_url": "https://api.github.com/users/zpao/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/zpao/subscriptions",
"…": "5 more fields"
},
"body": "A++, merge away when you're ready\n",
"created_at": "2013-06-03T17:39:44Z",
"updated_at": "2013-06-03T17:39:44Z",
"author_association": "CONTRIBUTOR",
"reactions": {
"total_count": 0,
"url": "https://api.github.com/repos/react/react/issues/comments/18857724/reactions",
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
},
"url": "https://api.github.com/repos/react/react/issues/comments/18857724",
"issue_url": "https://api.github.com/repos/react/react/issues/1",
"node_id": "MDEyOklzc3VlQ29tbWVudDE4ODU3NzI0",
"performed_via_github_app": null,
"minimized": null
},
{
"id": 18857922,
"html_url": "https://github.com/react/react/pull/1#issuecomment-18857922",
"user": {
"login": "petehunt",
"id": 239742,
"node_id": "MDQ6VXNlcjIzOTc0Mg==",
"avatar_url": "https://avatars.githubusercontent.com/u/239742?v=4",
"html_url": "https://github.com/petehunt",
"type": "User",
"site_admin": false,
"gravatar_id": "",
"url": "https://api.github.com/users/petehunt",
"followers_url": "https://api.github.com/users/petehunt/followers",
"following_url": "https://api.github.com/users/petehunt/following{/other_user}",
"gists_url": "https://api.github.com/users/petehunt/gists{/gist_id}",
"starred_url": "https://api.github.com/users/petehunt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/petehunt/subscriptions",
"…": "5 more fields"
},
"body": "I like this much better than our current test system.\n\nBut isn't it masking the fact that …",
"created_at": "2013-06-03T17:43:01Z",
"updated_at": "2013-06-03T17:43:01Z",
"author_association": "CONTRIBUTOR",
"reactions": {
"total_count": 0,
"url": "https://api.github.com/repos/react/react/issues/comments/18857922/reactions",
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
},
"url": "https://api.github.com/repos/react/react/issues/comments/18857922",
"issue_url": "https://api.github.com/repos/react/react/issues/1",
"node_id": "MDEyOklzc3VlQ29tbWVudDE4ODU3OTIy",
"performed_via_github_app": null,
"minimized": null
},
"… 5 more"
],
"page": 1,
"per_page": 30,
"has_more": false,
"next_cursor": null
}

Parameters

NameTypeDescription
ownerpath · requiredstringRepository owner (user or organisation). Example: vercel.
repopath · requiredstringRepository name. Example: next.js.
numberpath · requiredstringIssue or pull request number. Example: 1.
sincequerystringOnly comments updated at or after this date.
per_pagequeryintegerItems per page, 1-100 (default 30).
pagequeryinteger1-indexed page number (default 1).
afterquerystringCursor: the previous page’s next_cursor (instead of page).
Response fields

200 with a GitHubCommentsResponse, in GitHub’s own REST v3 objects.

FieldTypeDescription
itemsGitHubComment[]
pageinteger1-indexed page this is.
per_pageinteger
has_moreboolean
next_cursorstring | nullPass as after for the next page; null at the end.
Status codes
StatusMeaning
200A page of comments.
400Invalid input. Nothing was charged.
401Missing or invalid API key.
402Not enough credits, a spend cap was reached, or payment is required.
403The target is private, or the account is suspended.
404No public GitHub user, repository or issue by that name.
429Too many requests. Wait for Retry-After seconds.
503GitHub 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.