# x402 GitHub Repository Stats & Analytics API

> x402 GitHub Repository Stats & Analytics API is a paid API for AI agents from myearnings-seven.vercel.app, paid per call via x402, $0.02/call, status unknown (last checked 2026-09-15).

Returns real-time GitHub repository metrics including stars, forks, health score, activity level, and a risk recommendation for a given owner/repo pair.

## Facts

- Endpoint: GET https://myearnings-seven.vercel.app/repo-stats
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-github-repository-stats-analytics-api-e2716597
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_AenbyVsGJPckr_QurTCDO

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 x402-github-repository-stats-analytics-api-e2716597
```

Example prompt: Can you pull up the GitHub repo stats and health score for the vercel/next.js repository — I want to know the star count, fork count, activity level, and whether it's considered healthy or risky?

## When to prefer this

Choose this endpoint when you need a quick, structured health and activity assessment of a specific GitHub repository — particularly when you want a synthesized health_score and recommendation rather than raw API data. Useful for dependency vetting, due diligence workflows, or agent-driven open source research. Prefer this over scraping GitHub directly when you need a pay-per-call, no-subscription model via x402.

## Known failure modes

- Missing required 'owner' or 'repo' parameters returns a 400 error
- Non-existent or private GitHub repository returns a 404 or empty data
- Payment failure or missing x402 USDC authorization returns a 402 Payment Required
- Rate limits from the underlying GitHub API may cause transient 503 errors
- Newly created repositories with no activity may return a very low health score and dormant status

## How this service works

Real-time GitHub trending repos, repo analytics, npm download stats, Hacker News stories, and DeFi yield data for AI agents. Pay per request via x402 (USDC on Base).

## Output

Returns a JSON object with the repository name, integer star count, integer fork count, and an analysis object containing a 0-100 health score, an activity level enum (very_active, active, moderate, dormant), and a risk recommendation (healthy, moderate, or risky).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "repo",
  "owner"
 ],
 "properties": {
  "repo": {
   "type": "string",
   "description": "Repository name"
  },
  "owner": {
   "type": "string",
   "description": "Repository owner/organization"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "repo": {
   "type": "string"
  },
  "forks": {
   "type": "integer"
  },
  "stars": {
   "type": "integer"
  },
  "analysis": {
   "type": "object",
   "properties": {
    "health_score": {
     "type": "integer",
     "maximum": 100,
     "minimum": 0
    },
    "activity_level": {
     "enum": [
      "very_active",
      "active",
      "moderate",
      "dormant"
     ],
     "type": "string"
    },
    "recommendation": {
     "enum": [
      "healthy",
      "moderate",
      "risky"
     ],
     "type": "string"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-github-repository-stats-analytics-api-e2716597/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from myearnings-seven.vercel.app](https://www.zero.xyz/host/myearnings-seven.vercel.app/llms.txt)
