---
search:
  tags:
    - Activity
    - GET
seo:
  description: >-
    List default-branch commits whose primary author GitHub resolves to the…
    Reference for the GET /v1/users/{username}/commits endpoint in the Kronik
    API.
sidebar:
  label: List public commits
  badge: GET
title: List public commits
type: openapi-operation
---
List default-branch commits whose primary author GitHub resolves to the requested user. Initial requests default to ten items; continuation requests use only an opaque cursor.

`GET /v1/users/{username}/commits`

**Initial request**

```bash
curl 'https://api.example.com/v1/users/octocat/commits?limit=25'
```

**Continuation request**

```bash
curl 'https://api.example.com/v1/users/octocat/commits?cursor=CURSOR_FROM_PREVIOUS_RESPONSE'
```

**Responses**

- `200` — CommitPage
- `400` — InvalidRequestProblem | InvalidCursorProblem
- `404` — UserNotFoundProblem | LatestCommitNotFoundProblem
- `429` — RateLimitedProblem
- `502` — UpstreamFailureProblem
- `503` — ServiceUnavailableProblem

Response example, 200:

```json
{
  "user": {
    "login": "string",
    "url": "http://example.com",
    "avatarUrl": "http://example.com"
  },
  "items": [
    {
      "sha": "string",
      "url": "http://example.com",
      "repository": {
        "nameWithOwner": "string",
        "url": "http://example.com"
      },
      "headline": "string",
      "body": "string",
      "bodyTruncated": true,
      "authoredAt": "string",
      "committedAt": "string",
      "additions": 0,
      "deletions": 0,
      "changedLines": 0,
      "parents": [
        {
          "sha": "string",
          "url": "http://example.com"
        }
      ]
    }
  ],
  "previous": "string",
  "next": "string"
}
```
