# GitHub Repository Commits (`github.repository_commits`)

Latest commits of a public repository: sha, message, author name and login, date. E-mail addresses are not returned.

- **Route:** `POST /v1/run/github.repository_commits`
- **Price:** $0.0012 per request ($1.20 per 1,000) · `cost_usd` on every response
- **Source:** GitHub REST API (`github`) · failover: no
- **Measured latency:** p50 874 ms · p95 874 ms · p99 874 ms (1 calls, 30d)
- **Heavy response:** no

## Input

| Field | Type | Required | Default | Notes |
|---|---|---|---|---|
| `owner` | string | yes |  | Repository owner |
| `repo` | string | yes |  | Repository name |
| `branch` | string | no |  | Branch, tag or sha; default branch when empty |
| `limit` | integer | no | 20 | Commits to return |

## Output (`output` in the run envelope)

| Field | Meaning |
|---|---|
| `commits` | sha, message, author_name, author_login, date, url, verified. |
| `count` | Commits returned. |

## Example

```bash
curl -s -X POST https://getallapis.com/v1/run/github.repository_commits \
  -H "Authorization: Bearer $GETALLAPIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"owner":"torvalds","repo":"linux","limit":5}'
```

```python
from getallapis_client import Client
client = Client()  # reads GETALLAPIS_API_KEY
result = client.run('github.repository_commits', {'owner': 'torvalds', 'repo': 'linux', 'limit': 5})
print(result['cost_usd'], result['output'])
```

```bash
getallapis run github.repository_commits '{"owner":"torvalds","repo":"linux","limit":5}'
```

Quote first (free, validates input): `POST /v1/quote/github.repository_commits` with the same body.
