Skip to content

Get repository contributors

GET /api/v5/repos/{owner}/{repo}/contributors

Queries the contributor information of the specified repository. It returns each contributor's name, contribution count, and email, and supports filtering by committer (committers) or author (authors) type, making it easy to see who contributed to the repository code.

Access token support

  • AtomGit user access tokens (AtomGit user access tokens)

Anonymous access

This endpoint allows anonymous access.

Request parameters

Parameter Location Type Required Description
owner path string Yes Namespace address the repository belongs to (enterprise, organization, or personal path)
repo path string Yes Repository path (path)
access_token query string No User authorization code (optional; can be omitted for anonymous access)
type query string No Contributor type; enum: committers / authors

Response parameters

The endpoint returns an array whose elements are contributor information objects, with the following fields:

Field Type Always returned Nullable Description
name string Yes No Contributor name
contributions integer Yes No Contribution count
email string Yes No Contributor email

Error responses

This endpoint does not define a business error response body; failures are expressed through HTTP status codes. See "HTTP response status codes" below.

HTTP response status codes

Status code Description
200 Success (OK)
401 Authentication required (Requires authentication)
403 Forbidden
404 Resource not found (Not Found)
429 Too many requests; rate limit triggered
500 Internal system error

Request example

Parameter notes

Replace <owner> with the namespace address the repository belongs to (enterprise, organization, or personal path); replace <repo> with the repository path (path).

This endpoint allows anonymous access, so the examples do not need to include a token. To include one, append ?access_token=<token> to the URL.

cURL

curl -X GET 'https://api.atomgit.com/api/v5/repos/<owner>/<repo>/contributors' \
  -H 'Accept: application/json'

JavaScript

// Native fetch (Node.js 18+ / browser)
const response = await fetch(
  "https://api.atomgit.com/api/v5/repos/<owner>/<repo>/contributors",
  {
    headers: {
      "Accept": "application/json",
    },
  }
);

if (!response.ok) {
  throw new Error(`Request failed: ${response.status}`);
}

const data = await response.json();
console.log(data);

Python

import requests

resp = requests.get(
    "https://api.atomgit.com/api/v5/repos/<owner>/<repo>/contributors",
    headers={
        "Accept": "application/json",
    },
    timeout=10,
)
resp.raise_for_status()

print(resp.json())

Response example

Status code: 200

[
  {
    "name": "dengmengmian",
    "contributions": 3,
    "email": "my@dengmengmian.com"
  }
]

Error codes

Error code Description
401 Unauthenticated or invalid credentials (missing/invalid access credentials)
400 Invalid parameters or the request cannot be parsed
404 The requested path does not exist
405 Request method not supported
429 Too many requests; rate limit triggered
500 Internal system error

Markdown source: View on AtomGit·Content from the open-source project gitcode-dev/atomgit-api-doc