# GitBeacon Trending Repos API

> GitBeacon Trending Repos API is a paid API for AI agents from api.gitbeacon.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-15).

Returns top trending GitHub repositories from the latest daily scan, sorted by stars, with metadata and README excerpts, optionally filtered by programming language.

## Facts

- Endpoint: GET https://api.gitbeacon.dev/v1/repos
- 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/gitbeacon-trending-repos-api-9cc43dba
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_8qSmbXh8iNfZIPfQ8_qlq

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 gitbeacon-trending-repos-api-9cc43dba
```

Example prompt: What are the top 20 trending GitHub repos right now in Rust — give me their descriptions, topics, and a snippet from each README?

## When to prefer this

Use this endpoint when you need a curated, ranked snapshot of what's trending on GitHub right now, especially when you want rich metadata (topics, license, README excerpts, author followers) rather than just repo names. Prefer this over raw GitHub API calls when you want pre-aggregated trending signal with daily provenance and language filtering in a single paid call.

## Known failure modes

- Invalid language value returns empty results or an error
- Limit out of range (below 1 or above 100) returns a validation error
- Payment failure via x402 protocol results in no charge and no data returned
- Service unavailable if daily scan has not yet completed
- Network timeout on slow connections

## How this service works

Paid ($0.01 USDC via x402). Top trending GitHub repos from the latest daily scan, sorted by stars — description, language, topics, license, forks, author followers, and README excerpt. Filterable by programming language. Response carries the scanDate provenance. Compute-first / settle-after — you are never charged for an error.

## Output

A JSON list of top trending GitHub repositories from the most recent daily scan, each containing the repo name, description, programming language, topics, license, fork count, author follower count, and a README excerpt. The response also includes a scanDate field indicating when the data was collected. Results are sorted by stars and optionally filtered to a single programming language.

## 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"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [],
     "properties": {
      "limit": {
       "type": "integer",
       "maximum": 100,
       "minimum": 1,
       "description": "Max repos to return (1-100)."
      },
      "language": {
       "type": "string",
       "description": "Filter by programming language, case-insensitive (e.g. Python, Rust, TypeScript)."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": [
   {
    "forks": 45,
    "stars": 321,
    "topics": [
     "ai",
     "code-understanding",
     "llm"
    ],
    "license": "MIT",
    "fullName": "HKUDS/FastCode",
    "language": "Python",
    "description": "Accelerates and streamlines code understanding",
    "readmeExcerpt": "FastCode is an AI-powered tool for accelerating code comprehension...",
    "authorFollowers": 1200
   }
  ],
  "count": 30,
  "charged": true,
  "success": true,
  "scanDate": "2026-02-25T00:00:00.000Z"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/gitbeacon-trending-repos-api-9cc43dba/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.gitbeacon.dev](https://www.zero.xyz/host/api.gitbeacon.dev/llms.txt)
