> ## 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.

# List a GitHub user's public repositories



## OpenAPI

````yaml /openapi.json post /github/list-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/list-repositories:
    post:
      tags:
        - GitHub
      summary: List a GitHub user's public repositories
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                username:
                  type: string
                  description: GitHub username (login) without the "@", e.g. "torvalds".
                count:
                  default: 10
                  description: Number of results to return (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
                order:
                  default: pushed
                  description: Sort order for the repositories. Defaults to "pushed".
                  type: string
                  enum:
                    - pushed
                    - updated
                    - created
                    - name
                    - stars
              required:
                - username
      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:
                      username:
                        type: string
                        description: GitHub login the repositories belong to.
                      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: The user's repositories for 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:
                      - username
                      - 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.listRepositories({
              username: "string",
              count: 10,
              order: "pushed",
            });
            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.

````