# AgentEarn x402 — GitHub Repo Metrics

> AgentEarn x402 — GitHub Repo Metrics is a paid API for AI agents from x402-20260909-agent.projectk.org, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-15).

Returns live GitHub repository metrics (stars, forks, last push) for a given repo, paid per-call in USDC via x402 with no API key required.

## Facts

- Endpoint: GET https://x402-20260909-agent.projectk.org/gh
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agentearn-x402-github-repo-metrics-8aebd8de
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_zaMX3SbODMt_HhDEx-nUp

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 agentearn-x402-github-repo-metrics-8aebd8de
```

Example prompt: What are the current stars, forks, and last push date for the coinbase/agentkit GitHub repo?

## When to prefer this

Choose this endpoint when you need real-time GitHub repo statistics (stars, forks, last push) without setting up a GitHub OAuth token or API key, especially in wallet-native agent workflows using x402 micropayments on Base. It is ideal for lightweight, pay-per-use lookups where managing API credentials is undesirable.

## Known failure modes

- Invalid or non-existent repo string returns an error or empty response
- Missing 'repo' query parameter causes a 400 or unprocessable request
- Payment failure (insufficient wallet balance or x402 handshake issue) blocks the request
- GitHub API rate limits on the proxy side may cause transient 503 errors
- Private repositories will not return data

## How this service works

Pay-per-call live data APIs settled in USDC on Base (Ethereum) mainnet via x402. No accounts, no API keys — just a wallet. Covers live crypto ticker prices, GitHub repo metrics, Base gas price, and token market data. Payment goes to the operator's Base address.

## Output

A JSON object containing the repository's owner/name slug, current star count, fork count, and ISO 8601 timestamp of the last push event — sourced live from GitHub and returned after a $0.001 USDC micropayment settled on Base mainnet.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "repo": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "name": "owner/repo",
  "repo": "owner/repo",
  "forks": 123,
  "stars": 1234,
  "pushed": "2026-01-01T00:00:00Z"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agentearn-x402-github-repo-metrics-8aebd8de/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-20260909-agent.projectk.org](https://www.zero.xyz/host/x402-20260909-agent.projectk.org/llms.txt)
