Skip to main content
POST
/
api
/
github
/
repos
/
commits
/github/repos/commits
curl --request POST \
  --url https://api.anysite.io/api/github/repos/commits \
  --header 'Content-Type: application/json' \
  --header 'access-token: <api-key>' \
  --data '
{
  "repo": "<string>",
  "count": 2,
  "timeout": 300,
  "branch": "main"
}
'
[
  {
    "sha": "<string>",
    "@type": "@github_repo_commit",
    "text": "",
    "author": {
      "@type": "@github_repo_commit_author",
      "name": "",
      "email": "",
      "date": "",
      "login": "<string>",
      "id": 123,
      "image": "<string>"
    },
    "committer": {
      "@type": "@github_repo_commit_author",
      "name": "",
      "email": "",
      "date": "",
      "login": "<string>",
      "id": 123,
      "image": "<string>"
    },
    "parents": [],
    "comment_count": 0,
    "is_verified": false,
    "web_url": ""
  }
]

Authorizations

access-token
string
header
required

API token from the dashboard

Headers

access-token
string
required

Body

application/json
repo
string
required

Repository in 'owner/name' format or full GitHub URL

Minimum string length: 1
Examples:

"facebook/react"

"https://github.com/torvalds/linux"

count
integer
required

Number of commits to return

Required range: x >= 1
timeout
integer
default:300

Max scrapping execution timeout (in seconds)

Required range: 20 <= x <= 1500
branch
string | null

Branch name, tag, or commit SHA to list commits from

Example:

"main"

Response

Successful Response

sha
string
required
@type
string
default:@github_repo_commit
text
string
default:""
author
GithubRepoCommitAuthor · object
committer
GithubRepoCommitAuthor · object
parents
string[]
comment_count
integer
default:0
is_verified
boolean
default:false
web_url
string
default:""