---
title: "List repositories"
method: GET
path: "/api/repos"
tags: ["Repositories"]
---

# List repositories

`GET /api/repos`

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

## Query parameters

- `page` integer
- `perPage` integer
- `sort` 'name' | 'pushed'
- `direction` 'asc' | 'desc'
- `query` string

## Response `200`

Paginated repository list.

- object[]
  - `codeHostType` 'github' | 'gitlab' | 'gitea' | 'gerrit' | 'bitbucketServer' | 'bitbucketCloud' | 'genericGitHost' | 'azuredevops', required
  - `repoId` number, required
  - `repoName` string, required
  - `webUrl` string, required
  - `repoDisplayName` string
  - `externalWebUrl` string
  - `imageUrl` string
  - `indexedAt` string, nullable
  - `pushedAt` string, nullable
  - `defaultBranch` string
  - `isFork` boolean, required
  - `isArchived` boolean, required

## Other responses

- `400` — Invalid query parameters.
- `500` — Unexpected repository listing failure.

---

[API](https://skmtc.dev/sourcebot/apis/sourcebot-public-api.md) · [All operations](https://skmtc.dev/sourcebot/apis/sourcebot-public-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/sourcebot/sourcebot-public-api/revisions/b0ed96fb7103/schema)
