---
title: "List commits"
method: GET
path: "/api/commits"
tags: ["Git"]
---

# List commits

`GET /api/commits`

Returns a paginated list of commits for a repository.

## Query parameters

- `repo` string, required — The fully-qualified repository name.
- `query` string — Filter commits by message content (case-insensitive). Interpreted as a POSIX BRE regex — escape metacharacters for literal matching.
- `since` string — Return commits after this date. Accepts ISO 8601 or relative formats (e.g. `30 days ago`).
- `until` string — Return commits before this date. Accepts ISO 8601 or relative formats.
- `author` string — Filter commits by author name or email (case-insensitive). Interpreted as a POSIX BRE regex — escape metacharacters for literal matching.
- `ref` string — The git ref (branch, tag, or commit SHA) to list commits from. Defaults to `HEAD`.
- `path` string — Restrict commits to those that touch this file path.
- `page` integer
- `perPage` integer

## Response `200`

Paginated commit list.

- PublicCommit[]
  - `hash` string, required — The full commit SHA.
  - `date` string, required — The commit date in ISO 8601 format.
  - `message` string, required — The commit subject line.
  - `refs` string, required — Refs pointing to this commit (e.g. branch or tag names).
  - `body` string, required — The commit body (everything after the subject line).
  - `authorName` string, required
  - `authorEmail` string, required

## Other responses

- `400` — Invalid query parameters.
- `404` — Repository not found.
- `500` — Unexpected 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)
