> ## Documentation Index
> Fetch the complete documentation index at: https://docs.anysite.io/llms.txt
> Use this file to discover all available pages before exploring further.

# /github/commits

> Get a GitHub commit by sha, branch, or tag within a repository

**Price:** 5 credits

**⚠️ Common errors:** 412: Commit not found



## OpenAPI

````yaml /openapi/developer-data.json post /api/github/commits
openapi: 3.1.0
info:
  title: Any Site API
  description: >+
    Any Site API provides programmatic access to data from LinkedIn, Instagram,
    Twitter, and other platforms.


    ## Authentication


    All API endpoints require an `access-token` header with a valid API token.
    Tokens can be created in the [dashboard](https://app.anysite.io/).


    ## Pricing


    Each endpoint has a credit cost listed in its description. Credits are
    deducted from your token balance per request.

  version: 0.0.1
servers: []
security:
  - AccessToken: []
paths:
  /api/github/commits:
    post:
      tags:
        - /github
      summary: /github/commits
      description: |-
        Get a GitHub commit by sha, branch, or tag within a repository

        **Price:** 5 credits

        **⚠️ Common errors:** 412: Commit not found
      operationId: __api_github_commits_post
      parameters:
        - name: access-token
          in: header
          required: true
          schema:
            anyOf:
              - type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GithubCommitPayload'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/GithubCommit'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    GithubCommitPayload:
      properties:
        timeout:
          type: integer
          maximum: 1500
          minimum: 20
          default: 300
        commit:
          type: string
          minLength: 1
      type: object
      required:
        - commit
    GithubCommit:
      properties:
        '@type':
          type: string
          default: GithubCommit
        sha:
          type: string
        text:
          type: string
          default: ''
        author:
          anyOf:
            - $ref: '#/components/schemas/GithubCommitUser'
            - type: 'null'
        committer:
          anyOf:
            - $ref: '#/components/schemas/GithubCommitUser'
            - type: 'null'
        authored_at:
          type: string
          default: ''
        committed_at:
          type: string
          default: ''
        parents:
          items:
            type: string
          type: array
          default: []
        addition_count:
          type: integer
          default: 0
        deletion_count:
          type: integer
          default: 0
        total_count:
          type: integer
          default: 0
        is_verified:
          type: boolean
          default: false
        verification_reason:
          anyOf:
            - type: string
            - type: 'null'
        comment_count:
          type: integer
          default: 0
        files:
          items:
            $ref: '#/components/schemas/GithubCommitFile'
          type: array
          default: []
        web_url:
          type: string
          default: ''
      type: object
      required:
        - sha
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
      type: object
    GithubCommitUser:
      properties:
        '@type':
          type: string
          default: GithubCommitUser
        name:
          anyOf:
            - type: string
            - type: 'null'
        email:
          anyOf:
            - type: string
            - type: 'null'
        login:
          anyOf:
            - type: string
            - type: 'null'
        id:
          anyOf:
            - type: integer
            - type: 'null'
        image:
          anyOf:
            - type: string
            - type: 'null'
      type: object
    GithubCommitFile:
      properties:
        '@type':
          type: string
          default: GithubCommitFile
        filename:
          type: string
        status:
          type: string
          default: ''
        addition_count:
          type: integer
          default: 0
        deletion_count:
          type: integer
          default: 0
        change_count:
          type: integer
          default: 0
      type: object
      required:
        - filename
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
        msg:
          type: string
        type:
          type: string
        input: {}
        ctx:
          type: object
      type: object
      required:
        - loc
        - msg
        - type
  securitySchemes:
    AccessToken:
      type: apiKey
      in: header
      name: access-token
      description: API token from the dashboard

````