# 2s.io GitHub Repository Lookup

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

Look up metadata for a public GitHub repository by owner/name slug, returning stars, forks, language, license, topics, and timestamps.

## Facts

- Endpoint: GET https://2s.io/api/code/repo-lookup
- Price: $0.0012/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-16
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/2s-io-d607ce71
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_jzWnAmcJ1i6S_Pg048npx

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-d607ce71
```

Example prompt: Can you pull up the GitHub repo details for 'vercel/next.js' — I want to know its star count, primary language, license, and when it was last pushed?

## When to prefer this

Use this endpoint when you need structured metadata about a public GitHub repository without setting up your own GitHub API credentials or OAuth token. Ideal for agents that need quick one-off repo lookups (stars, language, license, topics) and can tolerate the shared rate limit of 60 requests/hour. Not suitable for high-volume batch lookups or private repository access.

## Known failure modes

- Repository not found (404) if the slug is invalid or the repo is private/deleted
- 429 UPSTREAM_RATE_LIMIT when GitHub's 60 req/hour unauthenticated limit is exhausted
- Malformed slug (missing '/' separator) may cause a 400 or unexpected result
- Private repositories are inaccessible and will return a not-found error

## How this service works

Look up a public GitHub repository by "owner/name" slug. Returns full name, owner, description, homepage, default branch, primary language, topics, license (SPDX key + name), counts (stars / forks / watchers / open issues / subscribers / network), size, timestamps (created/updated/pushed), visibility, has-issues/projects/wiki/discussions flags. Unauthenticated GitHub access is rate-limited to 60 req/hour per server IP — returns 429 UPSTREAM_RATE_LIMIT when the bucket is empty.

## Output

Returns a JSON object with the repository's full name, owner, description, homepage URL, default branch, primary programming language, topics array, license (SPDX key and name), numeric counts (stars, forks, watchers, open issues, subscribers, network), size in KB, ISO timestamps (created, updated, pushed), visibility string, and boolean flags for issues/projects/wiki/discussions features. Returns 429 with UPSTREAM_RATE_LIMIT code if GitHub's unauthenticated rate limit (60 req/hour per server IP) is exhausted.

## Example request

```json
{
 "input": {
  "type": "http",
  "method": "GET",
  "queryParams": {
   "repo": "facebook/react"
  }
 }
}
```

## 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": {
     "required": [
      "repo"
     ],
     "properties": {
      "repo": {
       "type": "string",
       "description": "\"owner/name\" slug."
      }
     }
    }
   }
  }
 }
}
```

## More

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