> ## Documentation Index
> Fetch the complete documentation index at: https://sourcebot-jminnetian-askskills.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# List repositories

> Returns a paginated list of repositories indexed by this Sourcebot instance.



## OpenAPI

````yaml /api-reference/sourcebot-public.openapi.json get /api/repos
openapi: 3.0.3
info:
  title: Sourcebot Public API
  version: v5.0.4
  description: >-
    OpenAPI description for the public Sourcebot REST endpoints used for search,
    repository listing, and file browsing. Authentication is instance-dependent:
    API keys are the standard integration mechanism, OAuth bearer tokens are
    EE-only, and some instances may allow anonymous access.
servers: []
security:
  - bearerToken: []
  - apiKeyHeader: []
  - {}
tags:
  - name: Search & Navigation
    description: Code search and symbol navigation endpoints.
  - name: Repositories
    description: Repository listing and metadata endpoints.
  - name: Git
    description: Git history, diff, and file content endpoints.
  - name: System
    description: System health and version endpoints.
  - name: Enterprise (EE)
    description: Enterprise endpoints for user management and audit logging.
paths:
  /api/repos:
    get:
      tags:
        - Repositories
      summary: List repositories
      description: >-
        Returns a paginated list of repositories indexed by this Sourcebot
        instance.
      operationId: listRepositories
      parameters:
        - schema:
            type: integer
            minimum: 0
            exclusiveMinimum: true
            default: 1
          required: false
          name: page
          in: query
        - schema:
            type: integer
            minimum: 0
            exclusiveMinimum: true
            maximum: 100
            default: 30
          required: false
          name: perPage
          in: query
        - schema:
            type: string
            enum:
              - name
              - pushed
            default: name
          required: false
          name: sort
          in: query
        - schema:
            type: string
            enum:
              - asc
              - desc
            default: asc
          required: false
          name: direction
          in: query
        - schema:
            type: string
          required: false
          name: query
          in: query
      responses:
        '200':
          description: Paginated repository list.
          headers:
            X-Total-Count:
              description: >-
                Total number of repositories matching the query across all
                pages.
              schema:
                type: integer
                example: 137
            Link:
              description: >-
                Pagination links formatted per RFC 8288. Includes `rel="next"`,
                `rel="prev"`, `rel="first"`, and `rel="last"` when applicable.
              schema:
                type: string
                example: >-
                  </api/repos?page=2&perPage=30>; rel="next",
                  </api/repos?page=5&perPage=30>; rel="last"
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicListReposResponse'
        '400':
          description: Invalid query parameters.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiServiceError'
        '500':
          description: Unexpected repository listing failure.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiServiceError'
components:
  schemas:
    PublicListReposResponse:
      type: array
      items:
        type: object
        properties:
          codeHostType:
            type: string
            enum:
              - github
              - gitlab
              - gitea
              - gerrit
              - bitbucketServer
              - bitbucketCloud
              - genericGitHost
              - azuredevops
          repoId:
            type: number
          repoName:
            type: string
          webUrl:
            type: string
          repoDisplayName:
            type: string
          externalWebUrl:
            type: string
          imageUrl:
            type: string
          indexedAt:
            type: string
            nullable: true
          pushedAt:
            type: string
            nullable: true
          defaultBranch:
            type: string
          isFork:
            type: boolean
          isArchived:
            type: boolean
        required:
          - codeHostType
          - repoId
          - repoName
          - webUrl
          - isFork
          - isArchived
    PublicApiServiceError:
      type: object
      properties:
        statusCode:
          type: number
        errorCode:
          type: string
        message:
          type: string
      required:
        - statusCode
        - errorCode
        - message
      description: Structured error response returned by Sourcebot public API endpoints.
  securitySchemes:
    bearerToken:
      type: http
      scheme: bearer
      description: >-
        Bearer authentication header of the form `Bearer <token>`, where
        `<token>` is your API key.
    apiKeyHeader:
      type: apiKey
      in: header
      name: X-Sourcebot-Api-Key
      description: >-
        Header of the form `X-Sourcebot-Api-Key: <token>`, where `<token>` is
        your API key.

````