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

# Search commits across public GitHub repositories



## OpenAPI

````yaml /openapi.json post /github/search-commits
openapi: 3.1.0
info:
  title: Bridgly API
  description: >-
    Web scraping API for LinkedIn, X (Twitter) and Reddit. Authenticated
    endpoints accept a Bridgly API key (`bgly_…`) via `Authorization: Bearer
    <token>`.
  version: 1.0.0
servers:
  - url: https://api.bridgly.app
    description: Production
security: []
tags:
  - name: LinkedIn
    description: Scrape LinkedIn profiles, companies, posts, and search.
  - name: Reddit
    description: Scrape Reddit posts, subreddits, users, and search.
  - name: X (Twitter)
    description: Scrape tweets and search X.
  - name: GitHub
    description: >-
      Fetch GitHub profiles, pinned repos, contributions, repositories, stars,
      and projects via GitHub's GraphQL API.
paths:
  /github/search-commits:
    post:
      tags:
        - GitHub
      summary: Search commits across public GitHub repositories
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                query:
                  description: >-
                    Free-text search terms, matched against the default fields
                    for this search type, e.g. "web framework".
                  type: string
                owners:
                  description: Limit to these owners (users or orgs). Maps to `user:`.
                  type: array
                  items:
                    type: string
                repos:
                  description: Limit to these "owner/name" repositories. Maps to `repo:`.
                  type: array
                  items:
                    type: string
                author:
                  description: Commits authored by this GitHub user. Maps to `author:`.
                  type: string
                committer:
                  description: Commits committed by this GitHub user. Maps to `committer:`.
                  type: string
                authoredDate:
                  description: >-
                    Filter by author date. Provide any of gt / gte / lt / lte as
                    YYYY-MM-DD dates; combine a lower and upper bound for a
                    range.
                  type: object
                  properties:
                    gt:
                      description: Strictly after this date (YYYY-MM-DD).
                      anyOf:
                        - type: string
                          format: date
                          pattern: >-
                            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
                        - type: 'null'
                    gte:
                      description: On or after this date (YYYY-MM-DD).
                      anyOf:
                        - type: string
                          format: date
                          pattern: >-
                            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
                        - type: 'null'
                    lt:
                      description: Strictly before this date (YYYY-MM-DD).
                      anyOf:
                        - type: string
                          format: date
                          pattern: >-
                            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
                        - type: 'null'
                    lte:
                      description: On or before this date (YYYY-MM-DD).
                      anyOf:
                        - type: string
                          format: date
                          pattern: >-
                            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
                        - type: 'null'
                committedDate:
                  description: >-
                    Filter by commit date. Provide any of gt / gte / lt / lte as
                    YYYY-MM-DD dates; combine a lower and upper bound for a
                    range.
                  type: object
                  properties:
                    gt:
                      description: Strictly after this date (YYYY-MM-DD).
                      anyOf:
                        - type: string
                          format: date
                          pattern: >-
                            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
                        - type: 'null'
                    gte:
                      description: On or after this date (YYYY-MM-DD).
                      anyOf:
                        - type: string
                          format: date
                          pattern: >-
                            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
                        - type: 'null'
                    lt:
                      description: Strictly before this date (YYYY-MM-DD).
                      anyOf:
                        - type: string
                          format: date
                          pattern: >-
                            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
                        - type: 'null'
                    lte:
                      description: On or before this date (YYYY-MM-DD).
                      anyOf:
                        - type: string
                          format: date
                          pattern: >-
                            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
                        - type: 'null'
                hash:
                  description: Commits with this SHA (or prefix). Maps to `hash:`.
                  type: string
                merge:
                  description: >-
                    Only merge commits (true) or exclude them (false). Maps to
                    `merge:`.
                  type: boolean
                sort:
                  default: best-match
                  description: Sort field. Defaults to relevance ("best-match").
                  type: string
                  enum:
                    - best-match
                    - author-date
                    - committer-date
                order:
                  default: desc
                  description: Sort direction. Defaults to "desc".
                  type: string
                  enum:
                    - desc
                    - asc
                count:
                  default: 10
                  description: Number of results per page (1–10). Defaults to 10.
                  type: integer
                  minimum: 1
                  maximum: 10
                page:
                  default: 1
                  description: 1-based page number. Defaults to 1.
                  type: integer
                  minimum: 1
                  maximum: 9007199254740991
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  timeMs:
                    type: number
                    description: >-
                      Wall-clock time the request took to complete, in
                      milliseconds.
                  creditsCost:
                    type: number
                    description: Number of account credits this request consumed.
                  data:
                    type: object
                    properties:
                      query:
                        type: string
                        description: The compiled GitHub search query string that was run.
                      totalCount:
                        anyOf:
                          - type: number
                          - type: 'null'
                        description: >-
                          Total matches GitHub reports (approximate, and capped
                          at 1000 results).
                      commits:
                        type: array
                        items:
                          type: object
                          properties:
                            sha:
                              type: string
                              description: Full commit SHA.
                            message:
                              anyOf:
                                - type: string
                                - type: 'null'
                              description: Commit message.
                            url:
                              anyOf:
                                - type: string
                                - type: 'null'
                              description: Public GitHub URL of the commit.
                            apiUrl:
                              anyOf:
                                - type: string
                                - type: 'null'
                              description: GitHub API URL of the commit.
                            author:
                              anyOf:
                                - type: object
                                  properties:
                                    name:
                                      anyOf:
                                        - type: string
                                        - type: 'null'
                                      description: Git name, e.g. "Linus Torvalds".
                                    email:
                                      anyOf:
                                        - type: string
                                        - type: 'null'
                                      description: Git email address.
                                    date:
                                      anyOf:
                                        - type: string
                                        - type: 'null'
                                      description: ISO-8601 timestamp.
                                  required:
                                    - name
                                    - email
                                    - date
                                  additionalProperties: false
                                - type: 'null'
                              description: Git author of the commit.
                            authorLogin:
                              anyOf:
                                - type: string
                                - type: 'null'
                              description: Linked GitHub login of the author, or null.
                            committer:
                              anyOf:
                                - type: object
                                  properties:
                                    name:
                                      anyOf:
                                        - type: string
                                        - type: 'null'
                                      description: Git name, e.g. "Linus Torvalds".
                                    email:
                                      anyOf:
                                        - type: string
                                        - type: 'null'
                                      description: Git email address.
                                    date:
                                      anyOf:
                                        - type: string
                                        - type: 'null'
                                      description: ISO-8601 timestamp.
                                  required:
                                    - name
                                    - email
                                    - date
                                  additionalProperties: false
                                - type: 'null'
                              description: Git committer.
                            committerLogin:
                              anyOf:
                                - type: string
                                - type: 'null'
                              description: Linked GitHub login of the committer, or null.
                            commentCount:
                              anyOf:
                                - type: number
                                - type: 'null'
                              description: Number of comments.
                            repository:
                              type: object
                              properties:
                                id:
                                  anyOf:
                                    - type: number
                                    - type: 'null'
                                  description: Stable numeric repository id, e.g. 2325298.
                                nodeId:
                                  anyOf:
                                    - type: string
                                    - type: 'null'
                                  description: Repository GraphQL node id.
                                name:
                                  anyOf:
                                    - type: string
                                    - type: 'null'
                                  description: Repository name, e.g. "linux".
                                fullName:
                                  anyOf:
                                    - type: string
                                    - type: 'null'
                                  description: >-
                                    Full name including owner, e.g.
                                    "torvalds/linux".
                                ownerLogin:
                                  anyOf:
                                    - type: string
                                    - type: 'null'
                                  description: Owner login (username or org name).
                                url:
                                  anyOf:
                                    - type: string
                                    - type: 'null'
                                  description: Public repository URL.
                                isPrivate:
                                  type: boolean
                                  description: Whether the repository is private.
                              required:
                                - id
                                - nodeId
                                - name
                                - fullName
                                - ownerLogin
                                - url
                                - isPrivate
                              additionalProperties: false
                              description: The repository the commit is in.
                          required:
                            - sha
                            - message
                            - url
                            - apiUrl
                            - author
                            - authorLogin
                            - committer
                            - committerLogin
                            - commentCount
                            - repository
                          additionalProperties: false
                        description: Commits matching this page.
                      nextPage:
                        anyOf:
                          - type: number
                          - type: 'null'
                        description: >-
                          The next 1-based page number, or null when this is the
                          last page.
                    required:
                      - query
                      - totalCount
                      - commits
                      - nextPage
                    additionalProperties: false
                required:
                  - timeMs
                  - creditsCost
                  - data
                additionalProperties: false
        '400':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  message:
                    type: string
                    description: Human-readable description of what went wrong.
                required:
                  - status
                  - message
                additionalProperties: false
        '401':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  message:
                    type: string
                    description: Human-readable description of what went wrong.
                required:
                  - status
                  - message
                additionalProperties: false
        '402':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  message:
                    type: string
                    description: Human-readable description of what went wrong.
                required:
                  - status
                  - message
                additionalProperties: false
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  message:
                    type: string
                    description: Human-readable description of what went wrong.
                required:
                  - status
                  - message
                additionalProperties: false
        '500':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  message:
                    type: string
                    description: Human-readable description of what went wrong.
                required:
                  - status
                  - message
                additionalProperties: false
      security:
        - bearerAuth: []
      x-codeSamples:
        - lang: typescript
          label: Bridgly SDK
          source: |-
            import { Bridgly } from 'bridgly';

            const client = new Bridgly({ apiKey: process.env.BRIDGLY_API_KEY });

            const res = await client.github.searchCommits({
              sort: "best-match",
              order: "desc",
              count: 10,
              page: 1,
            });
            if (res.type === 'success') console.log(res.data);
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        A Bridgly API key (`bgly_…`). Metered endpoints deduct credits from the
        resolved account.

````