# 2s.io GitHub README Fetcher

> 2s.io GitHub README Fetcher 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 and decodes a GitHub repository's README file as UTF-8 text, optionally pinned to a specific branch, tag, or commit SHA.

## Facts

- Endpoint: GET https://2s.io/api/github/readme
- 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-readme-fetcher-c3008970
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_wMdpRDk6owZ6r3UdPlA-X

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-readme-fetcher-c3008970
```

Example prompt: Can you fetch the README for the vercel/next.js GitHub repo on the main branch and summarize what the project does?

## When to prefer this

Use this endpoint when you need quick, no-auth, pay-per-call access to a GitHub repository's README content — ideal for agents summarizing open source projects, indexing documentation, or comparing project descriptions without managing GitHub API credentials.

## Known failure modes

- Repository not found (invalid owner or repo name) — 404 error
- No README file exists in the repository — empty or error response
- Invalid ref specified (branch/tag/SHA does not exist) — 404 or error response
- Repository is private and inaccessible — authorization error
- Rate limiting by upstream GitHub API — throttled or error response

## How this service works

Fetch a repository's README, decoded to UTF-8 text (name, path, size, content, URL). Optionally pin to a branch/tag/sha via ref. Useful for summarizing or indexing a project. Read-only; no caller key needed.

## Output

Returns a JSON object with the README's filename, path within the repo, size in bytes, fully decoded UTF-8 content, and a direct URL to the file 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": {
      "ref": {
       "type": "string",
       "maxLength": 120
      },
      "repo": {
       "type": "string",
       "maxLength": 120,
       "minLength": 1
      },
      "owner": {
       "type": "string",
       "maxLength": 100,
       "minLength": 1
      }
     },
     "additionalProperties": false
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/2s-io-github-readme-fetcher-c3008970/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)
