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

# List repositories

> Returns repositories for the team attached to your API key.



## OpenAPI

````yaml /api-reference/openapi.json get /api/v1/repositories
openapi: 3.1.0
info:
  title: Gecko SAST Scanner API
  version: v1
  description: >-
    Use the Gecko API to launch scans and read scan, repository, and
    vulnerability data for your active team.
servers:
  - url: https://app.gecko.security
    description: Production
security:
  - ApiKeyAuth: []
tags:
  - name: Scans
    description: Launch scans and read scan-level data.
  - name: Repositories
    description: Read repository inventory and repository vulnerability data.
  - name: Vulnerabilities
    description: Read vulnerability data across your active team.
  - name: Utility
    description: Service health and utility endpoints.
paths:
  /api/v1/repositories:
    get:
      tags:
        - Repositories
      summary: List repositories
      description: Returns repositories for the team attached to your API key.
      operationId: getApiV1Repositories
      parameters:
        - $ref: '#/components/parameters/name'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
      responses:
        '200':
          description: A paginated list of repositories.
          headers:
            X-RateLimit-Remaining:
              $ref: '#/components/headers/XRateLimitRemaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/XRateLimitReset'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RepositoryListResponse'
              example:
                version: v1
                data:
                  - id: 4dfd6898-69f0-4dff-9cff-8cd75f7ad28a
                    name: gecko-security/Paperbaum
                    fullName: gecko-security/Paperbaum
                    clonePath: https://github.com/gecko-security/Paperbaum.git
                    lastScanAt: '2025-08-04T09:01:20.000Z'
                    scanCount: 8
                    vulnerabilityCount: 37
                pagination:
                  total: 1
                  limit: 50
                  offset: 0
                  hasMore: false
                filters:
                  name: null
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '429':
          $ref: '#/components/responses/RateLimitedError'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  parameters:
    name:
      name: name
      in: query
      required: false
      description: Filter repositories by repository name or full name.
      schema:
        type: string
      example: paperbaum
    limit:
      name: limit
      in: query
      required: false
      description: >-
        Maximum number of results to return. Gecko defaults to `100` and caps
        the value at `1000`.
      schema:
        type: integer
        default: 100
        minimum: 1
        maximum: 1000
      example: 50
    offset:
      name: offset
      in: query
      required: false
      description: Number of results to skip before Gecko starts returning rows.
      schema:
        type: integer
        default: 0
        minimum: 0
      example: 0
  headers:
    XRateLimitRemaining:
      description: Requests remaining in the current one-hour window for the API key.
      schema:
        type: integer
    XRateLimitReset:
      description: >-
        ISO 8601 timestamp for when the current one-hour rate-limit window
        resets.
      schema:
        type: string
        format: date-time
    RetryAfter:
      description: Seconds to wait before retrying the request.
      schema:
        type: integer
  schemas:
    RepositoryListResponse:
      type: object
      required:
        - version
        - data
        - pagination
        - filters
      properties:
        version:
          type: string
          const: v1
        data:
          type: array
          items:
            $ref: '#/components/schemas/RepositorySummary'
        pagination:
          $ref: '#/components/schemas/Pagination'
        filters:
          $ref: '#/components/schemas/RepositoryListFilters'
    RepositorySummary:
      type: object
      required:
        - id
        - name
        - fullName
        - clonePath
        - lastScanAt
        - scanCount
        - vulnerabilityCount
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        fullName:
          type:
            - string
            - 'null'
        clonePath:
          type: string
        lastScanAt:
          type:
            - string
            - 'null'
          format: date-time
        scanCount:
          type: integer
        vulnerabilityCount:
          type: integer
    Pagination:
      type: object
      required:
        - total
        - limit
        - offset
        - hasMore
      properties:
        total:
          type: integer
        limit:
          type: integer
        offset:
          type: integer
        hasMore:
          type: boolean
    RepositoryListFilters:
      type: object
      required:
        - name
      properties:
        name:
          type:
            - string
            - 'null'
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: string
        details:
          type:
            - string
            - 'null'
        hint:
          type:
            - string
            - 'null'
  responses:
    BadRequestError:
      description: The request parameters are invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: Limit cannot exceed 1000
    UnauthorizedError:
      description: The API key is missing, malformed, or invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            missingKey:
              value:
                error: API key is required
            badFormat:
              value:
                error: Invalid API key format
            badKey:
              value:
                error: Invalid API key
    RateLimitedError:
      description: The API key reached the per-hour request limit.
      headers:
        Retry-After:
          $ref: '#/components/headers/RetryAfter'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: Rate limit exceeded
    InternalServerError:
      description: Gecko failed to process the request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: Internal server error
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: Team-scoped Gecko API key. Keys start with `gk_`.

````