# 2s.io GitHub Commit History

> 2s.io GitHub Commit History is a paid API for AI agents from 2s.io, paid per call via x402, $0.0025/call, status unknown (last checked 2026-09-15).

Fetches paginated commit history for a GitHub repository, including SHA, message, author info, date, and URL, with optional branch/path/author filtering.

## Facts

- Endpoint: GET https://2s.io/api/github/commits
- Price: $0.0025/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/2s-io-github-commit-history-70a1f7ef
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_im4qIl7F8zgdXetLKOIxD

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability 2s-io-github-commit-history-70a1f7ef
```

Example prompt: Can you pull the last 25 commits from the torvalds/linux repo on the master branch, filtered to just changes in the 'kernel/sched' directory?

## When to prefer this

Use this endpoint when you need read-only, key-free access to GitHub commit history with filtering by branch, file path, or author and built-in pagination — especially useful in agent workflows where no GitHub token is available and pay-per-call pricing ($0.001/call) is preferred over managing OAuth credentials.

## Known failure modes

- Invalid owner or repo name returns an error or empty result
- Non-existent branch/tag sha returns no commits
- File path with no matching commits returns empty list
- Page number beyond available commits returns empty list
- Rate limiting from the upstream GitHub API may cause transient failures

## How this service works

Commit history for a repository: sha, message, author name + GitHub login, date, and URL. Optionally filter by branch/tag (sha), file path, or author. Paginate. Read-only; no caller key needed.

## Output

A paginated list of commits, each containing the commit SHA, commit message, author's display name and GitHub login, timestamp, and a direct URL to the commit on GitHub.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "queryParams"
   ],
   "properties": {
    "type": {
     "const": "http"
    },
    "method": {
     "const": "GET"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "owner",
      "repo"
     ],
     "properties": {
      "sha": {
       "type": "string",
       "maxLength": 120,
       "description": "Branch, tag, or commit sha to start from."
      },
      "page": {
       "type": "integer",
       "minimum": 1
      },
      "path": {
       "type": "string",
       "maxLength": 400
      },
      "repo": {
       "type": "string",
       "maxLength": 120,
       "minLength": 1
      },
      "owner": {
       "type": "string",
       "maxLength": 100,
       "minLength": 1
      },
      "author": {
       "type": "string",
       "maxLength": 100
      },
      "perPage": {
       "type": "integer",
       "maximum": 100,
       "minimum": 1
      }
     },
     "additionalProperties": false
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/2s-io-github-commit-history-70a1f7ef/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from 2s.io](https://www.zero.xyz/host/2s.io/llms.txt)
