> ## 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 public GitHub repositories



## OpenAPI

````yaml /openapi.json post /github/search-repositories
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-repositories:
    post:
      tags:
        - GitHub
      summary: Search 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
                language:
                  description: Primary language, e.g. "TypeScript". Maps to `language:`.
                  type: string
                stars:
                  description: >-
                    Filter by star count. Provide any of gt / gte / lt / lte;
                    combine a lower and upper bound for a range.
                  type: object
                  properties:
                    gt:
                      description: Strictly greater than this value.
                      anyOf:
                        - type: number
                        - type: 'null'
                    gte:
                      description: Greater than or equal to this value.
                      anyOf:
                        - type: number
                        - type: 'null'
                    lt:
                      description: Strictly less than this value.
                      anyOf:
                        - type: number
                        - type: 'null'
                    lte:
                      description: Less than or equal to this value.
                      anyOf:
                        - type: number
                        - type: 'null'
                forks:
                  description: >-
                    Filter by fork count. Provide any of gt / gte / lt / lte;
                    combine a lower and upper bound for a range.
                  type: object
                  properties:
                    gt:
                      description: Strictly greater than this value.
                      anyOf:
                        - type: number
                        - type: 'null'
                    gte:
                      description: Greater than or equal to this value.
                      anyOf:
                        - type: number
                        - type: 'null'
                    lt:
                      description: Strictly less than this value.
                      anyOf:
                        - type: number
                        - type: 'null'
                    lte:
                      description: Less than or equal to this value.
                      anyOf:
                        - type: number
                        - type: 'null'
                size:
                  description: >-
                    Filter by repository size in KB. Provide any of gt / gte /
                    lt / lte; combine a lower and upper bound for a range.
                  type: object
                  properties:
                    gt:
                      description: Strictly greater than this value.
                      anyOf:
                        - type: number
                        - type: 'null'
                    gte:
                      description: Greater than or equal to this value.
                      anyOf:
                        - type: number
                        - type: 'null'
                    lt:
                      description: Strictly less than this value.
                      anyOf:
                        - type: number
                        - type: 'null'
                    lte:
                      description: Less than or equal to this value.
                      anyOf:
                        - type: number
                        - type: 'null'
                created:
                  description: >-
                    Filter by creation 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'
                pushed:
                  description: >-
                    Filter by date of last push. 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'
                topics:
                  description: Require each of these topics. Maps to `topic:`.
                  type: array
                  items:
                    type: string
                license:
                  description: SPDX license key, e.g. "mit". Maps to `license:`.
                  type: string
                archived:
                  description: Filter by archived state. Maps to `archived:`.
                  type: boolean
                visibility:
                  description: Repository visibility. Maps to `is:public` / `is:private`.
                  type: string
                  enum:
                    - public
                    - private
                fork:
                  default: exclude
                  description: >-
                    Whether to include forks: "exclude" (default), "include"
                    (`fork:true`), or "only" (`fork:only`).
                  type: string
                  enum:
                    - exclude
                    - include
                    - only
                sort:
                  default: best-match
                  description: Sort field. Defaults to relevance ("best-match").
                  type: string
                  enum:
                    - best-match
                    - stars
                    - forks
                    - updated
                    - help-wanted-issues
                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
                after:
                  description: >-
                    Pagination cursor (the `after` value returned by a previous
                    page). Omit for the first page.
                  type: string
      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).
                      repositories:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              description: Repository GraphQL node id, e.g. "R_kgDOABCDEF".
                            databaseId:
                              anyOf:
                                - type: number
                                - type: 'null'
                              description: >-
                                Stable numeric repository id, e.g. 2325298, or
                                null.
                            name:
                              anyOf:
                                - type: string
                                - type: 'null'
                              description: Repository name, e.g. "linux".
                            nameWithOwner:
                              anyOf:
                                - type: string
                                - type: 'null'
                              description: >-
                                Full name including owner, e.g.
                                "torvalds/linux".
                            owner:
                              type: object
                              properties:
                                username:
                                  anyOf:
                                    - type: string
                                    - type: 'null'
                                  description: >-
                                    Owner login (username or org name), e.g.
                                    "torvalds".
                                id:
                                  anyOf:
                                    - type: string
                                    - type: 'null'
                                  description: >-
                                    Owner GraphQL node id, e.g.
                                    "MDQ6VXNlcjEwMjQwMjU=".
                                url:
                                  anyOf:
                                    - type: string
                                    - type: 'null'
                                  description: >-
                                    Public profile URL, e.g.
                                    "https://github.com/torvalds".
                                avatarUrl:
                                  anyOf:
                                    - type: string
                                    - type: 'null'
                                  description: URL of the owner's avatar image.
                              required:
                                - username
                                - id
                                - url
                                - avatarUrl
                              additionalProperties: false
                              description: The user or organization that owns it.
                            description:
                              anyOf:
                                - type: string
                                - type: 'null'
                              description: Short repository description, or null.
                            url:
                              anyOf:
                                - type: string
                                - type: 'null'
                              description: >-
                                Public repository URL, e.g.
                                "https://github.com/torvalds/linux".
                            homepageUrl:
                              anyOf:
                                - type: string
                                - type: 'null'
                              description: Project homepage URL set on the repo, or null.
                            isPrivate:
                              type: boolean
                              description: Whether the repository is private.
                            isFork:
                              type: boolean
                              description: Whether the repository is a fork.
                            isArchived:
                              type: boolean
                              description: Whether the repository is archived.
                            isTemplate:
                              type: boolean
                              description: Whether the repository is a template.
                            primaryLanguage:
                              anyOf:
                                - type: object
                                  properties:
                                    name:
                                      anyOf:
                                        - type: string
                                        - type: 'null'
                                      description: Language name, e.g. "TypeScript".
                                    color:
                                      anyOf:
                                        - type: string
                                        - type: 'null'
                                      description: >-
                                        Hex color GitHub uses for the language,
                                        or null.
                                  required:
                                    - name
                                    - color
                                  additionalProperties: false
                                - type: 'null'
                              description: The most-used language in the repo, or null.
                            stargazerCount:
                              anyOf:
                                - type: number
                                - type: 'null'
                              description: Number of stars.
                            forkCount:
                              anyOf:
                                - type: number
                                - type: 'null'
                              description: Number of forks.
                            watcherCount:
                              anyOf:
                                - type: number
                                - type: 'null'
                              description: Number of watchers.
                            openIssuesCount:
                              anyOf:
                                - type: number
                                - type: 'null'
                              description: Number of open issues.
                            diskUsage:
                              anyOf:
                                - type: number
                                - type: 'null'
                              description: Repository size in kilobytes, or null.
                            license:
                              anyOf:
                                - type: object
                                  properties:
                                    key:
                                      anyOf:
                                        - type: string
                                        - type: 'null'
                                      description: SPDX license key, e.g. "mit".
                                    name:
                                      anyOf:
                                        - type: string
                                        - type: 'null'
                                      description: Full license name, e.g. "MIT License".
                                    spdxId:
                                      anyOf:
                                        - type: string
                                        - type: 'null'
                                      description: SPDX identifier, e.g. "MIT", or null.
                                    url:
                                      anyOf:
                                        - type: string
                                        - type: 'null'
                                      description: >-
                                        URL of the license on
                                        choosealicense.com, or null.
                                  required:
                                    - key
                                    - name
                                    - spdxId
                                    - url
                                  additionalProperties: false
                                - type: 'null'
                              description: >-
                                The repository's license, or null when
                                unlicensed.
                            topics:
                              type: array
                              items:
                                type: string
                              description: Repository topics, e.g. ["kernel", "linux"].
                            createdAt:
                              anyOf:
                                - type: string
                                - type: 'null'
                              description: ISO-8601 timestamp the repository was created.
                            updatedAt:
                              anyOf:
                                - type: string
                                - type: 'null'
                              description: >-
                                ISO-8601 timestamp the repository was last
                                updated.
                            pushedAt:
                              anyOf:
                                - type: string
                                - type: 'null'
                              description: ISO-8601 timestamp of the last push, or null.
                          required:
                            - id
                            - databaseId
                            - name
                            - nameWithOwner
                            - owner
                            - description
                            - url
                            - homepageUrl
                            - isPrivate
                            - isFork
                            - isArchived
                            - isTemplate
                            - primaryLanguage
                            - stargazerCount
                            - forkCount
                            - watcherCount
                            - openIssuesCount
                            - diskUsage
                            - license
                            - topics
                            - createdAt
                            - updatedAt
                            - pushedAt
                          additionalProperties: false
                        description: Repositories matching this page.
                      after:
                        anyOf:
                          - type: string
                          - type: 'null'
                        description: >-
                          Pagination cursor for the next page (GitHub
                          `endCursor`), or null when there are no more results.
                    required:
                      - query
                      - totalCount
                      - repositories
                      - after
                    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.searchRepositories({
              fork: "exclude",
              sort: "best-match",
              order: "desc",
              count: 10,
            });
            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.

````