# 2s.io GitHub Repository Search

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

Search GitHub repositories using full GitHub query syntax and return ranked results with metadata like stars, forks, language, topics, and license.

## Facts

- Endpoint: GET https://2s.io/api/github/search-repos
- Price: $0.0025/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 2
- Tags: x402
- Canonical page: https://www.zero.xyz/c/2s-io-github-repository-search-c7856465
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_FTEcEn1TWtlVge-gMj1c3

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-repository-search-c7856465
```

Example prompt: Search GitHub for repositories matching 'x402 language:typescript stars:>100', sort by stars descending, and show me the top 10 results with their star counts, languages, and topics.

## When to prefer this

Use this endpoint when you need to search GitHub repositories with full query syntax support (language filters, star thresholds, topic filters, etc.) and require rich metadata per repo — especially when no GitHub API key is available. Prefer over direct GitHub API calls when operating in a pay-per-call agent context without managing credentials.

## Known failure modes

- Empty result set if query matches no repositories
- Rate limiting if GitHub API quota is exceeded (HTTP 429 or 403)
- Invalid query syntax returns an error from the GitHub search API
- Missing required 'q' parameter returns a 400 validation error
- Page out of bounds returns empty results or error

## How this service works

Search GitHub repositories with the full query syntax (e.g. 'x402 language:typescript stars:>100'). Sort by stars/forks/updated. Returns total match count + repos with stars, language, topics, license, timestamps. Read-only; no caller key needed.

## Output

Returns total match count plus a list of repositories (up to 50 per page) each with name, description, star count, fork count, programming language, topics list, license, creation timestamp, and last-updated timestamp.

## 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": [
      "q"
     ],
     "properties": {
      "q": {
       "type": "string",
       "maxLength": 400,
       "minLength": 1
      },
      "page": {
       "type": "integer",
       "minimum": 1
      },
      "sort": {
       "enum": [
        "stars",
        "forks",
        "help-wanted-issues",
        "updated"
       ],
       "type": "string"
      },
      "order": {
       "enum": [
        "asc",
        "desc"
       ],
       "type": "string"
      },
      "perPage": {
       "type": "integer",
       "maximum": 50,
       "minimum": 1
      }
     },
     "additionalProperties": false
    }
   }
  }
 }
}
```

## More

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