GitHub Contributors API

The Contributors API from GitHub — 1 operation(s) for contributors.

Documentation

📖
Documentation
https://docs.github.com/en/rest/apps
📖
Documentation
https://docs.github.com/en/rest/codes-of-conduct/codes-of-conduct
📖
Documentation
https://docs.github.com/en/rest/emojis
📖
Documentation
https://docs.github.com/en/rest/gitignore
📖
Documentation
https://docs.github.com/en/rest/apps/installations
📖
Documentation
https://docs.github.com/en/rest/enterprise-admin
📖
Documentation
https://docs.github.com/en/rest/activity/events
📖
Documentation
https://docs.github.com/en/rest/orgs
📖
Documentation
https://docs.github.com/en/rest/rate-limit
📖
Documentation
https://docs.github.com/en/enterprise-cloud@latest/rest/scim
📖
Documentation
https://docs.github.com/en/rest/using-the-rest-api/getting-started-with-the-rest-api
📖
Documentation
https://docs.github.com/en/rest/teams
📖
Documentation
https://docs.github.com/en/rest/meta/meta
📖
Documentation
https://docs.github.com/en/rest/actions
📖
Documentation
https://docs.github.com/en/rest/branches
📖
Documentation
https://docs.github.com/en/rest/code-scanning
📖
Documentation
https://docs.github.com/en/rest/collaborators
📖
Documentation
https://docs.github.com/en/rest/dependabot
📖
Documentation
https://docs.github.com/en/rest/webhooks
📖
Documentation
https://docs.github.com/en/rest/pulls
📖
Documentation
https://docs.github.com/en/rest/git/tags
📖
Documentation
https://docs.github.com/en/rest/repos/autolinks
📖
Documentation
https://docs.github.com/en/rest/collaborators/invitations

Specifications

Other Resources

OpenAPI Specification

github-contributors-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  version: 1.1.4
  title: github-repos-api Contributors API
  description: 'Use the REST API to create, manage and control the workflow of public and

    private GitHub repositories.'
  license:
    name: MIT
    url: https://spdx.org/licenses/MIT
  termsOfService: https://docs.github.com/articles/github-terms-of-service
  contact:
    name: Support
    url: https://support.github.com/contact
servers:
- url: '{protocol}://{hostname}'
  variables:
    hostname:
      description: Self-hosted Enterprise Server hostname
      default: api.github.com
    protocol:
      description: Self-hosted Enterprise Server protocol
      default: https
tags:
- name: Contributors
paths:
  /repos/{owner}/{repo}/contributors:
    get:
      summary: GitHub List Repository Contributors
      description: 'Lists contributors to the specified repository and sorts them by the number of commits per contributor in descending order. This endpoint may return information that is a few hours old because the GitHub REST API caches contributor data to improve performance.


        GitHub identifies contributors by author email address. This endpoint groups contribution counts by GitHub user, which includes all associated email addresses. To improve performance, only the first 500 author email addresses in the repository link to GitHub users. The rest will appear as anonymous contributors without associated GitHub user information.'
      tags:
      - Contributors
      operationId: listRepositoryContributors
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/repos/repos#list-repository-contributors
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      - name: anon
        description: Set to `1` or `true` to include anonymous contributors in results.
        in: query
        required: false
        schema:
          type: string
        example: example_value
      - $ref: '#/components/parameters/per-page'
      - $ref: '#/components/parameters/page'
      - in: header
        name: Authorization
        schema:
          type: string
        example: example_value
      - in: header
        name: X-GitHub-Api-Version
        schema:
          type: string
          default: '2022-11-28'
        example: example_value
      - in: header
        name: Accept
        schema:
          type: string
          default: application/vnd.github+json
        example: example_value
      responses:
        '200':
          description: If repository contains content
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/contributor'
              examples:
                response-if-repository-contains-content:
                  $ref: '#/components/examples/contributor-items-response-if-repository-contains-content'
          headers:
            Link:
              $ref: '#/components/headers/link'
        '204':
          description: Response if repository is empty
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/not_found'
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        category: repos
        subcategory: repos
      x-api-evangelist-certified: '2025-07-16'
      x-api-naftiko-published: '2025-07-25'
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  responses:
    forbidden:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/basic-error'
    not_found:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/basic-error'
  examples:
    contributor-items-response-if-repository-contains-content:
      value:
      - login: octocat
        id: 1
        node_id: MDQ6VXNlcjE=
        avatar_url: https://github.com/images/error/octocat_happy.gif
        gravatar_id: ''
        url: https://api.github.com/users/octocat
        html_url: https://github.com/octocat
        followers_url: https://api.github.com/users/octocat/followers
        following_url: https://api.github.com/users/octocat/following{/other_user}
        gists_url: https://api.github.com/users/octocat/gists{/gist_id}
        starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo}
        subscriptions_url: https://api.github.com/users/octocat/subscriptions
        organizations_url: https://api.github.com/users/octocat/orgs
        repos_url: https://api.github.com/users/octocat/repos
        events_url: https://api.github.com/users/octocat/events{/privacy}
        received_events_url: https://api.github.com/users/octocat/received_events
        type: User
        site_admin: false
        contributions: 32
  headers:
    link:
      example: <https://api.github.com/resource?page=2>; rel="next", <https://api.github.com/resource?page=5>; rel="last"
      schema:
        type: string
  parameters:
    per-page:
      name: per_page
      description: The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-server@3.9/rest/using-the-rest-api/using-pagination-in-the-rest-api)."
      in: query
      schema:
        type: integer
        default: 30
    owner:
      name: owner
      description: The account owner of the repository. The name is not case sensitive.
      in: path
      required: true
      schema:
        type: string
    repo:
      name: repo
      description: The name of the repository without the `.git` extension. The name is not case sensitive.
      in: path
      required: true
      schema:
        type: string
    page:
      name: page
      description: The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-server@3.9/rest/using-the-rest-api/using-pagination-in-the-rest-api)."
      in: query
      schema:
        type: integer
        default: 1
  schemas:
    basic-error:
      title: Basic Error
      description: Basic Error
      type: object
      properties:
        message:
          type: string
          example: Example body text
        documentation_url:
          type: string
          example: https://api.github.com/repos/octocat/Hello-World
        url:
          type: string
          example: https://api.github.com/repos/octocat/Hello-World
        status:
          type: string
          example: open
    contributor:
      title: Contributor
      description: Contributor
      type: object
      properties:
        login:
          type: string
          example: octocat
        id:
          type: integer
          example: 42
        node_id:
          type: string
          example: '12345678'
        avatar_url:
          type: string
          format: uri
          example: https://api.github.com/repos/octocat/Hello-World
        gravatar_id:
          type: string
          example: '12345678'
        url:
          type: string
          format: uri
          example: https://api.github.com/repos/octocat/Hello-World
        html_url:
          type: string
          format: uri
          example: https://api.github.com/repos/octocat/Hello-World
        followers_url:
          type: string
          format: uri
          example: https://api.github.com/repos/octocat/Hello-World
        following_url:
          type: string
          example: https://api.github.com/repos/octocat/Hello-World
        gists_url:
          type: string
          example: https://api.github.com/repos/octocat/Hello-World
        starred_url:
          type: string
          example: https://api.github.com/repos/octocat/Hello-World
        subscriptions_url:
          type: string
          format: uri
          example: https://api.github.com/repos/octocat/Hello-World
        organizations_url:
          type: string
          format: uri
          example: https://api.github.com/repos/octocat/Hello-World
        repos_url:
          type: string
          format: uri
          example: https://api.github.com/repos/octocat/Hello-World
        events_url:
          type: string
          example: https://api.github.com/repos/octocat/Hello-World
        received_events_url:
          type: string
          format: uri
          example: https://api.github.com/repos/octocat/Hello-World
        type:
          type: string
          example: User
        site_admin:
          type: boolean
          example: true
        contributions:
          type: integer
          example: 42
        email:
          type: string
          example: octocat@github.com
        name:
          type: string
      required:
      - contributions
      - type
  securitySchemes:
    bearerHttpAuthentication:
      description: Bearer Token
      type: http
      scheme: Bearer
externalDocs:
  description: GitHub Enterprise Developer Docs
  url: https://docs.github.com/enterprise-server@3.9/rest/