# x402 GitHub Trending Repos API

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

Returns real-time GitHub trending repositories filtered by time period and programming language, paid per request via x402 USDC micropayments

## Facts

- Endpoint: GET https://myearnings-seven.vercel.app/trending
- Price: $0.01/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-trending-repos-api-76a46f80
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_xrjkJx0V7kE8t6rl6Byr3

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-trending-repos-api-76a46f80
```

Example prompt: What are the trending GitHub repositories this week, specifically ones written in Python?

## When to prefer this

Choose this endpoint when you need real-time GitHub trending data with per-request micropayment billing (no subscription required), especially when building agents that monitor open source ecosystem trends, discover new libraries by language, or generate developer-focused content digests. Prefer this over scraping GitHub directly or using GitHub's own search API when you want a clean, pre-ranked trending feed with growth metrics already computed.

## Known failure modes

- Invalid 'since' value returns malformed or empty results
- Language filter with unsupported value may return empty trending array
- Payment failure via x402 (insufficient USDC balance) blocks the request
- Rate limiting or upstream GitHub API unavailability causes 503 or stale data
- Network timeout on the Vercel serverless function

## 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

A JSON object containing a count of trending repositories, the time period queried, a fetch timestamp, and an array of repo objects each with name, URL, star count, fork count, star growth string (e.g. '+5000 stars in weekly'), programming language, description, and creation date.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "since": {
   "enum": [
    "daily",
    "weekly",
    "monthly"
   ],
   "type": "string",
   "description": "Time period for trending"
  },
  "language": {
   "type": "string",
   "description": "Filter by programming language (e.g. python, javascript)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "count": {
   "type": "integer"
  },
  "period": {
   "type": "string"
  },
  "trending": {
   "type": "array",
   "items": {
    "type": "object",
    "properties": {
     "url": {
      "type": "string",
      "format": "uri"
     },
     "name": {
      "type": "string",
      "example": "facebook/react"
     },
     "forks": {
      "type": "integer",
      "example": 45000
     },
     "stars": {
      "type": "integer",
      "example": 220000
     },
     "growth": {
      "type": "string",
      "example": "+5000 stars in weekly"
     },
     "language": {
      "type": "string",
      "example": "JavaScript"
     },
     "created_at": {
      "type": "string",
      "format": "date-time"
     },
     "description": {
      "type": "string",
      "example": "A JavaScript library for building UIs"
     }
    }
   }
  },
  "fetched_at": {
   "type": "string",
   "format": "date-time"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-github-trending-repos-api-76a46f80/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)
